02-11-2007 05:18 PM
I am trying to reference controls on a panel of another VI programmatically. When I parse the VI it is not running, so I do not get errors if I encounter a Boolean in latch mode by reading the value. Later, when it is running and I try to read or write to that Boolean it generates an error, but that is not when I want to handle the error. Is there some way to read what the mechanical action of a Boolean is? Is it possible to change it programmatically? I can not change anything on the target VI except the mechanical action, no adding event blocks looking for mouse clicks, etc.
Thanks,
--Matt02-11-2007 05:56 PM
@mviele wrote:
II can not change anything on the target VI except the mechanical action, no adding event blocks looking for mouse clicks, etc.
Changing the mechanical action is a significant edit change, so why are you arbitrarily disallowing anything else? 🙂
Easiest would be to exclusively use "switch action" booleans and simulate the latch action in code, e.g. reset it to false elsewhere using a local variable.
02-11-2007 11:56 PM
Don’t get hung up on the desire to edit the mechanical action it is not essential, I probably should not have included that in my post. My real need to the ability to detect the current mechanical action while the VI is stopped; everything else is just a bonus.
Thanks,
--Matt02-12-2007 04:52 AM
I will only make this suggestion because it seems that you want an edit-time feature (e.g. you want to be able to read the action when the VI is idle, which would not happen under a normal application).
You can get both the mechanical action and the latched value using the property node (and even change it), but these properties are private - they are not supported, they could disappear, malfunction or crash LV. In short, they give no gurantee and should only be used under specific circumstances (like development tools). To find out more details go the LAVA forums' VI Scripting forum.
If you do want to find this out when the VI is not idle, then I suggest simply relying on the error.