LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Specific Point Selection on X-Y Graph

Solved!
Go to solution

Dear All,

 

I am quite new to LabView and sorry for asking simple questions.

 

In my program, a detector (mounted on a translational stage) voltage output is being read as the stage is moved by constant stepsize (voltage is recorded at every step). According to the experimental conditions the voltage output trend may vary. No matter what the trend is, I should select a specific point (voltage) among all after the scan is finished and command the stage controller to move back to the corresponding position. In order to monitor the output, I have used X-Y graph to show the data point-by-point as the stage moves forward. As far as I know, there is no Method to Activate the Cursor on X-Y Graphs so I can select that specific (X,Y) (position,voltage)! Since the whole process is being done in a While Loop, I wonder if I should take out (after the loop is ended) the arrays containing all the data and plot them in for instance a Waveform Graph outside the loop so I can select the proper point OR there is a clever way of doing this?

 

Thank you for your time,

 

Kind Regards,

Arman

0 Kudos
Message 1 of 5
(2,934 Views)
Solution
Accepted by topic author ArmanLD

It is possible to add/remove cursors from a XY graph. I attached a small example. To get it as simple as possible I made a cursor myself (from XY graph cursor legend) and store the structure as a constant. Then it is just a simple write to the property (cursor list). If you browse the property list you see that there is also a way to fetch X,Y values.

0 Kudos
Message 2 of 5
(2,919 Views)

Dear Jarek,

 

Thank you for your very helpful response. As you mentioned, you have made the cursor structure and saved it as an array constant (if I'm right?), however, I wonder if there is another faster way of making the cursor structure?

 

Many Thanks,

Arman

0 Kudos
Message 3 of 5
(2,888 Views)

Hello Arman

 

Here you can check a couple of helpful links.

Click XY Graph and Add/Update Cursor

Adding Cursors to XY Graphs

 

However, you can get your own examples by going to ni.com/examples. Using the correct key words, you are going to find examples.

examples

 

Regards

Frank R.

0 Kudos
Message 4 of 5
(2,839 Views)

Dear Frank,

 

I greatly appreciate your help and thanks for the links which came handy to me.

 

Kind Regards,

Arman

0 Kudos
Message 5 of 5
(2,797 Views)