Example Code

Add Points to XY Graph using User Input and other cool features

Code and Documents

Attachment

Download All

Overview

This example VI utilizes property nodes and shift registers to add the points one by one to the graph as the user inputs them with the option to draw a line between the points in the order as they were added as well clearing the graph data

 

 

Description

This example VI utilizes property nodes and shift registers to add the points one by one as the user inputs them then they also have the option to draw a line between the points in the order as they were added and lastly they can clear the graph. Property nodes and shift registers are some of the most useful things you can learn in LabVIEW. You can tell by the screenshots how each case works. The add line function is just calling the Plot Interpolation property node that changes it from just points to a direct line. 

 

 

Steps to Implement or Execute Code

1. Run the VI "XY Graph Add Point_LV2012_NI Verified"
2. Enter the point coordinates and press on Add
3. Enter another point and click on Add then click on Draw Line
4. Click on Clear Graph to clear all data in the graph
5. Stop execution

 

 

Additional Information or References

Front Panel

FP.PNG

 

 Block Diagram

BD Add Event.PNG

 

BD Draw Line.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.