LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Manually changing graph point data at run time

Solved!
Go to solution

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

 

 

 

 

 

 

0 Kudos
Message 1 of 5
(2,999 Views)
Solution
Accepted by Nickleback

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.

 

cursordrag.png

 

LV2012 example attached.

---
CLA
0 Kudos
Message 2 of 5
(2,989 Views)

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

0 Kudos
Message 3 of 5
(2,962 Views)

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.

---
CLA
0 Kudos
Message 4 of 5
(2,953 Views)

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

0 Kudos
Message 5 of 5
(2,945 Views)