Quantcast
Channel: Multifunction DAQ topics
Viewing all articles
Browse latest Browse all 6878

DAQmxWriteAnalog64 is blocking, must counters be running?

$
0
0
We are using NIDAQmx and the DAQmxWriteAnalog64 function.  The application is written in VB6 so uses the C interface to NIDAQ.
 
We understand that DAQmxWriteAnalog64 is a blocking function, and that multiple calls will generate error 200292 if later calls do not wait until earlier calls are completed.  The NI message for 200292 is “Some or all of the samples to write could not be written to the buffer yet. More space will free up as samples currently in the buffer are generated.”
 
We are using counters to control the output of the buffer.  We use the clock rate of the counters to set the frequency of the output buffer waveform.
 
The question is this: 
If the counters are stopped, and then the DAQmxWriteAnalog64 function called, can the DAQmxWriteAnalog64 function complete if there is space in the buffer, or is the function suspended/blocked until the counters are restarted, irrespective of the state of the buffer?  
 
This is a subtle point, let me restate it another way.  Is the following pair of statements true:
If room in the buffer is available, the function should complete whether or not the counters are running.
If not enough room in the buffer is available, then the function should not complete whether or not the counters are running, and it should raise error 200292.
 
Thanks.
 
 
 

Viewing all articles
Browse latest Browse all 6878

Trending Articles