From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extrating cursor value

Solved!
Go to solution

I will like to extract the values of the cursors?  Is it possible?

I am ploting the reel and imaginary part of the input impedance (Z11 calculated from the S parameter) on a X Y graph.  If I could get the cursors values (frequency, impedance and reactance) of both traces, I could calculate the equivalent circuit at the cursor position.

 

Thank you

Message Edited by fmethot on 07-12-2009 05:47 AM
0 Kudos
Message 1 of 23
(6,440 Views)

Using property nodes you can do that

First set the cursor you want then read the "Cursor.Position" property.
See attached partial screenshot.

 

Hope this helped 🙂

0 Kudos
Message 2 of 23
(6,430 Views)

...yes, I found it.  I was exploring the Create and Property Node...

 

Thank you

0 Kudos
Message 3 of 23
(6,426 Views)
...but when I change the position of the cursor, the values are not refresh.  I have to run the VI again to get the new values.  How can I update the values without re-runing the program?
0 Kudos
Message 4 of 23
(6,416 Views)
..The Cursor X and Y position are not refresh too?
0 Kudos
Message 5 of 23
(6,413 Views)

To help you on this one I should see your vi since it worked well for me!

Changes mad by user are directly reflected in the property node.

 

 

I just looked again at you code and that's not what I posted Smiley Sad

You need to first set an active cursor with property ActCrsr and then read the cursor position with Cursor.Position

So please try again using the correct code. 

Message Edited by Alain S on 07-12-2009 04:55 PM
0 Kudos
Message 6 of 23
(6,386 Views)

Alain,

 

I attached the VI.  This is my first program and it is not finish.  It will not run on your computer because some file are missing to drive the network analyzer.  You will be able to modify the section for the cursor and post it back.  I appreciate your help.

 

After extracting individual S parameter, I first convert the S11 or S22 for plotting on a Smith chart (which I have a ratio problem).  In the same FOR LOOP, I convert S to Z and used only the Z11re and im impedance to plot and calculate R, L and C.  I detect the sign of the Z11im and applied the XL or XC formula.

 

I will like to move the cursor and show if it is a L or a C with the value (to be done).  I bring up the actcrsr and Cursor position but don't know what to do....

 

With the Cursor Index, I extracted the value with an Index Array for the Frequency, the reel part and the imaginary part of the graph at the cursor position...but this work once when RUN.

 

Thank you

François

0 Kudos
Message 7 of 23
(6,373 Views)

Bonsoir François,

 

I propose that you extract only the graph WITH data and put it in a new vi so that I have real data to work with 🙂

 

You should not read the "ActCrsr" property but write which cursor you want information from.

Then read the cursor location with the "Cursor.Position" property.

 

Regards

Alain

Message Edited by Alain S on 07-12-2009 07:22 PM
0 Kudos
Message 8 of 23
(6,369 Views)
Of course nothing refreshes in your program. You don't have a loop anyplace. Place a while loop around the property nodes so that they can be read over and over again. Place the loop someplace after the data is acquired.
0 Kudos
Message 9 of 23
(6,360 Views)

Absolutely Dennis, I noticed that also!

That's why I asked for a new vi with only the graph with usefull data.

By then modifying the VI he would have seen what's wrong in his code 🙂

0 Kudos
Message 10 of 23
(6,353 Views)