Toggle

Functional reference for ToggleObject, including its runtime role and the supported settings available in the design environment.

Updated 3 min read
On this page (7 sections)
  1. Functional explanation
  2. Object name
  3. Variable
  4. Settings
  5. Position / Size
  6. Access Control
  7. Visibility

Functional explanation

ToggleObject is a switch-style control for ON and OFF behavior. It is intended for boolean commands and status interaction.

Typical decorators include variable binding, ON and OFF text, ON and OFF colors, visibility, access control, and animation attributes. The control is easiest to read when the original aspect ratio is preserved.

Use ToggleObject when a switch metaphor is more intuitive than a push button. It is a good fit for enable, auto, or mode selection states.

Object name

Set the object name shown in the toggle decorator context.

SettingDescriptionExampleUnits
Object NameName used to identify the Toggle object.AutoModeToggleText

Variable

Configure the variable bound to the toggle state. A click writes Set when switching on and Reset when switching off, so the field holds one writable variable name. The Variable button opens the variable list and fills in the selected name.

SettingDescriptionExampleUnits
VariableVariable bound to the toggle state and written on click.PLC1.AutoModeVariable name

Settings

Configure the ON and OFF text, colors, and animation bindings for the toggle object.

17 rows
SettingDescriptionExampleUnits
ON TextText shown when the toggle is on.ONText
OFF TextText shown when the toggle is off.OFFText
ON ColorColor used when the toggle is on.#198754Color
OFF ColorColor used when the toggle is off.#6c757dColor
ON Background ColorBackground color used when the toggle is on. A gradient can be used here as well as a single color; see the Gradients section of the Color Library article.#d1e7ddColor
OFF Background ColorBackground color used when the toggle is off. A gradient can be used here as well as a single color; see the Gradients section of the Color Library article.#f8f9faColor
ON Border ColorBorder color used when the toggle is on.#198754Color
OFF Border ColorBorder color used when the toggle is off.#6c757dColor
Font FamilyFont family used for the toggle text.ArialFont family name
Font SizeFont size used for the toggle text.14px
Font WeightFont weight used for the toggle text.400CSS font weight
Padding Left TextLeft padding applied to the toggle text.4px
Padding Right TextRight padding applied to the toggle text.4px
Width VariableAnimation binding for width.PLC1.ToggleWidthExpression
Height VariableAnimation binding for height.PLC1.ToggleHeightExpression
Top VariableAnimation binding for top.PLC1.ToggleTopExpression
Left VariableAnimation binding for left.PLC1.ToggleLeftExpression

Position / Size

Configure the position and size of the Toggle object.

SettingDescriptionExampleUnits
TopTop position of the object.100px
LeftLeft position of the object.220px
WidthWidth of the object.48px
HeightHeight of the object.24px
Z-indexLayer order of the object. Higher values appear in front of lower values.10Number

Access Control

Configure access control for the Toggle object.

SettingDescriptionExampleUnits
Access Control EnableEnables access control evaluation for the object.trueBoolean
Access ControlExpression controlling who can use or see the object.SYSTEM.UserGroups == "Operators"Expression
Access Control FilterCSS filter applied when access control is used to alter the object appearance.blur(0px) contrast(30%)CSS filter

Visibility

Configure the runtime visibility and blinking behavior for the Toggle object.

SettingDescriptionExampleUnits
VisibilityExpression controlling whether the object is visible.PLC1.ToggleVisibleExpression
BlinkExpression or boolean controlling toggle blinking.PLC1.AlarmActiveBoolean or expression
Blink SpeedBlink speed used during runtime.500ms
Blink OffsetBlink offset used to stagger blinking between objects.falseBoolean
Something missing or wrong in this article? Contact us