LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

access the properties of an xy-plot (eg: cursor x,y values, scale etc)

Is there a way to do the following:

- access the (x,y) coordinates of a plot cursor so that I can use them further in the program? I need to mark certain points in a plot and store them in an array. Right now I have to copy them by hand(!) from the cursor legend, and then paste them as the elements of the array.

-access the scale of the plot (set on autoscale), for example the y-scale? I would like to be able to run a while loop (where data is acquired) until the |max| of
the scale is above or under a specific value.

Thanks a lot!
0 Kudos
Message 1 of 3
(3,075 Views)
1. Create a property node for the graph and select the property "active cursor", expand the property node to another property and select cursor.position -> all elements...The two elements are the x and y position of the cursor you set active by wiring the index of the cursor to the active cursor property (0 is the first cursor...1 is the next etc.).

2. The Y scale maximum can be read from the Y scale range maximum property of the graph. Instead of using autoscaling and and decide when to stop by reading the current scale I would rather check the incoming aquired values directly though.
0 Kudos
Message 2 of 3
(3,075 Views)
You access the properties of an x-y plot by using a property node. Right click on either the front panel graph or diagram indicator and select "Create Property Node". You right click on the property node and can select properties and see the list of what's available for the x-y graph. Want you want is cursor position>cursor x, cursor position>cursor y and Y Scale>Range>Minimum, Y Scale>Range>Maximum. There is a shipping example called Zoom Graph.vi that shows these very things.
0 Kudos
Message 3 of 3
(3,075 Views)