Multiple-Chassis Synchronization

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.

Acquire Synchronized Data Using CompactDAQ Devices

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.

Create a data acquisition session and add channels. Add one voltage input channel each from the two NI 9201 devices with IDs 'cDAQ1Mod1' and 'cDAQ2Mod1'.

s = daq.createSession('ni');
addAnalogInputChannel(s,'cDAQ1Mod1', 0,'Voltage');
addAnalogInputChannel(s,'cDAQ2Mod1', 0,'Voltage');

Choose terminal 'PFI0' on 'cDAQ1' as your trigger source and connect it to terminal 'PFI0' on 'cDAQ2'. Make sure the wiring on the hardware runs between these two terminals.

addTriggerConnection(s,'cDAQ1/PFI0','cDAQ2/PFI0','StartTrigger');

Note that you are using the chassis and terminal pair here, not device and terminal pair.

Choose terminal 'PFI1' on 'cDAQ1' as your clock source and connect it to terminal 'PFI1' on 'cDAQ2'. Make sure the wiring on the hardware runs between these terminals.

addClockConnection(s,'cDAQ1/PFI1','cDAQ2/PFI1','ScanClock');

Acquire data and store it in dataIn.

dataIn = startForeground(s); 

Acquire Synchronized Data Using PXI Devices

This example shows how to acquire voltage data from two devices using a shared trigger to synchronize operations within your session. PXI devices have a shared reference clock that automatically synchronizes clocking. You only need to add trigger connections to synchronize operations in your session with PXI devices. Analog input channels on all devices are connected to the same function generator.

Create a data acquisition session and add channels. Add one voltage input channel each from both NI-PXI 4461 devices with IDs 'PXI1Slot2' and 'PXI1Slot3'.

s = daq.createSession('ni');
addAnalogInputChannel(s,'PXI1Slot2', 0,'Voltage');
addAnalogInputChannel(s,'PXI1Slot3', 0,'Voltage');

Add a trigger connection to terminal 'PXI_Trig0' on 'PXI1Slot2' and connect it to terminal 'PXI_Trig0' on 'PXI1Slot3'. PXI cards are connected through the backplane, so you do not have to wire them physically.

addTriggerConnection(s,'PXI1Slot2/PXI_Trig0','PXI1Slot3/PXI_Trig0','StartTrigger');

Acquire data and store it in dataIn.

dataIn = startForeground(s); 

Plot the data.

plot (dataIn)

All channels are connected to the same function generator and have a shared reference clock. The signals are therefore overlapping, which shows perfect synchronization.

Was this topic helpful?