LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fast analog input on cDAQ

Solved!
Go to solution

Holy cow! 10-100Hz? There goes my plans to run this acquisition (at least a *little*) fast! What a bummer.  Well, here it is in LV 14.  I just drew a case around the trigger stuff in case it was messing it up - paul

0 Kudos
Message 11 of 14
(477 Views)

@PaulOfElora wrote:

Thanks Oscar - well, not finding any examples that run screaming fast like I need (well, pretty fast - 100kS/s).  But - are you suggesting that I put like a 1ms Wait in the loop, then try to grab 100 samples per loop, to get the 100kS/s the card is rated for?  Guess I thought (with no evidence) that maybe the call to the hardware, processing, etc. would take some time, which would then clock the loop...


I usually wire the amount of samples I need, rather to using the Wait (ms) or other timing option for loop, since the OS might have jitter and not execute on time each iteration to the ms precision. Wiring the amount of samples you want DAQmx read to fetch will make it a blocking call that will halt execution there until they're available (or the timeout runs out).
 
Remember the cards have their own on-board sample clock, which is the one used to take the ADC measurements from the card and sends them to a buffer in the computer. This clock will allow your module to go to the 100 ks/S rate without the computer having to run that fast. The examples use lower rates by default because not much cards can run at the speed you want to acquire, but you should be able to modify that.
 
All the best,
Message 12 of 14
(462 Views)
Solution
Accepted by topic author PaulOfElora

@oscarfonseca wrote:


I usually wire the amount of samples I need, rather to using the Wait (ms) or other timing option for loop, since the OS might have jitter and not execute on time each iteration to the ms precision. Wiring the amount of samples you want DAQmx read to fetch will make it a blocking call that will halt execution there until they're available (or the timeout runs out).

Look at the example under the example finder "Voltage (with Events) - Continuous Input". Since the number of samples is event driven, the read call becomes non-blocking. I always use, 99%, this type of acquisition, that way my loop can respond to a stop event, or any other event without any blocking.

 

mcduff

0 Kudos
Message 13 of 14
(448 Views)

McDuff - this is way cool, and it might just save my bacon.  AND it teaches an old engineer some new tricks! Expect to get my hardware soon (gov't bureauracy) - will double down on this & try & squeeze what I can out of this box.  Lesson learned - card sample rate and total system latency are 2 very different things!  Very grateful for your help - paul

0 Kudos
Message 14 of 14
(425 Views)