ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
06-17-2010 10:00 AM
Solved! Go to Solution.
06-17-2010 12:11 PM
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.
06-18-2010 04:14 AM
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.
06-18-2010 09:57 AM
@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.
06-18-2010 11:15 AM
Hi smercurio_fc,
Thanks for the answer. That's exactly what I want. Ok for the bug, i still have it on the LV 8.6. I tried something but it didn't work in a first time beacause of this bug and then it works apparently the same way than your program with the second cursor in free-dragging. You can see it attached. I don't know if it's very academic...
Best regards
MartinO.
06-18-2010 11:39 AM
@MartinO. wrote:
Hi smercurio_fc,
You can see it attached. I don't know if it's very academic...
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.