ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple cursors for one plot

Solved!
Go to solution
Hi everybody,

I'm trying to put multiple plots on my XYGraph. I need then that for instance cursor1=f(cursor0).
Is it possible ? If it's not what are the alternatives ?

Best regards.

MartinO.
0 Kudos
Message 1 of 6
(4,170 Views)

OK, I just want to check to see if I'm understanding what you're asking correctly. You have a graph with multiple plots. You want multiple cursors. You want one cursor to be moved so that its location is some sort of operation on the location of another cursor. So, let's say you have 2 cursors. So, for example you'd want cursor 2 to have its location to be cur2[x] = cur1[x] * 2, cur2[y] = cur1[y] *3.

 

There is no automatic mechanism for doing this. You'd have to move the other cursors yourself by responding to graph events. See the shipping examples on graphs and cursors. Help -> Find Examples. One of them is called "Programmatically Control Cursors", which can get you started. 

 

Off-hand, would the other plots be those f(cursor)? If so, why don't you just tie the other cursors to the specific plots? This can be done directly with the graph. 

0 Kudos
Message 2 of 6
(4,151 Views)

Thank you for your reply.

this is exactly what I was asking. cursor2[x] = a*cursor1[x] and cursor2[y] = b*cursor1[y] but only for one plot.
You can see a photo of what I'm talking about for a better understanding.
You tell me that there is no way to link the cursors automatically ...?

I already watch this example but I'm going to watch it again. I'm new on LV and I don't understand everything.

Best Regards
MartinO.

0 Kudos
Message 3 of 6
(4,137 Views)
Solution
Accepted by MartinO.

 


@MartinO. wrote:


You tell me that there is no way to link the cursors automatically ...?


Yes, that's what I'm saying. You have to do it yourself. See attached example (LV 8.2). Note that the second cursor is a free cursor rather than linked to a plot. There's a bug with setting the Y position of a cursor that's linked to a plot. Not sure if it's been fixed - you can contact NI with the CAR that's given in the message in the link I provided.

 

Message 4 of 6
(4,112 Views)

apparently

 

0 Kudos
Message 5 of 6
(4,103 Views)

 


@MartinO. wrote:


Don't know. There's usually more than one way to perform a task. The bottom line, though, is that you have to update the second cursor yourself.

 

0 Kudos
Message 6 of 6
(4,094 Views)