Easy I/O for DAQ Library Chapter 10
LabWindows/CVI Standard Libraries 10-16 © National Instruments Corporation
AIReadAcquisition
short error = AIReadAcquisition (unsigned long taskID, long scanstoRead,
unsigned short readMode,
unsigned long *scanBacklog,
short fillMode, double waveforms[]);
Purpose
This function reads the specified number of scans from the internal circular buffer established by
AIStartAcquisition.
If the specified number of scans is not available in the buffer, the function waits until the scans
are available. You can call AICheckAcquisition before calling AIReadAcquisition to
determine how many scans are available.
Parameters
Input taskID unsigned long
integer The task ID that was returned from
AIStartAcquisition.
scanstoRead long integer The number of scans that are read from the internal
circular buffer.
readMode unsigned
short integer Specifies whether scans are read from the circular
buffer in CONSECUTIVE_MODE or
LATEST_MODE.
fillMode short integer Specifies one of the following modes for the
waveforms array: GROUP_BY_CHANNEL or
GROUP_BY_SCAN.
Output scanBacklog unsigned long
integer Returns the backlog of scans that have been acquired
into the circular buffer but have not been read using
AIReadAcquisition.
waveforms double array Array containing the voltages acquired on the
channels specified in the channelString.
Return Value
error short integer Refer to error codes in Table 10-5.
Parameter Discussion
readMode specifies whether scans are read from the circular buffer in CONSECUTIVE_MODE or
LATEST_MODE. In CONSECUTIVE_MODE scans are read from the internal circular buffer
starting from the last scan that was read. Using this mode, you are guaranteed that you will not
lose data unless an error occurs. In LATEST_MODE the most recently acquired n scans are read