08-01-2015 07:13 PM
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?
12-16-2015 11:21 PM
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:
However, it will not work. It needs a simple workaround to circumvent the bug:
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