Chapter 2 Function Reference — DAQ_Check
©
National Instruments Corporation 2-115 NI-DAQ FRM for PC Compatibles
DAQ_Check
Format
status = DAQ_Check (deviceNumber, daqStopped, retrieved)
Purpose
Checks whether the current DAQ operation is complete and returns the status and the number
of samples acquired to that point.
Parameters
Input
Output
Parameter Discussion
daqStopped returns an indication of whether the data acquisition has completed.
0: The DAQ operation is not yet complete.
1: The DAQ operation has stopped. Either the buffer is full, or an error has occurred.
retrieved indicates the progress of an acquisition. The meaning of retrieved depends
onwhether pretrigger mode has been enabled (see DAQ_StopTrigger_Config). If
pretrigger mode is disabled, retrieved returns the number of samples collected by the
acquisition at the time of the call to DAQ_Check. The value of retrieved increases until
it equals the count indicated in the call that initiated the acquisition, at which time the
acquisition terminates. However, if pretrigger mode is enabled, retrieved returns the offset of
the position in your buffer where the next data point is placed when it is acquired. When the
value of retrieved reaches count-1 and rolls over to 0, the acquisition b egins to overwrite old
data with new data. When NI-DAQ applies a signal to the stop trigger input, the acquisition
collects an additional number of samples indicated by ptsAfterStoptrig in the call to
DAQ_StopTrigger_Config and then terminates. When DAQ_Check returns a status of 1,
retrieved contains the offset of the oldest data point in the array (assuming that the
acquisition has written to the entire buffer at least once). In pretrigger mode, DAQ_Check
Name Type Description
deviceNumber i16 assigned by configuration utility
Name Type Description
daqStopped i16 indication of whether the data acquisition has
completed
retrieved u32 progress of an acquisition