Example Code

Edge Detection with Decimation

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

Coding that exemplifies how to add decimation to Edge Detection.

 

Description

This VI will detect edges on a digital signal and trigger on rising-only, falling-only, or both. Triggering can be decimated to require N triggers before providing an external trigger. Can be used inside a single-cycle timed-loop.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Set the desired number of edges and mode.
2. Select the Run button.
3. Change the mode and see the update on the graph.
4. Stop the VI with the Stop button.

 

Additional Information or References

Snippet.png

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.