PLC Simulator
ladder logic
fundamentals
motor control

Seal-In Rungs in Ladder Logic: The Complete Guide

By PLC Simulation Software8 min read

Seal-In Rungs in Ladder Logic: The Complete Guide

If you have tried to make a motor run when you press a button and stay running when you release it, you have already hit the problem that the seal-in rung solves.

A seal-in rung (also called a latch rung or maintaining circuit) is a branch in ladder logic that places a normally-open copy of the output coil in parallel with the start contact. Once the output energises, it keeps itself energised through its own contact — so releasing the momentary start button does not de-energise the output.

Seal-in motor start-stop ladder rung with a MotorRun holding contact and series Stop and Overload contacts

Why You Cannot Just Use a Single Contact

A momentary pushbutton is closed only while you press it. If your rung is simply:

|--[StartButton]--[/StopButton]--( MotorRun )--|

The motor energises when StartButton is pressed. The moment you release it, StartButton opens, the rung goes false, and MotorRun de-energises. The motor stops. That is not a useful motor starter.

The solution is to give MotorRun a second path to stay true:

The Classic Seal-In Circuit

|--[StartButton]--+--[/StopButton]--[/Overload]--( MotorRun )--|
                  |
                  +--[MotorRun]---+

Because the generated rung diagram is drawn in series, the holding contact, Stop and Overload are shown in line below — but remember the MotorRun holding contact is wired as the OR-branch in parallel with the Start contact, exactly as the text diagram above shows.

Seal-in motor starter rung showing the MotorRun holding contact with normally-closed Stop and Overload contacts driving the motor coil

In text logic:

(* Seal-in motor starter *)
IF (StartButton OR MotorRun) AND NOT StopButton AND NOT Overload THEN
    MotorRun := TRUE;
ELSE
    MotorRun := FALSE;
END_IF;

Execution trace:

  1. Operator presses StartButton. The OR condition becomes true. MotorRun energises.
  2. Operator releases StartButton. Now MotorRun is already true, so MotorRun OR StartButton is still true. The rung remains true. The motor keeps running.
  3. Operator presses StopButton. NOT StopButton becomes false. The rung goes false. MotorRun de-energises. The motor stops.
  4. Next scan: MotorRun is false, StartButton is false — rung stays false. The seal-in is broken.

Plotted against time, the latch is obvious: a momentary Start pulse drives MotorRun high, it stays high through the seal-in after Start releases, and a Stop press drops it.

Seal-in latch timing diagram showing a momentary Start pulse latching the motor on and a Stop press dropping it

Conceptually this is a set/reset latch: Start sets the output, the seal-in branch holds it, and Stop or Overload resets it.

Seal-in rung modelled as an SR set-reset latch with Start as set, Stop and Overload as reset, and the holding contact as feedback

Safety Contacts: Always in Series, Never in Parallel

Notice that StopButton and Overload are placed in series on the rung, not in parallel. This is deliberate and safety-critical.

  • Series contacts are AND logic. Any one of them can break the circuit and stop the motor.
  • Parallel contacts are OR logic. Every one of them must be false simultaneously to de-energise the coil.

Always put your protective devices — stop buttons, overloads, E-stops, safety relays — in series on the rung. Never put them in the seal-in branch.

E-Stop Integration

A proper motor starter includes an Emergency Stop circuit. Typically the hardware E-stop is wired as a hardwired safety relay that cuts power to the output regardless of what the PLC program does. But at the software level you should also honour the E-stop:

(* Motor starter with E-stop, stop, and overload in series *)
IF (StartButton OR MotorRun)
   AND NOT StopButton
   AND NOT Overload
   AND NOT EStopFault THEN
    MotorRun := TRUE;
ELSE
    MotorRun := FALSE;
END_IF;

For a worked implementation of E-stop with monitored reset, see the E-Stop Reset scenario in the simulator.

Latch / Unlatch Coils: An Alternative Approach

IEC 61131-3 also provides dedicated latch coils — S (Set) and R (Reset) — that behave like SR flip-flops:

(* Using Set/Reset coils *)
IF StartButton AND NOT Overload THEN
    MotorRun := TRUE;   (* Set coil — latches ON *)
END_IF;

IF StopButton OR Overload THEN
    MotorRun := FALSE;  (* Reset coil — latches OFF *)
