08-03-2005 10:36 AM
08-04-2005 02:55 PM - edited 08-04-2005 02:55 PM
Hi jmoses-
You are correct- NI-DAQmx uses circular buffers for input operations and you have to be concerned about buffer contents and whether you're going to over- or underrun. NI-DAQmx is really great about not letting you do this; errors will be thrown whenever either conditions occur.
For buffer overrun errors you will see error -200279 that indicates when samples have been overwritten without being read from the buffer:
For buffer underrun errors (i.e. DAQmx Read timeout errors) you will see -200284 which indicates that samples you requested have not yet been acquired. By controlling the timeout of the DAQmx Read you can make the read function wait any amount of time before an underrun occurs.
Updating analog output operations on the fly requires that you disable onboard device regeneration to prevent the output buffer from looping and to allow new data to be read. You didn't indicate which ADE and DAQ board you are using, but there is a great LabVIEW example called "Cont Gen Voltage Wfm-Int Clk-Non Regeneration.vi" in the NI Example Finder (Help>>Find Examples in LabVIEW) under Hardware Input and Output>>DAQmx>>Analog Generation>>Voltage.
The property you need to set to disallow regeneration in C programming is "DAQmxSetWriteRegenMode" as documented in the NI-DAQmx C Reference Help (Start>>Programs>>National Instruments>>NI-DAQ).
Thanks-
Message Edited by Tom W. on 08-04-2005 02:55 PM
Message Edited by Tom W. on 08-04-2005 02:56 PM
07-11-2013 09:36 AM
https://engineering.purdue.edu/~aae520/Labview_manuals/DAQBasic.pdf
Search for keyword 'Circular'... This manual is pretty old version but it has presented the topic in great detail.