05-22-2013 09:23 AM
Is there a way to programmatically set a Boolean switch so that an event handler will act on it? I am using a GUI developed by another group, with producer/consumer structure, as part of a hardware validation. I want to create a separate vi that will control the GUI. Currently I can set the Boolean controls using an invoke node but the event handler does not react to them. My suspicion is that it is mechanical action of the Booleans. Is there a way to do this with out changing the mechanical action?
Solved! Go to Solution.
05-22-2013 09:25 AM - edited 05-22-2013 09:45 AM
Write to a signaling value property node (Val(Sgnl)).
Make sure to use value change events and not some other misguided thing like e.g. "mouse down", for example.
Currently I can set the Boolean controls using an invoke node but the event handler does not react to them.
How exactly were you setting a value with an invoke node. Are you sure you are not using a value property node?
My suspicion is that it is mechanical action of the Booleans. Is there a way to do this with out changing the mechanical action?
I would stay away from suspicions that can easily be tested and proven wrong (change mechanical action for a few seconds and see if it makes a difference ;))
05-22-2013 09:41 AM - edited 05-22-2013 09:42 AM
what is the mechanical action of the switch/latch? at what value of the switch/latch do you want this event to happen?
05-22-2013 03:09 PM
I am opening a reference to the VI I want to control and then using the method/control value/set variant setting of an invoke node.
I did find some labview documentation that states you can't use the signaling value property node on switches set to latch. Unfortunately I can't change the VI I am trying to control.
05-22-2013 03:28 PM
Well, a switch is typically switch action (thus the name!). You never said you are trying to use latch action booleans. 😄
Yes, local variables and value properties cannot be used for latch action booleans because they are reset to the default state when the terminal is read by the code, and if you would allow them to be read and set in multiple places, you'll generate a giant mess.
05-22-2013 04:48 PM