Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Wait Until Done 100ms Default

Solved!
Go to solution
Hello Everyone,
 
I am experiencing what has been referred to as the "DAQmx Wait Until Done takes an extra 100ms" issue.  I buffer 2ms of waveform in DAQmx Write and get an extra gift of 98ms of appended waveform from Wait Unit Done!   My question is how does one code around this?   How does one get exactly what they buffer and no more?
 
Sincerely,
Zach
0 Kudos
Message 1 of 3
(3,391 Views)

Hey super-neuron,

I believe that although you have to wait 100ms due to the polling process of the DAQmx Wait Until Done VI, this does not mean that the waveform will be generate for the whole 100ms duration. Since you are doing a finite generation, your DAQ device will simply generate the specified amount of data in your buffer and hold the last value while waiting for DAQmx Wait Until Done. Therefore, there is no need to worry about generating more data than what you have specified.

I hope this helps,

S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(3,362 Views)
Solution
Accepted by super-neuron
First off a clarification on the 100ms issue.  That is ONLY an issue with counter output's "Wait until done" behavior.  Due to hardware architecture, we poll the hardware every 100ms to check whether or not the pulse has completed.  This doesn't modify your output at all.

With that in mind, you should NOT be seeing any issues with AO.  AO has a dedicated timing engine and when you do a finite operation we only ouput the data you ask us to.  Lets take a look at what your VI is doing.  You want to ouput 10000 (sample rate) * .001 * 2 (since you're appending two waveforms) samples.  That works out to 20 samples, or 2 ms of data.  However, you aren't writing the number of samples to your Timing configuration VI.  The default is 1000, or 980 more samples, or 98 ms.

Just write the number of samples to your timing VI and everything should be good.
------
Zach Hindes
NI R&D
0 Kudos
Message 3 of 3
(3,351 Views)