LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiplot Cursor Values

Hello, I have a XY graph with multiple plots and 2 cursors. Im trying to get the Y values of all plots for 1 cursor by swaping the active plot for that cursor reference and then getting each Y valus with the property. However, its not working sometimes, when dragging and randomly moving the cursor with the plot cursor legend button often gives incorrect values. I have read that ther is some kind of problem with that and a simple workarround is to get the cursor.index and then the values from the arrays, but it wont work for me since the arrays have diferent numbers of datapoints and ranges, so the same index will not correspond to the same X value. Some clue?

 

Multiplots.png

0 Kudos
Message 1 of 2
(3,686 Views)

Hi Antonio,

 

It took me a while to find the problem, but finally discovered it is a LabVIEW bug.

 

The code below is functionally equivalent to your code:

 Capture 1.PNG

However, it will not work. It needs a simple workaround to circumvent the bug:

Capture 2.PNG

What is required is a very small time delay between setting property "Plot" and reading property "PosY". The delay in this case is the Time Delay function with a time delay of zero!

 

Once I discovered this, I can see why you have convoluted code. It's all there to add a very small time delay. I suspect the intermittent behavior is due to the need for a slightly longer delay than the simple functions already there.

 

By the way, I'm using LabVIEW 2013.

 

Cheers,

Vito

Message 2 of 2
(3,240 Views)