Changing the Mechanical Action of a Boolean Object
Boolean controls have six types of mechanical action that allow you to customize Boolean objects to create front panels that more closely resemble the behavior of physical instruments.
Complete the following steps to change the mechanical action of a Boolean control.
When you place a Boolean control on the front panel, set the value of the control and click the Run button.
Right-click the Boolean control you want to change and select Mechanical Action from the shortcut menu.
Select the appropriate action for your application from the Mechanical Action palette. In the icons, M stands for the motion of the mouse button when you operate the control, V stands for the output value of the control, and RD stands for the point in time the VI reads the control.
Switch When Pressed changes the control value each time you click it with the Operating tool, similar to a light switch. The action is not affected by how often the VI reads the control.
Switch When Released changes the control value only after you release the mouse button during a mouse click within the graphical boundary of the control. The action is not affected by how often the VI reads the control.
Switch Until Released changes the control value when you click it and retains the new value until you release the mouse button. At this time, the control reverts to its original value, similar to the operation of a door buzzer. The action is not affected by how often the VI reads the control.
Latch When Pressed changes the control value when you click it and retains the new value until the VI reads it once. At this point, the control reverts to its default value even if you keep pressing the mouse button. This action is similar to a circuit breaker and is useful for stopping While Loops or for getting the VI to perform an action only once each time you set the control.
Latch When Released changes the control value only after you release the mouse button within the graphical boundary of the control. When the VI reads it once, the control reverts to the old value. This action works in the same manner as dialog box buttons and system buttons.
Latch Until Released changes the control value when you click it and retains the value until the VI reads it once or you release the mouse button, depending on which one occurs last.
Note You cannot use any Latch action in the same VI with a local variable because the first local variable to read a Boolean control with Latch action would reset its value to the default.