beautypg.com

Example acquisition states – Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 116

background image

After the device’s FIFO has written m scans to a linear user allocated buffer, retCount equals m. The
current data write position (in scans) within the buffer is:

retCount

mod scanCount

where the operation mod is defined as the integer remainder of performing an integer divide of
retCount

by scanCount. The scanCount parameter is set by the daqAdcTransferSetBuffer

function.

If pre-trigger scan data has been configured (see daqAdcSetAcq), retCount will not
return available pre-trigger scans until the acquisition has been triggered.

Driver Buffer Mode (DatmDriverBuf) – The retCount parameter will return the total number of
unread scans in the driver allocated circular buffer. In this case, the retCount parameter represents the
amount of data that is currently available to be retrieved from the driver buffer. See
daqAdcTransferBufData

for more info on retrieving data from the driver buffer.

Example Acquisition States

The following table shows a number of different acquisition state combinations. These scenarios are
representative of some typical acquisition states but do not necessarily represent all of the possible states. The
table assumes a user-buffer mode with total scan count of 100000 scans.

States (active)

Progress

(retCount)

Description

DaafAcqActive +
DaafAcqTriggered +
DaafTransferActive

10,112

The acquisition is active and has been triggered and is currently collecting
post-trigger data. A transfer to buffer is also active and a total of 10112
scans have been collected so far.

DaafAcqActive +
DaafTransferActive

0

An acquisition has been armed but has not yet been triggered. If pre-
trigger data collection has been configured (see daqAdcSetAcq ), then
pre-trigger data may be being collected (retCount will not return
available pre-trigger scan counts until the trigger has occurred).

DaafTransferActive

0

A transfer has been configured and started (with the functions
daqAdcTransferSetBuffer

and daqAdcTransferStart), but

the acquisition has not yet been armed. The acquisition needs to be armed
using
daqAdcArm

.

DaafAcqActive +
DaafAcqTriggered

10,112

The acquisition is active and has been triggered, but no transfer is currently
active. A total of 10112 scans have been collected so far. This condition
will normally only occur if transfers are performed with linear buffers
while an acquisition is ongoing. This state represents a possible loss of
data if a transfer is not activated before the device overruns its internal
buffering.

DaafAcqTriggered +
DaafTransferActive

98,000

An acquisition has been triggered, but is no longer active. A transfer is
currently active. This sometimes will occur at the end of an acquisition if
the acquisition is complete but data is still being transferred from the
device.

DaafAcqArmed

0

The acquisition has been armed, but no transfer is currently active. This
situation may result in loss of data unless the application initiates a transfer
before the trigger occurs and the device overruns its internal buffering.

DaafAcqTriggered

100,000

The acquisition has triggered and has completed. The transfer is not active
and 10000 scans have been collected. So, both the acquisition and the
transfer are complete.

4.2-60 Daq API Command Reference

988594

Programmer’s Manual