LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extrating cursor value

Solved!
Go to solution
I had a version with Demo mode.  I will put it back in.  I will reorganize a bit better and try the While loop.  If I still have problem, I will post it again.  Thank you.
0 Kudos
Message 11 of 23
(1,925 Views)

To Prevent numerous loop runs, I would advice using an event structure with the 'Cursor Move' event, and the data change event.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 12 of 23
(1,923 Views)

Hello,

I attached a demo VI of my project.  The VI generate an impedance and reactance plot on tap 3.  The Data are randomly generated.

 

I implemented the ActCrsr like suggested by Alain.  I can extract both Xs and Ys values of the cursors.  The two Xs should be equal and represent the frequency.

I also try to figure out how to implement the Event Structure like suggested by Ton, which I will like to do.

 

In the Event Structure;I set an Event for when the value of the cursor X (frequency) change value but how to make it work?  How to refresh the value ( I tried a While Loop but no success).

 

I will like also to have two other cases inside this structure that will execute if Inductive is True or Capacitive is True.  I tried to add case when Inductive is True but the only choice is when "Value Change"???

 

I put some code to calculate Xc and Xl.

 

My goal will be to display a drawing model of resistance in parallel with a capacitor or a resistance in parallel with an inductor.

 

Thank you again

 

 

0 Kudos
Message 13 of 23
(1,899 Views)
Solution
Accepted by topic author fmethot
Message 14 of 23
(1,884 Views)

Alain,

...can you make it for LabVIEW 8.2?

 

Thank you

0 Kudos
Message 15 of 23
(1,880 Views)
0 Kudos
Message 16 of 23
(1,878 Views)

Bonjour Alain,

 

OK, I will never delete Timeout again.

 

...I don't see the values updating when the cursor is release?

Is the CASE 1 is functional as it is?

 

Regards,

Download All
0 Kudos
Message 17 of 23
(1,869 Views)

Hello François,

 

Can you place a break point on the wire between CursIdx and the case selector in the event state "XY Graph": Cursor Release"?

Just to be sure that the code passes there 🙂

As you can see in the three attached screenshots, the code is working on my PC with LV 8.5.

I know the cursor handling wasn't available in LV 7.1 😞

But I don't when it came available. Was it in LV 8.2 or later I don't know Smiley Sad Someone else?

 

I found a work around for LV7 version since I already used such cursor move stuff at that time.

So if you still encounter problems I can dig up that "old" software and post it also.

But first please try the breakpoint.

 

Regards

Alain

 

Download All
0 Kudos
Message 18 of 23
(1,860 Views)
I am running on LV8.5 from another computer.  No change in the X cursor location???
0 Kudos
Message 19 of 23
(1,854 Views)

Weird, strange 😞

 

I saw the breakpoint in your code.

Does the code halts at that point when releasing a cursor or not?

0 Kudos
Message 20 of 23
(1,849 Views)