Discussion:
DAQmx Wait Until Done 100ms Default
(too old to reply)
super-neuron
2008-08-08 20:40:09 UTC
Permalink
Hello Everyone,
 
I am experiencing what has been referred to as the "<a href="http://forums.ni.com/ni/board/message?board.id=250&amp;view=by_date_ascending&amp;message.id=22080#M22080" target="_blank">DAQmx Wait Until Done takes an extra 100ms</a>" issue.&nbsp;&nbsp;I buffer&nbsp;2ms&nbsp;of waveform in DAQmx Write and get an extra gift of 98ms&nbsp;of appended waveform from Wait Unit Done!&nbsp;&nbsp; My question is how does one&nbsp;code around this?&nbsp;&nbsp; How does one get&nbsp;exactly what&nbsp;they&nbsp;buffer and no more?
&nbsp;
Sincerely,
Zach


example_3.vi:
http://forums.ni.com/attachments/ni/250/42210/1/example_3.vi
S_Hong
2008-08-11 23:40:09 UTC
Permalink
Hey super-neuron,
I believe that although&nbsp;you have to wait 100ms due to the polling process of the&nbsp;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&nbsp;will simply generate the specified amount of data in your buffer and hold the last&nbsp;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,
Zach Hindes
2008-08-12 14:40:26 UTC
Permalink
First off a clarification on the 100ms issue.&nbsp; That is ONLY an issue with counter output's "Wait until done" behavior.&nbsp; Due to hardware architecture, we poll the hardware every 100ms to check whether or not the pulse has completed.&nbsp; This doesn't modify your output at all. With that in mind, you should NOT be seeing any issues with AO.&nbsp; AO has a dedicated timing engine and when you do a finite operation we only ouput the data you ask us to.&nbsp; Lets take a look at what your VI is doing.&nbsp; You want to ouput 10000 (sample rate) * .001 * 2 (since you're appending two waveforms) samples.&nbsp; That works out to 20 samples, or 2 ms of data.&nbsp; However, you aren't writing the number of samples to your Timing configuration VI.&nbsp; 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.
Loading...