06-17-2015 01:36 PM
Hi,
I am having a weird issue with cursors on XY Graph. I am unable to grab the cursor and even when I manually put the X value in the cursor legend, the cursor sometime go to go to that X value. And the issue is very intermittent. The cursors work sometimes without any issue and sometimes I just cant grab and move them.
I have attached the vi here that I am having an issue with. Could anyone take a look at it and let me know if you are also having the same issue as me. See if you are able to move the cursors, snap cursor to different plots and still able to move the cursors.
Thanks,
LVCoder
Solved! Go to Solution.
06-17-2015 06:47 PM - edited 06-17-2015 06:49 PM
It looks like you're trying to make the third cursor on the list show the delta between the second and the first, right? i.e. Delta = Cursor1 - Cursor0
If this is what you want, change the ActCrsr index value on the second property node to a value of "2". It is currently "1".
This will set the Delta cursor to the be difference values that are calculated.
What's happening right now is you're subtracting Cursor0 from Cursor1 and then assigning that difference back to Cursor1. If this is done a few times in a row, you end up just dropping Cursor1 to (0,0).
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
06-17-2015 06:52 PM
oopss.. I changed it to cursor 2 and I still have the same issue.
06-17-2015 07:01 PM
What exact issue are you seeing? I changed it to cursor 2 and it seemed to work fine. I could use the arrow keys to move the cursors around and the delta was updating correctly, etc.
The only thing the code does is assign the location of cursor 2, so everything else should function as it normally does with cursors.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
06-17-2015 07:13 PM
Maybe you're seeing the cursor locking functionality? If you select a cursor in the list, it will highlight yellow and then won't move when you use the arrow buttons. This won't work for the Delta because you're programmatically setting it, but it works with Cursor0 and Cursor1.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
06-17-2015 07:40 PM
OK, I found the issue with the weird behaviour of the cursors. It is due to the free thrid cursors whose value is set programatically. Because I set its value equal to the difference of first 2 cursors, its value can be higher value of negative due to which the cursors don't behave properly.
To solve the issue I am removing the third cursor and placing 2 numeric indicators on the front panel to show the delta between 2 cursors
06-17-2015 07:45 PM
Ah, gotcha. Yeah, it would be nice to have the Delta right there, but I guess you run in to problems like that.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'