Chapter 03 multipleboards, Overview, Asynchronous operation of multiple devices – Measurement Computing Data Acquisition Systems rev.10.4 User Manual
Page 37: Using multiple devices 3

Programmer’s Manual
908494
Using Multiple Devices 3-1
Using Multiple Devices
3
Overview…… 3-1
Asynchronous Operation ……3-1
Synchronous Operation ……3-1
Asynchronous Operation of Multiple Devices …… 3-1
Synchronous Operation of Multiple Devices ……3-3
Internal Clock Method…… 3-4
Master Clock Method…… 3-5
External Clock Method……3-7
Overview
This chapter applies to all devices that can be used with the DaqX API. The purpose of this
chapter is to show how devices can be used concurrently in either a synchronous or
asynchronous fashion. Devices that have the ability to trigger from an external source or be
clocked by an external source have the ability to be used in a synchronized system.
Asynchronous Operation
Asynchronous operation of devices is defined as the inability to synchronize the input of data
between separate main unit devices. Data acquired with the devices is independent and the
time-skew between devices is non-deterministic.
In the following sections, both synchronous and asynchronous operation will be covered.
However, since synchronous operation requires more care in configuration most of the
remaining material in the chapter will cover synchronous operation of multiple devices.
For either synchronous or asynchronous operation modes device configuration and data
handling is very similar to the single device scenario. The DaqX API is a handle based API.
This means that each device session has a handle assigned to it when it is opened. This
device handle is then used to configure and acquire data from a device by referencing the
device handle when calling the appropriate DaqX API functions.
Synchronous Operation
Synchronous operation of devices is defined as having the ability to synchronize the input of
data between separate main unit devices. Data between devices is not time-skewed or the
time-skew between devices is deterministic.
Asynchronous Operation of Multiple Devices
All DaqX compatible devices may be run concurrently in an asynchronous manner. When
using the devices concurrently in an asynchronous manner the programming and data
collection techniques are very similar to the single device Here, the triggering events, stop
events and clocking of the input can be different between the devices.
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 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 diagram below shows how the application should operate with two devices
(designated as Device0 and Device1).