12-04-2019 12:39 PM
How do I draw a line from a moving cursor to fixed point on XY graph? Do I need to insert into an array to add another element, then initialise the element to the fixed point?
How would I do this?
Many Thanks
12-04-2019 01:12 PM - edited 12-04-2019 01:17 PM
12-04-2019 01:14 PM
It's just another plot with two known points, right? What is moving the cursor (user? Code?)
Sorry, posting by phone. Cannot post example.
12-04-2019 02:19 PM
It depends if you mean by cursor "mouse cursor". You can draw a line based on the mouse coordinates without using the graph cursors. You simply use the corresponding event from the XY graph in an event structure and draw on one of the picture plane of the graph (I selected front) along with the proper invoke node to convert from XY graph to mouse coordinates. Below is an example using the "Mouse move" event and (0,0) as the fixed point. VI is attached in LabVIEW 2016.
12-04-2019 02:53 PM
Thanks for the replies, to clarify I'm trying to create a pendulum simulation on a XY graph. The Labview coding makes the cursor move on the graph, I'm trying to draw a line from the moving cursor to a fixed point so that it resembles a pendulum in motion.
12-04-2019 03:09 PM
Something like this:
12-04-2019 03:18 PM
Hi Tim,
Please can you attach the VI file of that image.
Thank you
12-04-2019 03:19 PM
it is a snippet. You can drag it into your block diagram. Save it to your desktop and drop it on your block diagram.
12-04-2019 04:41 PM