LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I calculate the delta between 2 cursors on an xy graph

I have an xy graph with two sets of cursors: cursor0 and cursor1. I want to calculate the delta between cursor0 y position and cursor1 y position. I have created a cursor y position property node that gives me the y position of cursor1, but how do I get the y position for cursor0? There does does not seem to be any mechanism for selecting which cursor the property node references.
 
Thanks
John
0 Kudos
Message 1 of 5
(5,167 Views)
There will not be individual properties for each cursor you define.  Rather you need to select which cursor you want to obtain the property information from before you poll for it.
0 Kudos
Message 2 of 5
(5,158 Views)

Well the first thing you have to do is set the active cursor, this where you are getting stuck with only cursor 0. In the attached .jpg you will see how I did it.

1. set active cursor to 0 = cursor 0

2 get x data

3 set active cursor to 1 = cursor 1

4 get x data

5. subtract both = delta x

 




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 3 of 5
(5,150 Views)
There is a more rapid solution : you can read all the cursors attributes in a single property node call, then extract the info you need, as shown in the attached picture.
 

Message Edité par chilly charly le 08-29-2005 09:24 PM

Chilly Charly    (aka CC)
Message 4 of 5
(5,136 Views)
Great feedback - thanks for all the help guys!
 
John
0 Kudos
Message 5 of 5
(5,120 Views)