LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

interactive limit line

Hi,
I would like to create a GUI for drawing an interactive limit line where the x-y axis parameters are as well as display and control.
For simplification I have added a simple excel spreadsheet with graph. My target is to pint on the graph and drag the point wherever I like in the graph.
How do I accomplish this in LabView?
BR
Y3G
0 Kudos
Message 1 of 12
(3,971 Views)
Just use a cursor. Have you tried this? If so, is there something about it its operation that doesn't do what you need?
0 Kudos
Message 2 of 12
(3,958 Views)
Hi,
I checked the curser fonctions but don't think they hit the right target.
My target is to draw a "limit line". By interpolating several points I get a line. I would like to move the points in the X,Y-axis and receive there coordinates.
Is that possible?
Regards
Y3G
0 Kudos
Message 3 of 12
(3,937 Views)
Hi,
 
  the only way to do this is to create a second xy graph and make all background transparent
and with the property  make all scale the same, then create for the transparent  xy graph an array with the value of the line to trace.
if you want to see an exemple, let me know.
 
jacques
 
0 Kudos
Message 4 of 12
(3,935 Views)

and... I forgot to mention the transparent xy graph is place on top of your actual xygraph.

 

 

0 Kudos
Message 5 of 12
(3,932 Views)


@jjcimon wrote:
  the only way to do this is to ...

That statement is most likely incorrect. There is never only one way to do something! There is easily a handful ways to do this, and overlaying a transparent graph would probably be on the bottom of my list. Overlapping FP elements always create a redraw penalty and having to deal with multiple graph terminals on the diagram easily doubles the complexity of the code.

Here are some ideas:

  1. The cursor idea is certainly sound if you have a fixed number of points (e.g. 5). Just use a "cursor Move" event and draw a second plot that follows the cursor lines.
  2. Use a mouse down event, convert the mouse coordinates to plot coordinates and draw anything you want, either using the "plot images" overaly of the graph or generating another plot.
  3. ...

What is your LabVIEW version?

Message 6 of 12
(3,924 Views)
Here's a very simple example for the "cursor" solution. (LabVIEW 8.2)
 

Message Edited by altenbach on 09-01-2007 09:24 AM

Download All
Message 7 of 12
(3,922 Views)
Often, data is equally spaced so you should use a waveform graph and not an xy graph. The attached example shows a simple way how you could define limits by simply dragging on the graph (or alternatively changing them manually via a control).
 
Currently, it interpolates linearly between the 11 points of the limits cluster. This could easily be changed.
 
 
The VI shows how to convert easily between pixel and graph coordinates for the mouse events.
 
 
Also have a look in the "Waveform Monitoring" palette. You might be able to use some if it.

Message Edited by altenbach on 09-01-2007 11:02 AM

Download All
Message 8 of 12
(3,909 Views)

Thanks Altenbach,

Sounds very promising.

I tried to replicate it in LabView 7.1 but ran into problems with the Event structure (X-Y graph/Curser Move). Is it because of the LV version? Could you eventually downconvert it?

What do you have at< EventCase [0]>?

Regards

Y3G

0 Kudos
Message 9 of 12
(3,899 Views)
Sorry, you should have mentioned your version (maybe I missed it). I no longer have access to 7.1 and cursor events are not supported in older version.
 
You would need to do some polling. The way I did it long time ago was polling the cursors in the timeout state. Two additional event cases ("Graph: mouse up" and "Graph:mouse down") would switch the timeout between infinite and 20ms or vice versa. This way the polling only occurs if the mouse is down on the graph.
 
See how far you get. Good luck! 🙂
Message 10 of 12
(3,894 Views)