08-08-2013 10:56 AM
Hello.
And thanks in advance.
Im trying to set a limit mask on a graph in a similar way to the "Define" tab on the "Configure Mask and Limit Testing" express vi in labview 2012.
Does anybody know of a way of directly moving points of data on an xy graph at run time?
E.G.: Say there was an xy frequency plot with 10 points from 100Hz to 1000Hz and I want to change the value set at 200Hz.
I would like to use an xy graph controller, point my mouse pointer at 200Hz and dreg the point of data to my desired value.
Below is a screen shot of the above mentioned express vi. In it, you can pull the points on the white graphs where ever you want within
the graph.
It would be good if I could do the same on a normal xy graph
Any assistance will be appreciated
Thanks in advance
Chuck
Solved! Go to Solution.
08-08-2013 11:36 AM
How about this? The downside is having to create a finite number of cursors for your graph to begin with.
1. Create initial plot XY data. Cycle through the corresponding cursors and set their positions.
2. Allow dragging of the cursors. On timeout of the event structure, replot the 'new plot' line between cursor positions.
3. On pressing update, set the main plot data equal to the cursors positions.
LV2012 example attached.
08-09-2013 03:25 AM
That's' brilliant
Just the sort of thing I was looking for
I don't think I would have ever have got there on my own. I was thinking of changing the limit points by updating an array on my front panel but this is infinitely better.
Many thanks
chuck
08-09-2013 03:38 AM
You're welcome 🙂
The downsides with this (that I can think of anyway) include having to manually create a fixed number of cursors to begin with, and the ability to drag a point to a lower X value than the previous point in the array. The latter is soluble with a bit of work (allow dragging in Y only, and only update the Y axis for each point etc), but I can't think of a way around the former at the moment.
08-09-2013 03:47 AM
Those draw backs aren't a majour issue for me. The fact thay you can manovour the data points is a huge advantage so
Thanks again
chuck