What is the mechanical action of a boolean?

This answer is taken from the LabVIEW Wiki, a great resource for LabVIEW information.

Boolean controls have mechanical actions, which control how activation with the mouse affects the value of the control. A mechanical action allows the control to mimic certain physical actuators (e.g. a light switch or an emergency stop button).

The six types of mechanical actions are:

You can change the mechanical action of a boolean by right-clicking on it from the front panel.

The mechanical action not only changes how a control reacts to user input, it also affects how control values can be access from the block diagram if set to any of the Latch actions. The changes are visible when looking at the Value property of the control. While it is possible to just access the Boolean value for switch actions, the type for latch actions changes from Boolean to Variant. The reason for this is, that the latching behavior would cause race-conditions if it was read in multiple places on the block diagram. This is, why only the control returns the actual Boolean value, but not the property node.

In order to access the Boolean value for latch type controls, an event structure must be used.

Print Friendly, PDF & Email