LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Register for Events value change

Hello I would like to program an event Stucture with a "register for events (Value Change)".
The attached VI shows two loops.
The upper loop should be finished after the button get" Exit from project " pressed.

How can I do this?

Thomas
Download All
0 Kudos
Message 1 of 7
(3,424 Views)
You can use occurrences to accomplish this, but until you reveal more about where you're heading I can't give you other advise.

Hope it helps.

Regards,

André

Message Edited by andre.buurman@carya on 08-27-2007 10:51 AM

Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 7
(3,406 Views)
You set it up so the lower loop ends after Exit from Project is changed.  Both loops will end (if both are still running) when Exit from Basis is changed.



Randall Pursley
0 Kudos
Message 3 of 7
(3,401 Views)
Hi Andre:

thank you for your advice. Unfortunately I can not change the upper loop because this is part of a larger project. The only information I get is the "Event Registration Refnum". Can I use this RefNum to generate a value change event for "Exit from Basis" from the lower loop to end the upper loop. The upper loop should be retain unchanged.

Thank you in advanced.

Thomas
0 Kudos
Message 4 of 7
(3,378 Views)

Hey Thomas,

      I'm not sure I understand, but maybe this VI is on the right track - or will give you an idea.Smiley Happy

Cheers!

Message Edited by tbd on 08-28-2007 02:26 AM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Download All
0 Kudos
Message 5 of 7
(3,368 Views)

After some consideration, a temporary solution of another beginning came out.

This is no optimum solution, because it is static and works only, if the string "Project_start.vi" and "Exit" are not changed.

If somebody has a suggestion for a dynamic solution, I'll be happy.

Thank you Thomas
Download All
0 Kudos
Message 6 of 7
(3,314 Views)
The "Project_start.vi" string can be dynamically fetched by calling the VI server property "VI name" in the appropriate VI.

My solution to this problem:

The reference of the "Exit" Button can also be a constant wired to the subVI. Make it an action machine and put the reference in a shift register. this way when you change the label of the button your code doesn't change, The action machine has to actions: Store Exit Reference and Signal Exit Value Change.

Hope it helps,

André

Message Edited by andre.buurman@carya on 08-30-2007 05:15 AM

Regards,
André (CLA, CLED)
0 Kudos
Message 7 of 7
(3,306 Views)