09-11-2009 10:09 AM
ceties,
Your while loop is running all out. Try adding a Wait(ms) to make sure you aren't starving something.
09-11-2009 10:13 AM
09-11-2009 10:43 AM
ceties,
I mentioned the wait(ms) because I've seen some weird stuff when a DAQmx Read is in a loop running full tilt. The effects are not always what you would expect. Suggest you run your test vi with the same Wait(ms) settings as your application.
09-11-2009 11:35 AM - edited 09-11-2009 11:35 AM
Hi guys, I followed the suggestions of you both and nothing changed.
I installed the latest NIDAQ – no change, with the buffer 10x3600 and 2000rpm it takes less than two sec before I get the error
I added the wait time (100ms) – no change
I checked DMA – no change
http://forums.ni.com/ni/board/message?board.id=40&thread.id=3035&view=by_date_ascending&page=1
I start to believe it has to do something with the size of the FIFO buffer of the counter. Is it somehow related?
09-11-2009 03:04 PM - edited 09-11-2009 03:06 PM
Hi ceties,
Error -200141 refers to samples being overwritten on the Hardware buffer (i.e. Onboard FIFO). On the 6120, the on-board FIFO is only 2 samples, so if your pulses are latching in values faster than we can pull them off of the board this is the error you would see.
We have benchmarked the STC chip (which the 6120 uses) for continuous counter measurements at 150 kHz, although this number is going to be highly system dependant. For a 3600 ppr encoder, this would give a maximum rpm of 2500.
As was mentioned earlier, if there are any glitches on the line this could cause the board to try to latch samples in faster than you might expect. If you are within the benchmark and still receiving the error then it's very possible that the culprit is a glitch.
If you need to read measurements faster than 150 kHz you will likely have to go with a different board. Our X Series boards (63xx) have 4 counters and have been benchmarked at ~10 MHz per counter, but they are only available on PCIe or PXIe. Another alternative would be our USB Bus-Powered M Series (621x) which have 2 counters and have been benchmarked at a little over 1 MHz.
I hope this helps!
Best Regards,
John
09-11-2009 04:13 PM
09-11-2009 05:25 PM
The S Series User Manual which covers the 6120 talks a bit about the STC chip (for example, see page 2-2). Here's a breakdown of which DAQ boards use which version of the STC ASIC:
STC: Used by all E Series and most S Series
STC 2: Used by all M Series (the 6124 and 6154 S Series boards also use this chip)
STC 3: Used by all X Series
There's nothing inherently wrong with the earlier versions, but we didn't include any significant on-board FIFO until the release of our 621x M series (the bus powered USB ones). The X Series boards also have this feature, and are on a faster bus so can sustain very high throughput for counter measurements.
The 6120 is still a great board for simultaneous sampling on analog input channels. One option would be to add one of the lower-cost X Series boards to your setup (assuming you have a PCIe slot available). I would look into the PCIe-6320. If PCIe is not an option, you might also consider the USB-6210 (as long as the pulses are not coming in much faster than ~1MHz).
Best Regards,
John
09-12-2009 04:54 PM
09-14-2009 10:10 AM
Hi ceties,
The 6120 has a 20 MHz internal timebase that is used by default (see page 4-25 of the S Series User Manual). The accuracy of this clock is ±0.01% (100 ppm), which is listed in the 6120 Detailed Specifications (page 7). You may also import an external timebase over the RTSI 7 line.
-John
09-14-2009 10:19 AM