To download NI software, including the products shown below, visit ni.com/downloads.
Overview
The purpose of this code is to detect digital edges in software.
Description
The first example (Detect Digital Edge.vi) compares an x value and the previous x value to detect whether there has been a digital edge. You can use this example by feeding the current sample into X and the previous sample into X-1. Using this example, you can specify whether you are looking for rising or falling edges.
This second example (Detect Digital Edge Pt by Pt .vi) implements the same ideas explored in the first example, but instead stores the previous value of the digital signal in a shift register. This example also counts the number of digital edges.
Steps to Implement or Execute Code
Requirements
Software
LabVIEW Base Development System 2012 or compatible
Hardware
No hardware is needed if you are simulating a digital signal, but the user may add functionality to read a digital signal from a device.
Additional Information or References
VI Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange. **
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.