Parallel Branches¶
Parallel branches implement OR logic: if any path has power, the output energizes.
Structure¶
In this example: MotorRun activates if (Start1 OR Start2 OR SealIn) AND NOT Stop.
Creating Branches¶
- Select a rung
- Right-click → Insert Branch or drag a Branch from the palette
- Add additional paths with Add Path
- Place instructions in each path
- Paths are evaluated in parallel (OR)
Wrap an existing selection in a branch
If you select one or more elements first and then choose Insert Branch, the selected elements are wrapped inside the new branch (they become path 0 and a second empty path is added for you to fill in). See Ladder Editor → Context Menu for the full rules.
Nested Branches¶
Branches can be nested for complex logic:
Evaluation: (A AND (C OR D)) OR B → Out
Evaluation Rules¶
| Rule | Behavior |
|---|---|
| Elements in series | AND logic |
| Parallel paths | OR logic |
| Output coils | Can be placed at any position in a path |
| Empty paths | Pass power unchanged |
| Empty branches (no paths) | Evaluate to FALSE |
| Output instructions inside a path | Execute with the path's own power state; do not affect path continuity |
Layout: branches and right-alignment¶
The rung layouts inputs left-to-right and pins output instructions (OTE/OTL/OTU/timers/counters) to the right rail. A trailing branch follows the same rule conditionally:
- A branch that contains an output instruction in any of its (possibly nested) paths is pinned to the right rail — for the classic case where multiple coils are activated by the same logic, drawn as parallel coils at the end of the rung.
- A branch that contains only inputs / nested branches stays left-aligned with the rest of the inputs.
The engine treats outputs inside branch paths identically to outputs at the rung level: each output sees its own path's current power state and writes accordingly. The right-alignment is purely visual.
Warning
Be careful with deeply nested branches — they can become hard to read. Consider splitting complex logic across multiple rungs for clarity.