Branches and OR Logic
A branch is a parallel path on a rung. Power flows through the rung if any one of the parallel paths is true. Branches are how Ladder Logic expresses OR.
Series = AND
Contacts placed in series on the same horizontal line are ANDed:
XIC(A)XIC(B)OTE(Out)
Out is energized when A AND B are both true.
Parallel = OR
Contacts placed in parallel branches are ORed:
[XIC(A),XIC(B)]OTE(Out)
Out is energized when A OR B is true.
Combining Series and Parallel
You can mix both on one rung. This is the classic start/stop seal-in:
[XIC(Fault),XIC(Alarm)]XIO(Reset)OTE(Alarm)
- When
Faultgoes true,Alarmenergizes. - The
Alarmcontact in the lower branch keeps the rung true even afterFaultclears — the alarm is now "sealed in". - Pressing
Resetbreaks the series path and dropsAlarmback to0.
Multi-Level Branches
A single branch can have more than two parallel paths — each path is another level:
[XIC(A),XIC(B),XIC(C)]OTE(Out)
Out is energized when A OR B OR C is true. Add as many levels as you need; the rung stays flat and readable.
Nested Branches
Branches can contain further branches. Keep nesting shallow — two or three levels. Deeply nested rungs become unreadable; split them into multiple rungs instead.
[[XIC(A),XIC(B)]XIC(C),XIC(D)]OTE(Out)
Out is energized when ((A OR B) AND C) OR D is true — the inner branch (A OR B) sits inside a path of the outer branch.
Adding a Branch in Rungs Studio
The Ladder Logic toolbar sits at the top of the editor. Use the branch tool in the toolbar to insert a parallel path on a rung. To add another parallel path to an existing branch, select a circuit and click the branch-level tool . Drop contacts into the new branch like any other instruction.
Tips
- Each branch should do one thing. If a branch gets long, promote it to its own rung.