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 DataAcquisition.
You can synchronize multiple CompactDAQ chassis in a DataAcquisition using one chassis to provide clocking and triggering for all chassis in the DataAcquisition. 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 DataAcquisition and add channels. Add one voltage input channel each from the two
NI 9201 devices with IDs
d = daq("ni"); addinput(d,"cDAQ1Mod1",0,"Voltage") addinput(d,"cDAQ2Mod1",0,"Voltage")
cDAQ1 as your trigger
source, and connect it to destination terminal
cDAQ2. 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
cDAQ1 as your clock source,
and connect it to destination terminal
Make sure the wiring on the hardware runs between these terminals.
Acquire data and assign it to
dataIn = read(d,seconds(1),"OutputFormat","Matrix");