07-12-2009 03:14 PM
07-12-2009 03:38 PM
To Prevent numerous loop runs, I would advice using an event structure with the 'Cursor Move' event, and the data change event.
Ton
07-14-2009 02:17 PM
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
07-15-2009 01:10 AM
07-15-2009 04:13 AM
Alain,
...can you make it for LabVIEW 8.2?
Thank you
07-15-2009 04:17 AM
07-15-2009 06:44 AM
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,
07-15-2009 07:06 AM
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 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
07-15-2009 07:19 AM
07-15-2009 07:23 AM
Weird, strange 😞
I saw the breakpoint in your code.
Does the code halts at that point when releasing a cursor or not?