Synchronize with PFI on CompactDAQ Chassis Without Terminals

This example shows how to use the external trigger and external clock functionality on a CompactDAQ chassis without PFI terminals, by using the PFI terminals on digital I/O CompactDAQ modules.

Some CompactDAQ chassis (e.g., NI 9174 and 9172) do not support built-in triggers, because they do not have external BNC PFI connectors on the chassis itself. However, the PFI pins for these chassis can be accessed through a digital module such as the NI 9402.

%% Setup
% cDAQ 9174
% cDAQ2Mod3 is 9402
% cDAQ2Mod4 is 9201

%% For the start trigger
s = daq.createSession('ni');
[data,timestamps] = startForeground(s);

%% For the external scan clock
% Function generator provides 100 kHz clock to PFI1 terminal on NI 9402
s = daq.createSession('ni');
s.Rate = 100E+3;
[data,timestamps] = startForeground(s);