Example Code

Graph Limits Detection in LabVIEW

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
This example VI demonstrates how to check the limits of an XY Graph given a varying function and two arbitrary functions setting the limits.


Description
In LabVIEW you are able to check the limits of any functions given two arbitrary lines that work as boundaries inside of the graph itself. Two alarms are turned on and off based on whether the current value of the function is lower or higher than the limits set. The higher and lower template lines are defined by four points chosen by the customer, while the function being tested in this example is a sinusoidal. A subVI called "Limits" checks the value of each point to find if it falls inside or outside of the boundaries.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Unzip the attached folder to your computer
  2. Open the VI called "Graph Limits Detection LV2012 NI Verified.vi"
  3. Modify the coordinates that define the high and low template lines
  4. Run the VI
  5. Observe the lines in the graph and the LED on top turning on and off

 

Additional Information or References

VI Block Diagram

Graph Limits Detection LV2012 NI Verified.png

 

**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.