LabVIEW

cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Limit graph cursor movement

Solved!
Go to solution

Hi, I was wondering if there is any way to set limits on cursor movement. I am using two cursors for setting the lower and upper limits of which data to save out of an array. Presently in my event structure on cursor move, I just compare the positions explicitly and if it is out of range I reset it to the position of the other cursor +- a little offset.

 

This still allows the cursors to move past each other, until the event loop gets around to pushing them back into place. I was wondering is there a better way to handle their limits?

0 Kudos
Message 1 of 4
(2,981 Views)

You can set the Cursor values Fixed by feeding fixed cursor values, Is your Cursor Range Changes based on your data?

Snippet of developed code will be useful for better guidance.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | เฎชเฎดเฎฉเฎฟเฎตเฏ‡เฎฒเฏ เฎคเฎฟเฎฐเฏเฎตเฏ†เฎ™เฏเฎ•เฎŸเฎฎเฏ
LabVIEWโ„ข Champion |Certified LabVIEWโ„ข Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 4
(2,954 Views)
Solution
Accepted by topic author ConnerP

No need to reset anything. Just use min&max to use the smaller as lower limit and the larger as upper limit. Irrespective of cursor order.

 

(Also note that "cursor index" is a better value than "cursor.position.x" to select subsets. I assume you are already doing that. I typically also disable "cursors scroll graph".)

0 Kudos
Message 3 of 4
(2,951 Views)

doh รข€“ Thoughts From Faithe

 

Yes, just min/max'ing the cursors makes way more sense.

Just for the sake of curiosity though, is there a way to set a limit on the movement of a cursor? (Within the view of the graph, not talking about auto-scroll.)

0 Kudos
Message 4 of 4
(2,935 Views)