Overview
This VI provides an example of how to synchronize two counter input tasks on a single 660x Timing and Digital I/O Device.
Description:
The VI would executes in the orders. The VI internally routes a Dummy CO Pulse Frequency Task and uses the Internal Output as a source for the sample clock and the digital trigger.The orders of the execution would be :
- Create a Dummy Counter Output Task by reserving one of the counters. This will be used to share the Sample Clock and Trigger.
- Create a Counter Input channel to Count Events. The Edge parameter is used to determine if the counter will increment on rising or falling edges.
- Call the DAQmx Timing VI (Sample Clock) to configure the sample clock timing parameters .The Sample Clock Source determines when a sample will be inserted into the buffer.
- Create a DAQmx Trigger property node to setup the ArmStart Trigger parameters.
- The counter will be continually polled until the Stop button is pressed on the front panel.
- Call the Clear Task VI to clear the Task.
- Use the popup dialog box to display an error if any.
Steps to Implement or Execute Code:
To implement this example:
- Set the Channel 0 and Channel 1 Counter Parameters
- (Optional) Set the rest of the parameters as needed
- 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 that supports the Counter features
- Confirm the connection with the MAX with TestPanel
- Open the VI and refer the Implement Steps
Requirements
Software
LabVIEW 2012 or compatible
NI-DAQmx 9.0 or compatible
Hardware
cDAQ with C series Counter Module




**This document has been updated to meet the current required format for the NI Code Exchange.**
Jason M.
Applications Engineer
National Instruments