Overview: Demonstrates on using Counter Input count edges channel to perform frequency measurement.
Description: The accuracy is system dependent and varies with Measure Time (seconds) and the frequency of input signal. This method is not typically recommended on a board that supports frequency measurements or buffered edge counting. The time interval of the count in this method is software-defined and is thus non-deterministic, so if you are using a board that supports frequency measurements, it you would be better to use the standard method. Although, if the input frequency is high this method will be more accurate than the standard single counter method.
The counter will count edges on the input terminal of the counter specified in the Physical Channel I/O control. For more information on the default counter input and output terminals for your device, open the NI-DAQmx Help, and refer to Counter Signal Connections found under the Device Considerations book in the table of contents.
Requirements: LabVIEW 2012 or compatible. NI-DAQmx 15.5.1 or compatible.
Steps to Implement or Execute Code: 1. Specify Channel Parameters by selecting the Physical Channel which corresponds to the counter on which the count edges measurement will take place on the DAQ device. 2. Run this VI. 2. Monitor the Frequency indicator to verify the expected input frequency.
Block Diagram Steps: 1. Creates a Counter Input channel to count number of rising or falling digital edges. 2. Calls the Start VI to arm the counter and begin counting. The counter will be preloaded with the initial count. 3. Wait for the user-specified amount of time to start counting the edges. 4. The frequency of the input signal is the number of edges that occurred during the wait divided by the wait period. 5. Returns the value read by the counter until the stop button is pressed. 6. Aborts and clears the task. 7. Uses the popup dialog box to display any error occurs.
**This document has been updated to meet the current required format for the NI Code Exchange.**