Overview:
Demonstrates on using pulse train from Counter Output as the sample clock source for the count edges event at the Counter Input channel.
Description:
The pulse train generated from Counter Output is internally routed to the sample clock source of the counter input.
Requirements:
- LabVIEW 2012 or compatible.
- NI-DAQmx 15.5.1 or compatible.
Steps to Implement or Execute Code:
- Specify all control values on the front panel corresponding to the counter channels to be used on the DAQ device.
- Connects the signal to be measured to the default PFI source pin of the Counter Input terminal.
- Run this VI.
- The number of edges counted is shown on the Waveform Chart on the front panel.
Block Diagram Steps:
- Creates a channel to count the number of edges.
- Sets the source of sample clock to be the digital pulses generated by the Counter Output and internally route the signal to the Counter Input.
- Call the Start VI to begin counting the edges.
- The counter will be polled continuously and display number of edges on the Waveform Chart.
- Call the Clear Task VI to clear the task and displays any error occurs.
Block Diagram Steps:
- Creates counter channels to generate digital pulses of defined frequency and duty cycle.
- Configures the pulse generation to be continuously sampling by using the DAQmx Timing VI (Implicit).
- Calls the Start VI to begin the pulse train generation.
- Loops continuously until the user presses the Stop button. Check for errors every 100 ms using the Is Task Done? VI.
- Call the Clear Task VI to clear the task and displays any error occurs.


**This document has been updated to meet the current required format for the NI Code Exchange.**
Justin Parker
National Instruments
Product Support Engineer