This example shows how to acquire voltage data from two devices, each on a separate CompactDAQ chassis, using a shared trigger and clock to synchronize operations within your session.
You can synchronize multiple CompactDAQ chassis in a session using one chassis to provide clocking and triggering for all chassis in the session. Clock and trigger sources are attached to terminals on the chassis, itself. All modules on the chassis as well as other connected devices, are synchronized using these signals.
Create a data acquisition session and add channels. Add
one voltage input channel each from the two NI 9201 devices with IDs
s = daq.createSession('ni'); addAnalogInputChannel(s,'cDAQ1Mod1', 0,'Voltage'); addAnalogInputChannel(s,'cDAQ2Mod1', 0,'Voltage');
your trigger source and connect it to terminal
Make sure the wiring on the hardware runs between these two terminals.
Note that you are using the chassis and terminal pair here, not device
and terminal pair.
your clock source and connect it to terminal
Make sure the wiring on the hardware runs between these terminals.
Acquire data and store it in
dataIn = startForeground(s);