取消
显示结果 
搜索替代 
您的意思是: 

How do I use a Graph Control to enter data?

已解决!
转到解答

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 项奖励
1 条消息(共 5 条)
2,801 次查看
解答
接受人 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
2 条消息(共 5 条)
2,793 次查看

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
3 条消息(共 5 条)
2,788 次查看

Two Knights in Two minutes... Then is MUST be right. 吐舌表情

 

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
4 条消息(共 5 条)
2,782 次查看

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 项奖励
5 条消息(共 5 条)
2,733 次查看