Boolean controls: Difference between revisions
Add sections for Boolean text and Mechanical action |
Add more contents for Boolean text |
||
Line 12: | Line 12: | ||
[[File:BooleanText.png]] | [[File:BooleanText.png]] | ||
The Boolean text is a set of up to four strings that can represent the state of the Boolean control. If the text is visible it also toggles the value of the control when clicked. | |||
The Boolean text can be set manually, or via the | The Boolean text can be set manually in the properties dialog (only the first two elements), or via the <code>Strings[4]</code> property of the control (all four elements). | ||
[[File:BooleanTextProperty.png|border|String property for Boolean text on a Boolean control]] | |||
{| class="wikitable" | |||
! Index | |||
! Description | |||
! Control state | |||
|- | |||
| style="text-align: center;" | 0 | |||
| Displayed when the control is '''on'''. | |||
| [[File:BooleanTrue2010.png|border|True]] | |||
|- | |||
| style="text-align: center;" | 1 | |||
| Displayed when the control is '''off'''. | |||
| [[File:BooleanFalse2010.png|border|False]] | |||
|- | |||
| style="text-align: center;" | 2 | |||
| Displayed when the control is transitioning from '''on''' to '''off'''. | |||
| [[File:BooleanTrue2010.png|border|True]] -> [[File:BooleanFalse2010.png|border|False]] | |||
|- | |||
| style="text-align: center;" | 3 | |||
| Displayed when the control is transitioning from '''off''' to '''on'''. | |||
| [[File:BooleanFalse2010.png|border|False]] -> [[File:BooleanTrue2010.png|border|True]] | |||
|} | |||
If only the first string is set, it will be used for all states (constant). | |||
<br clear="all"> | |||
== Mechanical action == | == Mechanical action == | ||
Revision as of 18:55, 19 July 2019

Boolean controls and indicators are available on the Boolean controls palette. The number of available controls varies depending on the selected style. All controls and indicators on this palette, except Radio Buttons, return or display Boolean values.
Boolean text
All Boolean controls can display a Boolean text to describe the current state (i.e. ON/OFF):
The Boolean text is a set of up to four strings that can represent the state of the Boolean control. If the text is visible it also toggles the value of the control when clicked.
The Boolean text can be set manually in the properties dialog (only the first two elements), or via the Strings[4]
property of the control (all four elements).
If only the first string is set, it will be used for all states (constant).
Mechanical action
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:
The latch behavior can not be used if the control has a local variable on the block diagram.