Skip to main content

Rungs and Power Flow

A Ladder Logic program is a stack of horizontal rungs drawn between two vertical power rails. Each rung represents one logical condition-and-action pair.

XIC(Switch1)XIC(Switch2)OTE(Lamp);XIC(DoorSensor)OTE(Alarm)

The left rail is the "power source". The right rail is "ground". The instructions between them decide whether power reaches the output on the right.

How a Rung Evaluates

  • Instructions are read left to right.
  • Contacts in series are ANDed together — power only flows if all are true.
  • Contacts in parallel branches are ORed — power flows if any branch is true.
  • If the rung is true, the output coil on the right is energized.

Rung 0 energizes Lamp only when Switch1 AND Switch2 are both 1 — contacts in series are ANDed. Rung 1 is independent: Alarm follows DoorSensor.

The Scan Cycle

A PLC runs in a loop called the scan:

  1. Read all physical inputs into memory.
  2. Evaluate every rung top-to-bottom, left-to-right.
  3. Write all output results to physical outputs.
  4. Repeat.

Because the entire program is re-evaluated every scan, outputs always reflect the latest input state. There is no "stuck" logic — a coil de-energizes automatically as soon as its rung becomes false (unless you use a latched output).

Rung Order Matters

Later rungs can override earlier ones, because the final write to an output is what reaches the physical terminal. If two rungs both drive Lamp, the lower rung wins. Avoid this by driving each output from exactly one rung.

Adding a Rung in Rungs Studio

The Ladder Logic toolbar sits at the top of the editor. Use the rung tool to insert a new rung. Click it to add a rung below the currently selected rung, or drag it onto the program to drop a rung where you want it.

Summary

  • Rungs evaluate left-to-right, top-to-bottom, every scan.
  • Series = AND. Parallel = OR.
  • Outputs re-energize every scan based on current conditions.
  • Each output should be driven by a single rung.