Measurement Computing Data Acquisition Systems rev.10.4 User Manual
Page 16

Driver Buffer Model Operation
The Driver Buffer Model allows the flexibility of the User Buffer Model in Circular mode without
the complication of having to manage the circular buffer at the application level. In fact, the
Buffer Model is simply a special case of the circular buffer mode in that the driver handles the
details of managing the circular buffer and “hands off” scan data to the application only when
the application requests it. The scan data is handed off to the application in easy to use and
manipulate linear buffers.
For more information on retrieving scan data from the Driver Buffer refer to Step 7,
Monitor
the Acquisition and Receive the Data.
Storing Data to Disk
Either buffer model allows the data to be streamed to a disk file in parallel to the transfer into
the User or Driver Buffer. To enable this the daqAdcSetDiskFile function needs to be invoked
before the acquisition is armed. When using this feature the scan data can be; appended to a
current file, overwrite a current file or create a new file.
With either the User Buffer Model or the Driver Buffer Model the driver performs the transfer
automatically. The format of the data in the disk file being written will be the same at it
appears in the buffer. This will normally be raw scan data. No header or channel configuration
information is stored in the raw data file.
Related API’s*
Description
daqAdcTransferSetBuffer
Sets up the scan data buffer for the transfer. The buffer can be
configured for either User Buffer or Driver Buffer modes. When
User Buffer mode is selected the buffer can be set up to be
either linear or circular in nature. The size of the scan data
buffer (in scans) is also set here.
daqAdcSetDiskFile
Sets ups and enables taking the transfer scan data to a disk file.
*See the
API Command Reference chapter for detailed information.
5. Arming the Acquisition and Starting the Transfer
Once the acquisition has been completely configured the acquisition can be armed. Arming
the acquisition means that device will be configured according to the previous steps already
outlined and the acquisition will taken from an “idle” to an “active” state. Once in the “active”
state the acquisition may begin looking for the Trigger Event or begin collecting pre-trigger
data (if pre-trigger has been configured). It is important to examine error return codes from
the daqAdcArm command. The daqAdcArm command examines the entire configuration for
any potential acquisition parameter conflicts.
err = daqAdcTransferStart(handle);
err = daqAdcArm(handle);
2-6 API Programming, General Models
988594
Programmer’s
Manual