02-08-2018 12:35 PM
Hello,
I have an xy graph with some data on it and at least one cursor. I'm trying to set the location of the cursors based on some other data. I only know the x position of where the cursor should be. Is there a way to do this programatically? I've made a simple VI to demonstrate what I'm trying to do right now, but it isn't working. The way I'm doing it right now is just unbubdling the x position of the cursor and then putting that back into the cursor list, and this almost works. The cursor does change its location, but not to the correct x location that I try to set it. Do I need to also know the y value?
To reiterate, I want to programatically set the location of a cursor on an xy graph based only on the x location of where I want it.
02-08-2018 01:39 PM
I cannot view your VI, but you should be able to set the active cursor and then the x location using the a property node for the graph.
02-08-2018 01:52 PM - edited 02-08-2018 01:54 PM
Given an xy graph, the x-axis is not necessarily non-descending, so for any given x there could be an infinite amount of Y values.
In your case, the x-values are equally spaced, so simply use a waveform graph instead.
02-08-2018 02:13 PM
If you want to move the cursor based on some computed or set value, just write to the cursor position property. (if you have multiple cursor, set the active cursor first)
Attached is a simple example. See if it can give you some ideas.