LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
peos

Programatically control Boolean Latch Action switches

Status: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined. 

The Latch action for button and switches can often be useful since they garantee that the set value stays on until it is needed, value is used only once, and they are automatically reset. Unfortunately these buttons cannot be manipulated programatically, only by hand.'

 

My suggestion is that latch button and swiches can be manipulated via property nodes. In write mode these switches can be set, and in read mode I can check the status. This will not reser the switch.

4 Comments
Mr.Mike
NI Employee (retired)

It is possible to programmatically toggle the latching behavior of the switch.  It's the Mechanical Action property.

 

You may need to turn on scripting to see the property.  In LabVIEW 2010 or 2011 follow these instructions.  For LabVIEW 8.6 or 2009 use these.


Unfortunately, this isn't available while the VI is running.  Some of the various Mechanical Actions need to be compiled differently.

-- Mike
Knight of NI

I think the user is asking to set/read the Value property node for Latching controls. While the Value property node is available, its datatype is a variant, and while you could wire a Boolean constant, an error indicator will show that you get an error when you try to read/write the Value property node of a Boolean whose mechanical action is latching. This article explains a bit further why you cannot do this: http://digital.ni.com/public.nsf/allkb/0774F8F0498017B886256F080066E2E3. I think this is unlikely to change due to the fundamental way the controls operate. 

peos
Member

NI says: "You cannot read or write Boolean values that are set with a latching mechanical action because race ..." But this is only a problem with reading, as this will reset the button. It should be possible to let my program set the button. 

 

A possible solution is to allow Property Node, but let the Value property to be Write only for latching action buttons.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined.