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

Using this model, each device needs to be opened and a device handle assigned. Here the Controlling
Process would open each device session according to the device inventory list (this can be interrogated by
inspecting the device inventory in the Daq Configuration utility located in the Control Panel of the
operating system). The Control Process would then pass each device handle to the appropriate Device
Process.
Note: While the above diagram does indicate the division of responsibilities within the application, the
application may be organized in any fashion desirable. The individual processes need not be
separate tasks or threads in order for the multi-device model to work well.
For discussion purposes, the responsibilities of the Controlling Process are as follows:
1. For each device, open the device session and retrieve the device handle (see daqOpen).
2. Pass each device handle to the appropriate Device Process so that the Device Process can configure
the acquisition for its device.
3. Interleave the data from each Device Process and update any outputs as required .
4. Optionally, write the input data from the devices and write the input data for each device to disk.
Each Device Process should configure its device by performing the following steps (in order):
1. Configure the channel scan group for the device including expansion channels (see daqAdcSetScan
for channel scan group configuration details).
2. Configure the acquisition for external pacing. (see daqAdcSetClockSource for details on scan
rate clocking from an external source).
3. Configure the acquisition mode to be a counted acquisition (DaamNShot) and set no pre-trigger and
set the post-trigger count to be the same for all devices ( see daqAdcSetAcq for details on
configuring acquisition mode parameters).
4. Configure the trigger event to be Analog Hardware (DatsHardwareAnalog) or External
TTL(DatsExternalTTL) if the acquisition is to begin on the detection of an external event. If it is
desirable, however, to trigger the acquisition immediately then use an immediate trigger
(DatsImmediate). Set the Stop Event to be counted (DatsScanCoun). See
daqSetTriggerEvent
for more details on configuring the Trigger and Stop Events.
5. Configure the buffer model to be used for the device. (see daqAdcTransferSetBuffer for more
details on configuration of the buffer model.
6. Initiate a transfer from the device (see daqAdcTransferStart) and arm the device to detect the
trigger event (see daqAdcArm ).
7. Monitor the status of the input data transfer and the acquisition (see daqAdcTransferGetStat)
and optionally pass data back to the Controlling Process.
Since this method is a synchronous operation, each device may be independently programmed with respect
to steps 1, 5, 6 and 7. However, in steps 2 through 4, configurations must be as specified.
3-8 Using Multiple Devices
908494
Programmer’s
Manual