Machinery TwinDocs

Transition reference

Variable thresholds, timers, and positionDone, plus evaluation order rules.

Transitions belong to a state and are evaluated in order, every tick; the first satisfied condition switches to its target state immediately.

Variable

Fires when variable <op> threshold is true, with op one of > < >= <= ==.

The bread-and-butter condition, and the doorway for external events: watch a PLC-fed variable in Online mode (PartPresent == 1) or a simulated sensor variable in Simulation mode.

Timer

Fires after N seconds in this state. The timer starts when the state is entered and resets on every entry.

Use for dwells (curing, sealing, settling) and for pacing a demo sequence.

PositionDone

Fires when Position actions complete. The watch action can target one specific action, the first of any actions to finish, or wait until all position actions in the state are done.

This is the "move finished → next step" glue of every motion sequence.

Ordering rules

  • Priority is the list order. Put emergency/abort conditions first: a state with [Alarm == 1 → Fault, timer 5s → Next] aborts correctly; the reverse order can miss the alarm if both are true in the same tick.
  • Conditions are level-based, not edge-based. If the condition is already true when the state is entered, the transition fires on the next evaluation. Design like PLC logic: guard against "falling through" a step by using conditions that only become true within the state (e.g. a positionDone of this state's move).
  • Self-transitions re-enter the state, resetting its timer and restarting its position moves.

On this page