END_IF;

Allen-Bradley equivalents are OTL (Output Latch) and OTU (Output Unlatch). Siemens TIA Portal uses S and R coils in ladder.

Table of latch and unlatch coil names in IEC 61131-3, Allen-Bradley OTL/OTU and Siemens TIA Portal

Seal-In vs Latch/Unlatch: Which to Use?

| | Seal-In Branch | Latch/Unlatch Coils | |---|---|---| | Code visibility | All logic on one rung | Split across two rungs | | Power loss behaviour | Coil de-energises | Coil retains state (if retentive) | | Preferred for | Simple motor starters | Step sequencers, recipe selection |

Comparison table of the seal-in branch versus SET and RESET latch coils across logic layout, power-loss restart and stop placement

Side-by-side comparison of the seal-in rung and latch coil strengths for motor control and sequencing

Latch coils are retentive — they remember their state across a power cycle if the memory is configured as retentive. This is useful for batch recipes and sequence steps but dangerous for safety outputs. Use seal-in rungs for motor starters that should always restart safely after a power outage.

Common Mistakes with Seal-In Rungs

Checklist of seal-in rung design pitfalls including stop-button placement, fail-safe wiring, duplicate coils and scan order

Mistake 1: The seal-in branch is in the wrong place

(* WRONG — stop button is in the seal-in branch, not series *)
|--[StartButton]--[/StopButton]--( MotorRun )--|
                       |
                       +--[MotorRun]--+

In this layout, pressing StopButton breaks the direct path but the seal-in path — through MotorRun alone — bypasses the stop button. The motor will not stop. This is a wiring equivalent of bypassing a safety circuit.

Mistake 2: Multiple coils writing the same bit

If you have two rungs that both write MotorRun, the last one wins. Only the final rung execution result matters at output scan time. Structure your logic so only one rung controls each coil.

Mistake 3: Forgetting normally-closed contacts

StopButton in the rung should be a normally-closed (NC) contact ([/StopButton]) if the physical pushbutton is a normally-open (NO) switch. A stop button wired as NC/NC — hardware NC and software NC — means you get a fault if the wire breaks (the broken wire opens the circuit, which the controller sees as the stop button pressed). This is called fail-safe wiring and is covered in IEC 60204-1.

Ladder rung with a fail-safe normally-closed Stop contact in series with the motor coil

Building Your First Seal-In Rung

Flowchart showing how to build a seal-in rung step by step from the Start contact to the holding branch and motor coil

The Motor Start/Stop scenario in the simulator walks you through building this from scratch. You will write the seal-in rung, run it against the simulation, and the auto-grader will verify that:

  • The motor starts on a rising edge of the start button.
  • The motor stays running after the start button releases.
  • The motor stops immediately on the stop button.
  • The motor stops on the overload signal.

For a broader understanding of ladder logic structure, read How to Read Ladder Logic (Step by Step) or dive into the Latching and Sealing-In lesson.


Practice this yourself in the simulator — 3 scenarios free. No install. No credit card. Write real ladder logic against a live machine model in your browser.

Try the simulator free →

Share:X / TwitterLinkedIn

Practice this yourself in the simulator

Start with guided PLC practice in your browser. No install and no credit card required.

Start practising free

Related articles

electrical troubleshooting
fault finding

Electrical Troubleshooting: A Systematic 7-Step Guide

Learn a repeatable electrical troubleshooting method: establish the safe energy state, read the schematic, half-split the circuit, interpret voltage patterns, diagnose common motor-control faults, and verify the repair.

July 18, 2026 · 13 min read
ladder logic
data study

The Most Common Ladder Logic Mistakes — What 10,000 Graded Attempts Taught Us

We analyzed 10,272 graded ladder logic attempts on our browser PLC simulator. 58% of failures were an output that never turned on, 83% failed within two seconds of clicking Run, and the seal-in circuit was the single hardest concept. Full data study.

July 10, 2026 · 12 min read
communications
modbus

Modbus TCP vs Modbus RTU: Same Protocol, Different Cables

Modbus TCP vs Modbus RTU compared: both use the same register model and function codes, but RTU runs on serial RS-485 and TCP runs on Ethernet. This post explains the differences, the MBAP header, how to choose, and how to troubleshoot each variant.

June 13, 2026 · 9 min read