From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a user-adjustable reference waveforms to a graph?

Solved!
Go to solution

I have an XY Graph in LabVIEW 2013 that displays two waveforms. I'm interested in visually comparing sections of those waveforms to an expected slope. Does anyone know a way to add a reference line/waveform to a graph, which can get manually dragged around the graph at run time?

0 Kudos
Message 1 of 3
(2,321 Views)
Solution
Accepted by topic author OneOfTheDans

How about another plot generated from two cursors?

 

When the cursors move, update the "reference" and re-plot.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(2,305 Views)

Good suggestion, thank you! Since my reference line has a fixed slope, I only needed one cursor instead of two.

 

Now I have an event case for Cursor Move that calculates 2 (x,y) pairs at the edges of the graph, such that a line between the two passes through the Cursor's (x,y) location.

 

The code is getting a bit involved to prevent infinitely growing auto-scale, and the fact my chart is log-log. But this still feels like the best solution.

0 Kudos
Message 3 of 3
(2,263 Views)