Skip to content

OnOff

The OnOff operation manages an internal boolean state controlled by two inputs: On and Off. The resulting state is output in a configurable format — String, Integer, or Boolean. When both inputs are active simultaneously, the state toggles.

With neither On nor Off connected the state never changes, and the Editor flags the Node with a warning frame. An On value equal to the Off value makes Out the same whatever the state, and the Editor marks both fields with an info mark.

OnOff operation

Inputs

PortTypeRequiredDescription
OnAnyNoSets the internal state to true. Evaluated as boolean (non-Nil = true).
OffAnyNoSets the internal state to false. Evaluated as boolean (non-Nil = true).

Outputs

PortTypeDefaultDescription
OutString, Integer, or BooleanFormatted Initial StateCurrent state. Type follows the OnOff Type picker (Property-driven).

Properties

NameTypeDefaultDescription
OnOff TypeStackedDataSetStringOutput format for the state:
 StringOutputs configurable on/off strings:
  On ValueString"ON"Value when state is true.
  Off ValueString"OFF"Value when state is false.
 IntegerOutputs configurable on/off integers:
  On ValueInteger1Value when state is true.
  Off ValueInteger0Value when state is false.
Initial StateBooleanfalseThe initial boolean state when the task starts.
On ErrorComboStop this branchPer-op On Error verb (Stop this branch / Continue with the last value / Continue with the fallback). See the Error Handling guide.

State on Reload

Internal state and output are preserved across restarts within the configured time window. Persisted state takes priority over Initial State on reload. Saved state is discarded if the configured output type (String, Integer, or Boolean) changed. In that case the operation starts from Initial State.


  • Not connected: treated as false.
  • Boolean MessagePack: true = active; false or Nil = inactive.
  • Non-Boolean MessagePack: non-Nil = active; Nil = inactive.

OnOffResult
truefalseState becomes true
falsetrueState becomes false
truetrueState toggles
falsefalseState and output unchanged; path continues

OnOff Type: Boolean   On: true   Off: false

State becomes true.

Out: true


  • Controlling binary switch or device state (light on/off, valve open/closed).
  • Managing boolean flags within a workflow.
  • Creating latching mechanisms with configurable output formats.
  • Converting boolean logic to string or integer representations for external systems.

  • Only two inputs (On and Off) are supported; more complex state transitions require additional logic.
  • The operation does not have a Gate Input for execution control.