10-25-2005 04:28 PM
10-26-2005 12:17 PM
10-26-2005 12:22 PM
Hello Defence,
What exactly are you trying to accomplish with your analog outputs? What questions do you have about buffering?
10-26-2005 12:45 PM
10-27-2005 11:16 AM
Hello defence,
You are correct that there is some hardware buffering taking place. Take a look at the Cont Gen Voltage Wfm-Int Clk-Non Regeneration.vi shipping example (this is the most relevant to your application). You can find this VI in LabVIEW by selecting Help >> Find Examples... and then browsing to Hardware Input and Output >> DAQmx >> Analog Generation >> Voltage >> Cont Gen Voltage Wfm-Int Clk-Non Regeneration.vi.
In this VI, the DAQmx Write.vi is called before the DAQmx Start Task.vi is called. This write VI fills the analog output (AO) buffer on the DAQ device with the number of samples specified in the "Size (Sample)" control before any generation has taken place. When the DAQmx Start Task.vi is called, the DAQ device begins generating the data in the AO buffer at the specified sample rate. In the next iteration of the while loop, the DAQmx Write.vi is called again. Again, it writes the set number of points to the AO buffer. However, this time the Write.vi will hold execution until all points are written to the buffer. For example. The default number of samples is 5000 and the sample rate is 20,000 S/sec. So in this case, the DAQmx Write.vi is called 4 times per second.
With Non-Regeneration enabled, you need to be sure to continuously write data to the AO buffer fast enough that there will always be data for the AO task to generate. If you are writing to the buffer at a slower rate than you are generating data, you will eventually empty the buffer, and receive a buffer underflow error.
Does this answer your question? Please let me know if you need any clarification on how AO buffering works.
Regards,
Sean C.