bsee
Members-
Posts
18 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
bsee's Achievements
Member (2/4)
2
Reputation
-
CInScan returns 0s when reading multiple channels
bsee replied to bsee's question in Data Acquisition (DAQ) & Data Logging
Perfect. Your example matches what I had above, but until your example I hadn't found official documentation saying the data values for channels were interleaved. I will continue with this method. Thank you -
CInScan returns 0s when reading multiple channels
bsee replied to bsee's question in Data Acquisition (DAQ) & Data Logging
The UL help document also lists this overload: That said, I am happy to copy to a single dimension array. Is there documentation that says how to read a multichannel scan to a single dimension array? In my 2nd post, I believe I identified the structure, but I'm still just guessing. I'd be more comfortable with official documentation. -
CInScan returns 0s when reading multiple channels
bsee replied to bsee's question in Data Acquisition (DAQ) & Data Logging
The demo works fine, but only uses WinBufToArray64 on a single dimension array, which I already have working. I am unable to make that function work on a multidimensional array. I'm currently copying multi-channel data out of it using an undocumented workaround. -
CInScan returns 0s when reading multiple channels
bsee replied to bsee's question in Data Acquisition (DAQ) & Data Logging
I think I have a workaround, but I still cannot make MccService.WinBufToArray64() work with a multidimensional array. CInScan was working fine. No changes needed there. Since it collects 9 datapoints, apparently I can copy the data to a single dimensional array. The order of the data is Ch0-P0, Ch1-P0,Ch2-P0,Ch1-P0, etc. I'll map it into separate arrays myself. However, I was unable to make MccService.WinBufToArray64() work with a multidimensional array. The code in my initial post returns all 0s, even when my workaround is returning valid data. Should this be working? -
CInScan returns 0s when reading multiple channels
bsee posted a question in Data Acquisition (DAQ) & Data Logging
I'm successfully reading a single channel at a time and receiving data back. However, when I read 3 channels at once, all data is 0. None of the functions return an error code. Am I doing something wrong? None of the examples I saw show reading from multiple channels. Here is the full set of code. CTR-04 InstaCal: 6.74 C# universal Library Windows 10, latest updates // Init the board DaqBoard = new MccBoard(0); for (int i = 0; i < 3; i++) { var error = DaqBoard.CConfigScan(i, CounterMode.PulseWidth, CounterDebounceTime.Debounce25500us, CounterDebounceMode.TriggerAfterStable, CounterEdgeDetection.RisingEdge, CounterTickSize.Tick20pt83ns, i); } int rate = 1000; int dataPoints = 3; long[] array1 = new long[3]; long[] array2 = new long[3]; long[] array3 = new long[3]; long[,] multiArray = new long[3, 3]; IntPtr memoryHandle = IntPtr.Zero; memoryHandle = MccService.WinBufAlloc64Ex(1000); // The following 3 individual CInScan calls return data successfully. var scanError1 = DaqBoard.CInScan(0, 0, dataPoints, ref rate, memoryHandle, ScanOptions.Ctr64Bit); var channelCopy1 = MccService.WinBufToArray64(memoryHandle, array1, 0, 3); var scanError2 = DaqBoard.CInScan(1, 1, dataPoints, ref rate, memoryHandle, ScanOptions.Ctr64Bit); var channelCopy2 = MccService.WinBufToArray64(memoryHandle, array2, 0, 3); var scanError3 = DaqBoard.CInScan(2, 2, dataPoints, ref rate, memoryHandle, ScanOptions.Ctr64Bit); var channelCopy3 = MccService.WinBufToArray64(memoryHandle, array3, 0, 3); // The CInScan to read from multiple channels returns all 0s. var scanErrorMulti = DaqBoard.CInScan(0, 2, dataPoints * 3, ref rate, memoryHandle, ScanOptions.Ctr64Bit); var multiChannelCopy = MccService.WinBufToArray64(memoryHandle, multiArray, 0, 3, 3); -
Universal Library sees old device, not new device
bsee replied to bsee's question in Data Acquisition (DAQ) & Data Logging
Nevermind. Everything appears to be working now. I'm not sure what fixed it. -
Universal Library sees old device, not new device
bsee replied to bsee's question in Data Acquisition (DAQ) & Data Logging
@Fausto I'm using C# and InstaCal 6.74. After deleting CB.CFG, the old device is gone. In InstaCal, CTR-04 correctly shows up and disappears when connected/disconnected. Instacal shows it as Board 0. However, the UL library doesn't show a board number. The code below correctly has the CTR-04 board in the descriptor variable, but boardNum is -1. DaqDeviceDescriptor[] inventory = DaqDeviceManager.GetDaqDeviceInventory(DaqDeviceInterface.Usb); DaqDeviceDescriptor descriptor = inventory.First(); int boardNum = DaqDeviceManager.GetBoardNumber(descriptor); Also, this code returns an empty device. Am I doing something wrong? Is there a particular example I should follow for this board? MccBoard DaqBoard = new MccDaq.MccBoard(0); -
Universal Library sees old device, not new device
bsee posted a question in Data Acquisition (DAQ) & Data Logging
I plugged a USB-231 into my PC a few months ago. That device is no longer present and I've rebooted many times since then. Now if I try to initialize board 0, it still finds USB-231. I'm using this code: MccBoard DaqBoard = new MccDaq.MccBoard(0); As a 2nd, but likely related problem, I have a USB-CTR04. Since board 0 seems to be USB-231, I expected CTR04 would be identified as board 1, but it is not. In Device Manager, the USB-231 correctly shows as missing, and CTR04 is listed correctly. I'm using Windows 10 Pro, with latest updates. -
On our older machine we have 2 DT9812. Each card has 1 AI, AO, and counter. The counter uses the CounterTimerSubsystem with the following configuration. ctSS = device.CounterTimerSubsystem(0); ctSS.CounterMode = CounterMode.Measure; ctSS.StopEdge = EdgeSelect.GateFalling; ctSS.StartEdge = EdgeSelect.GateRising; ctSS.DataFlow = DataFlow.Continuous; ctSS.Clock.Source = ClockSource.Internal; ctSS.Clock.Frequency = 5000; ctSS.MeasureDoneEvent += CtSS_MeasureDoneEvent; Our new machine will need 3 counters, and up to 5 AI. However, the analog input isn't a solid requirement. We can read those elsewhere if necessary. I am aware I'll need to rewrite my code to use the universal library. That won't be an issue, as long as the driver can raise an event when the counter increments. Is there a reason so many DT models say "Not recommended for new applications."? If we knew why, we might be more inclined to use them.
-
The old machine used DT-Open layers. However, we're building a new machine, and these machines tend to last 20+ years. We're concerned about using a board that "isn't recommended for new applications" on a new machine. That's why I'm asking if the Universal Library can raise an event when a counter is incremented. If it can, that expands the range of products that might work for us. If not, I need to recommend to my electrical engineer to only select from your DT product range.
-
My company needs to buy a new counter card. However, when I look at the Universal Library help file, I don't see a way to raise an event when the counter is incremented. Does this functionality exist in the Universal Library? At this point it looks like my options are to use the deprecated DT9812, or to find another vendor.
-
I have a DT9812. In device manager, I uninstalled the device, and hit the checkbox to uninstall the driver for the device. I then repairedOmni-CD software install package. The device was still showing as an "unknown device" under "other devices, so did a full uninstall & reinstall of the Omni CD software. However the device still does not detect drivers. Can someone advise next steps? Changing the USB port the device is using did not help. The device itself is fine - when I plugged it into a different computer ti was properly recognized.
-
Jim Windlinger reacted to an answer to a question: DT9812 no longer displays serial number and does not function
-
Fausto reacted to an answer to a question: DT9812 no longer displays serial number and does not function
-
DT9812 no longer displays serial number and does not function
bsee replied to bsee's question in Data Acquisition (DAQ) & Data Logging
@Fausto That worked great. After reprogramming the device I'm able to see the serial numbers and the devices appear to be fully operational. Thanks! @Jim Windlinger In the link from Fausto there's a "current" folder. The flash file is in there.