Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring rpm - counter freezes

Solved!
Go to solution

ceties,

 

Your while loop is running all out.  Try adding a Wait(ms) to make sure you aren't starving something.

0 Kudos
Message 11 of 26
(2,643 Views)
First of all it was just an example - in real app I have sort of wait time. But I have exactly ooposite problem, the data are rewritten before the system can read them.
LV 2011, Win7
0 Kudos
Message 12 of 26
(2,640 Views)

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.

 

0 Kudos
Message 13 of 26
(2,635 Views)

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?

Message Edited by ceties on 09-11-2009 11:35 AM
LV 2011, Win7
0 Kudos
Message 14 of 26
(2,632 Views)
Solution
Accepted by topic author ceties

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

Message Edited by John P on 09-11-2009 03:06 PM
John Passiak
Message 15 of 26
(2,607 Views)
Hello JohnP and thanks for your reply. I only wish I knew that before I bought a deck that costs more than my half year salary. Could you please point me to a document that says that 6120 uses that chip? Thank you and also thank you other guys especially Stefo for the kind help.
LV 2011, Win7
0 Kudos
Message 16 of 26
(2,598 Views)

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

John Passiak
Message 17 of 26
(2,593 Views)
Thanks John again. The last thing I will bother you with is whether you know what is the rating in ppm of the crystal oscillator used on the PCI-6120, I need it for the accuracy calculatiuon. Thanks a lot in advance
LV 2011, Win7
0 Kudos
Message 18 of 26
(2,575 Views)

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

John Passiak
Message 19 of 26
(2,553 Views)
Thanks John
LV 2011, Win7
0 Kudos
Message 20 of 26
(2,550 Views)