Our online shopping is experiencing intermittent service disruptions.

Support teams are actively working on the resolution.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event value change

Hi, I'm using an event loop in a subvi where the event is 'value change' on a control. When i'm running it on the main VI it works, but if the event loop is in a sub VI it doesn't work.
 
If I change the value of the numeric control in the main VI, will the event loop in the sub VI catch that I changed the value ?
 
Thx
0 Kudos
Message 1 of 3
(2,267 Views)
Doyon,

no, it wont work the way you like. The event structure in "simple programming" can only trigger to changes of controls, which are placed on the frontpanel (FP) of the VI containing the event structure. So if you would display the FP of your subvi, you could use it to catch events from controls there.
Nevertheless, you CAN catch events from other vis, but you have to dive a little more into event driven programming. A general hint on how to solve your issue can be found in the last screenshot here.

hope this helps,
Norbert

EDIT: corrected link

Message Edited by Norbert B on 07-13-2007 09:29 AM

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 3
(2,265 Views)
If you wan to catch events for a top-level VI's controls in a subVI you have to pass a reference to the control to the subVI. Wire this reference to a node on a register for events function and select the kind of event you want (value change) by right clicking on the node. Finally, wire the reference output to the dynamic events terminal on the event structure. You can now create the value change event handler.

Mike...

Message Edited by mikeporter on 07-13-2007 09:17 PM


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 3 of 3
(2,240 Views)