beautypg.com

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

Page 41

background image

Programmer’s Manual

908494

Using Multiple Devices 3-5

Each device process is responsible for 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 and set the rate to be the same for all devices. (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 External TTL (DatsExternalTTL) or Hardware Analog

(DatsHardwareAnalog) and the set the sensitivity to be (rising, falling…) the same for all devices.
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 section deals with 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.

Note: In order for this method to work properly the actual acquisition scan rate settings need to be the

same for all devices. Be sure to check that the actual scan rates set are equal for all devices (see
daqAdcSetRate

and daqAdcGetFreq for more information on retrieving the actual scan rate

programmed for each device.

Master Clock Method

This method synchronizes the devices by setting all devices to run off a clock generated by a pre-selected
Master device. Here the Master device is configured for internal clocking of the acquisition pacer clock.
This pacer clock is then output by the Master device to the Slave devices that use the clock for acquisition
pacing. In this method, each Slave device is configured for external acquisition pacing and set for
immediate trigger. The Master device may be set for Analog Hardware, External TTL Level or immediate
triggering. Once armed, the Master device will not drive the pacer clock output until the trigger event
occurs. Likewise, the Slave units will not begin acquiring data until the external pacer clock pulses are
generated (even though they were set to trigger immediately. When using this method it is important to
ensure that the Master clock output is no faster than the largest minimum clock source for any of the Slave
devices.

As mentioned above, the DaqX API is a handle-based API. A handle-based API is an API that 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.