beautypg.com

External clock method – Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 43

background image

Programmer’s Manual

908494

Using Multiple Devices 3-7

The Master Device Process should configure the Master 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 internal pacing. This setting will be the pacer clock setting for all

devices in the system. (see daqAdcSetRate and daqAdcSetClockSource for details on scan
rate clocking configurations).

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 (DatsScanCount). 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, steps 2 through 4 need to be set as specified.

External Clock Method

This method synchronizes the devices by sharing the same external clock source. In this method, each
device will pace its acquisition on the same external TTL clock source. Here, the external clock source
provided can be no faster than the largest of the minimum external clock interval on the system (see
previous table).

As mentioned above, the DaqX API is a handle-based API. A handle-based API is an API which assigns a
unique handle to each device in use. As in the single device scenario, each device needs to be opened
using the daqOpen function. Each device should be opened using the alias name given to the device in
the Daq Configuration Utility located in the Control Panel of WindowsNT/2000/XP operating system. As
each device is opened a new, unique handle for each device is generated and returned by the daqOpen
function. The handle is a unique identifier for each device and should be used when referencing DaqX
functions for the device.

Using this model, each device needs to be configured using the appropriate handle for the device. Some
configuration parameters may differ but some parameters need to be configured specifically for this
method.

Using this model, each device needs to be uniquely configured using the appropriate handle for the
device. The acquisition of the data for each device also is managed independently for each device.

The following diagram shows how the application should operate for two devices.