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: 

Programmatically Read Y Values For A Multiplot Cursor

Solved!
Go to solution

I am trying to programmatically read the multiplot cursor Y values from 2 (or more) separate plots but my numbers do not agree with those in the cursor legend. The simple test VI I created does not work as I was expecting. Is there something wrong in the code? Or a better way of doing what I am trying to accomplish ?

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

I think this does what you want:

Multiplot Cursor Readback_BD.png

Note the second loop isn't important - it was just easier for me to test this way (I could stop generation but move the cursor and get updates).

I think this is probably a bug in LabVIEW - you should open a service request.

It seems like when you set the Plot property, it doesn't update for the call to PosY in the same node, but Property Nodes are supposed to execute from the top down.

Separating the calls into two nodes (I added a 20ms wait here, but whilst typing this I tested 5ms and that worked too. Removing the waits broke the behaviour again) allows what you're looking for.

 

As to an alternative, if you have access to the data on the graph, you could look up values based on your shared X location, or you could create two cursors (one per plot) and then move the second to always sync with the first (using an Event Structure, for example) then their Y readings should be correct. Or you can just do this ^^.


GCentral
Message 2 of 3
(1,985 Views)

This works. Thank you.

0 Kudos
Message 3 of 3
(1,844 Views)