Data Acquisition Toolbox    

Starting Multiple Device Objects

With the Data Acquisition Toolbox, you can start multiple device objects. You may find this feature useful when simultaneously using your hardware's analog output (AO) and analog input (AI) subsystems. For example, suppose you create the analog input object ai and the analog output object ao for a sound card, and add one channel to each device object.

You should use manual triggers when starting multiple device objects since this trigger type executes faster than other trigger types with the exception of hardware triggers. Additionally, to synchronize the input and output of data, you should configure the ManualTriggerHwOn property to Trigger for ai.

Configure ai for continuous acquisition, call the action function qmoredata whenever 1000 samples are output, and call daqaction when ai and ao stop running.

As shown below, the action function qmoredata extracts data from the engine and then queues it for output.

Queue data in the engine, start the device objects, and execute the manual triggers.

You can determine the starting time for each device object with the InitialTriggerTime property. The difference, in seconds, between the starting times for ai and ao is

Note that this number depends on the specific platform you are using. To stop both device objects

The output from daqaction is shown below.


 Example: Performing a Linear Conversion  Digital Input/Output