This example demonstrates how to count digital events on a digital port of an M-Series card using correlated DIO.
This program correlates a digital input task to the analog input sample clock, creating a buffered hardware timed acquisition on a digital port. The program then compares samples from each port to the previous sample, and a change in a digital line increments a count value in software.
Steps to implement or execute code To implement this example:
Set the physical channel
Define the encoder setting
Define the timing parameter
Run the VI
(Optional) Turn on the Highlight Execution to see the flow of the VI
To execute this example:
Install the required software.
Connect the DAQ hardware
Confirm the connection with the MAX with TestPanel
Open the VI and refer the Implement Steps
Requirements Software LabVIEW 2012 or compatible NI-DAQmx 16.0 or compatible
Hardware cDAQ with C series or compatible
**This document has been updated to meet the current required format for the NI Code Exchange.**
Thank You Eric Reid National Instruments Motion R&D