LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use a Graph Control to enter data?

Solved!
Go to solution

I have a GUI that contains a graph control.  By making use of the Graph events I have been able to add and delete a data point on my graph by right clicking on the graph control and then handling the event in the vi...no problem.  What I'd really like to do now is to allow the user to pick a data point on the graph and drag it to a new position, thus providing an easy way for the user to define a given waveform...I'm stuck! 

 

I'm using LabVIEW 2009.

0 Kudos
Message 1 of 5
(2,724 Views)
Solution
Accepted by topic author steveADI

Have you concidered using the cursors to help you out?

 

Cursors can be dragged so logically (in your code) associating the cursor with a data point you can use the cursor to move the point.

 

Bonus functionality for cursor is if you show the cursor legend the user can key in the values.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 5
(2,716 Views)

You would need to use cursors. You can use one cursor and have it set up to snap to points. You move the point by actually moving the cursor, and responding to cursor move events. See this example: Interactive X-Y Graph Plot Editor.

 

 

EDIT: See? Ben had the same idea.

Message Edited by smercurio_fc on 04-09-2010 08:56 AM
Message 3 of 5
(2,711 Views)

Two Knights in Two minutes... Then is MUST be right. Smiley Tongue

 

Ben

 

PS I think there is a shipping example that uses the Picture control to edit signals...was it intended for use with the arbitrarary waveform generator?

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 5
(2,705 Views)

Thanks for the advice.

 

I used the cursors originally to add and delete  data point from the XY graph, I followed your advice to use the cursor to modify the waveform too.  It's all up and running now and runs pretty smoothly. Shame there's no way to directly pickup a data point though from the curve..

 

 

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