This example program illustrates how to perform correlated DIO with a counter output task using the internal clock on the cDAQ-9172 and NI-DAQmx with support for LabVIEW NXG.
Correlated Digital IO enables the coupling of buffered digital tasks with the analog, counter/timer, or external clocks. The CompactDAQ 9172 chassis includes the capability of synchronizing digital input and output. The cDAQ-9172 chassis includes two on-board counters that can be used as external signals to correlate digital input and output.
Note 1: Make sure to select the internal counters on the cDAQ-9172 by selecting the appropriate I/O filtering name.
By default, the DAQmx physical channel control drop down menu will not list internal channels. To configure the DAQmx physical channel control drop down menu to include internal channels:
Right-click the DAQmx physical channel control in the front panel.
9. Select I/O Name Filtering
10. When the Filter Names dialog appears, check the Internal Channels check box.
11. Click OK and select one of the two counters of the form: cDAQ1/_ctr0
Note 2: Make sure to also verify that your DIO module is in slots 1 through 4 for buffered hardware tasks.
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.