LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cursor index

I am trying to track the move of a cross cursor on a plot, and tell if the cursor is passing some data points.

 

I found when I move cursor continously, the value of cursor index change discontinuously. That is it not follow 5, 6, 7, but may be 5, 6.5, 8.

 

The resolution of the screen may not exactly match the grid value of the plot.

 

To judge if the cursor passing a data point, I have to check if there is any data point within the data range of (CursorIndex + deltaX, CursorIndex - deltaX) . DeltaX may equal to 1.5.

 

But the most important is I cannot get the accurate deltaX and deltaY. I just test(try move slowly) and get it.

 

Is therer any accurate method to acquire deltaX and deltaY. Any suggestion, thanks.

0 Kudos
Message 1 of 4
(3,156 Views)

How do you track the changing of the cursor?

I advise you to use an event called 'Cursor Move' Every time the user moves the cursor this event is triggered so it should work for you.

But be aware, the event can be triggered thousends of times per second so make sure the event finishes fast.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 4
(3,151 Views)
Just move mouse slowly, then see the value in cursor event change. 
0 Kudos
Message 3 of 4
(3,138 Views)

I'm not really sure what you want to accomplish, but if you want to detect passing a certain value with the cursor you can also check if

1) old cursor value is < CursorIndex and new cursor value is >= CursorIndex

or

2) old cursor value is > Cursor Index and new cursor value is <= CursorIndex.

 

Hope this helps

 

0 Kudos
Message 4 of 4
(3,129 Views)