Changing the Mechanical Action of a Boolean Object

LabVIEW 2018 Help


Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2015 Help
LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help

Boolean controls have six types of mechanical action that allow you to customize Boolean objects to create front panel windows that more closely resemble the behavior of physical instruments.

Note  When you assign a keyboard shortcut to the mechanical action of a Boolean control, the keyboard toggles the value. For example, when you assign a keyboard shortcut to a Boolean control and set the keyboard shortcut to one of the latching mechanical actions, the button unlatches when read.

Complete the following steps to change the mechanical action of a Boolean control.

  1. Add a Boolean control, such as a push button, to the front panel window.

  2. Right-click the Boolean control and select Properties from the shortcut menu to display the Boolean Properties dialog box.
  3. Click the Operation tab of the Boolean Properties dialog box.
  4. Select a button behavior appropriate to the application from the Button behavior list. An explanation of the behavior appears in the Behavior Explanation section, and you can test the selected behavior in the Preview Selected Behavior section.

    In the icons that appear in the Behavior Explanation section, M represents the motion of the mouse button when you operate the control, V represents the output value of the control, and RD represents the point in time the VI reads the control.
Note  You cannot use any latch action for objects with a local variable. If you configure your Boolean value with a latching mechanical action, the Value property and the Value (Signaling) property return an error when the VI is in a non-idle state, such as when the VI is running or reserved to run. Due to race conditions that can occur when you have a Boolean value with latching mechanical action, you cannot programmatically read Boolean values that are set with a latching mechanical action.

Refer to the Mechanical Action VI in the labview\examples\Controls and Indicators\Boolean directory for an example of Boolean control mechanical actions.

WAS THIS ARTICLE HELPFUL?

Not Helpful