IAE Academy

FOR CORE AND IT JOBS · CHAPTER 3 OF 7

Ladder logic

This chapter reads a ladder rung as a Boolean equation and builds the standard circuits from it: start-stop with seal-in, set and reset coils, interlocks and the fail-safe stop. You write and fault-find these whenever a PLC runs motors.

Updated 30 Oct 2026

What you will be able to do

You will read a ladder rung as a Boolean equation and write the rung for an equation. You will build a start-stop circuit that holds itself on and say why its stop button is wired normally closed. You will use set and reset coils, interlock two motors and name the five IEC 61131-3 languages.

Before you start

  1. Chapter 2, Inputs, outputs and field devices

  2. Boolean algebra: AND, OR and NOT, and truth tables

  3. Counting cases: bits have combinations, and the cases where A or B holds number

Rungs, contacts and coils

A ladder rung is a line of elements between a left rail and a right rail. Power flow, a logical result rather than a real current, passes from the left rail through contacts to a coil on the right. A contact asks about a bit, and a coil writes a bit. The PLC repeats a cycle called the scan: it reads every input, solves the rungs from top to bottom, then writes every output. A coil's bit changes as soon as its rung is solved, so a lower rung in the same scan reads the new value.

Addresses are in IEC style: %I0.0 is an input bit, %Q0.0 an output bit and %M0.0 a memory bit. Some PLC families write them differently, such as I0.0 or X0. In equations, %I0.0 is written , %Q0.0 is , and so on. An input bit is 1 while its field contact is closed and 24 V reaches the input, and 0 while the contact is open or its wire is cut.

CONTACT PASSES POWER FLOW

For any contact. is the bit the contact is addressed to and is 1 when the contact passes power flow; and each take the value 1 or 0. A normally open (NO, examine-if-closed) contact passes when its bit is 1, a normally closed (NC, examine-if-open) one when its bit is 0.

SERIES IS AND, PARALLEL IS OR

For contacts and in series with in a branch across both. , , are their values of ; is 1 when power flow reaches the coil, which writes to its bit. Series contacts must all pass (AND); one passing branch is enough (OR, so ).

Rung

Element in order

Type

Address

Meaning

1

1

NO

%I0.0

Run A

1

2

NC

%I0.1

Inhibit

1

3, across 1 and 2

NO

%I0.2

Run B

1

4

Coil

%Q0.0

Output

By the two rules above, the equation of this rung is .

WORKED EXAMPLE

For this rung, find %Q0.0 when %I0.0 = 1, %I0.1 = 0 and %I0.2 = 0. Then find it when %I0.1 changes to 1.

Solution
  1. Contact 1 is NO on a bit of 1, so it passes. Contact 2 is NC on a bit of 0, so it passes too. Series is AND, so the pair gives .

  2. The branch is NO on a bit of 0, so it gives 0. Parallel is OR, so and the coil writes 1 to %Q0.0.

  3. Now %I0.1 = 1, so the NC contact 2 blocks. The pair gives , the branch still gives 0, so .

Answer: %Q0.0 = 1 in the first case and 0 in the second.

Seal-in, fail-safe stop, set and reset

A start push button springs back when you let go, yet the motor must keep running. So a NO contact addressed to the motor coil %Q0.0 sits in a branch across the start contact. Once the coil is on, this seal-in (latching) contact keeps the rung true after start is released. The stop contact is in series, so when it blocks, the rung is false. You choose each program contact by the bit value that should make the rung true. The stop button is an NC device on %I0.1: its bit is 1 while not pressed, 0 when pressed or its wire is cut. The rung must stay true while stop is not pressed, so the program reads it with a NO contact.

Rung

Element in order

Type

Address

Meaning

1

1

NO

%I0.0

Start

1

2, across 1

NO

%Q0.0

Seal-in

1

3

NO

%I0.1

Stop

1

4

Coil

%Q0.0

Motor

START-STOP WITH SEAL-IN

For this rung, solved once per scan; all values 1 or 0. on the right is the bit before the rung is solved (its value from the previous scan); is the value the coil writes.

Trace four scans. Start pressed, stop healthy: . Start released: , the seal-in at work. Stop pressed: . Stop released: , so nothing restarts the motor. Now compare an NC stop button read by a NO contact with a NO stop button read by an NC contact, and cut each one's cable.

Stop wiring

Bit at rest

Bit when pressed

Bit when cut

Motor on a cut

NC button, NO contact

1

0

0

Stops

NO button, NC contact

0

1

0

Runs on

In the second row the button can no longer stop the motor. A fault that stops the machine is the safe failure, so the first row is fail-safe wiring. That is why stop buttons are wired normally closed.

A set coil turns its bit on when its rung is true and leaves it on when the rung goes false. A reset (unlatch) coil clears the bit the set coil latched when its rung is true, and the bit stays cleared until set again. Together they hold a bit without a seal-in contact. If both rungs are true in one scan, the lower one is solved last, so it decides the bit.

SET AND RESET ORDER

For one set coil and one reset coil on the same bit. and are the set and reset rung results, and the bit before and after the two rungs (all 1 or 0). The lower rung acts last, so it wins when .

Rung

Element in order

Type

Address

Meaning

1

1

NO

%I0.0

Start

1

2

Set coil

%Q0.0

Motor

2

1

NC

%I0.1

Stop

2

2

Reset coil

%Q0.0

Motor

Here . The reset rung must be true when stop IS pressed, which gives bit 0, so by the same rule rung 2 reads %I0.1 with an NC contact and . With reset below set, : the seal-in equation again.

Interlocking and the IEC languages

An interlock stops two outputs from being on together, such as two motors that must never run at once (or the forward and reverse contactors of one motor). Here there are two motors. Each motor's rung is the start-stop rung with one more element in series: an NC contact addressed to the other motor's coil. Motor 1 is %Q0.0 with start %I0.0, motor 2 is %Q0.1 with start %I0.2, and one common NC stop button is on %I0.4.

Rung

Element in order

Type

Address

Meaning

1

1

NO

%I0.0

Start 1

1

2, across 1

NO

%Q0.0

Seal-in

1

3

NO

%I0.4

Stop

1

4

NC

%Q0.1

Interlock

1

5

Coil

%Q0.0

Motor 1

2

1

NO

%I0.2

Start 2

2

2, across 1

NO

%Q0.1

Seal-in

2

3

NO

%I0.4

Stop

2

4

NC

%Q0.0

Interlock

2

5

Coil

%Q0.1

Motor 2

INTERLOCKED RUNG FOR MOTOR 1

Rung 1, solved first, so is its value from the previous scan; all values 1 or 0. is 0 while motor 2 is on, so it blocks motor 1.

INTERLOCKED RUNG FOR MOTOR 2

Rung 2, solved second, so here is the value rung 1 has just written in this scan. All values 1 or 0.

WORKED EXAMPLE

Both motors are off and %I0.4 = 1. Both start buttons are pressed in the same scan, then released. Which motor runs, and does it keep running?

Solution
  1. Rung 1 is solved first, and is still 0 from the previous scan, so .

  2. Rung 2 reads the %Q0.0 = 1 that rung 1 has just written, so , though its start is pressed.

  3. After release, rung 1 gives , because the seal-in holds motor 1 on.

  4. Rung 2 gives , so motor 2 stays off.

Answer: Motor 1 runs, because its rung is solved first, and it keeps running after the buttons are released. Motor 2 stays off.

WATCH OUT FOR

The interlock reads output bits, not contactors: a welded relay output keeps its contactor on with its bit at 0. If both on at once would do damage, also wire each contactor's NC auxiliary contact in series with the other contactor's coil.

Ladder diagram is one of five languages defined by IEC 61131-3. A project can mix them, and all of them work on the same variables and addresses.

Language

Form and natural use

Ladder diagram (LD)

Contacts and coils; discrete logic

Function block diagram (FBD)

Linked blocks; analog loops

Structured text (ST)

IF, CASE, loops; calculations

Instruction list (IL)

One instruction a line; deprecated in the 2013 edition

Sequential function chart (SFC)

Steps and transitions; sequences

Check yourself

CHECK YOURSELF 1

A normally closed contact is addressed to %I0.3. For which value of %I0.3 does it pass power flow?

  1. (A)

    %I0.3 = 1

  2. (B)

    %I0.3 = 0

  3. (C)

    Both values

  4. (D)

    Neither value

Answer and solution

Answer: (B)

  1. An NC contact passes when its bit is 0, since .

  2. So it passes only when %I0.3 = 0.

CHECK YOURSELF 2

A rung has %I0.0 and %I0.1, both NO contacts, in series. A branch across them holds %I0.2 (NO) in series with %I0.3 (NC). The coil is %Q0.0. For how many of the 16 combinations of the four input bits is %Q0.0 = 1?

Answer and solution

Answer:

  1. The equation is .

  2. Each term is 1 for 4 combinations, since its other two bits are free.

  3. Both terms are 1 only when and : 1 combination.

  4. By the count of 'A or B': .

CHECK YOURSELF 3

A start-stop circuit has an NC stop button on %I0.1, read by a NO contact in the program. The motor is running when the stop button's cable is cut. What happens?

  1. (A)

    The motor keeps running

  2. (B)

    The motor stops

  3. (C)

    The motor speeds up

  4. (D)

    Only start stops working

Answer and solution

Answer: (B)

  1. A cut cable opens the circuit, so the bit reads 0.

  2. The NO contact for %I0.1 then blocks power flow, so the coil drops and the motor stops. This is the fail-safe result.

CHECK YOURSELF 4One or more options are correct

For the rung , with %I0.1 an NC stop button wired as in this chapter, which statements are true?

  1. (A)

    With %I0.1 = 1, releasing start leaves a running motor on

  2. (B)

    With %I0.1 = 0, pressing start does not turn the motor on

  3. (C)

    The seal-in contact is addressed to %I0.0

  4. (D)

    The seal-in contact is in series with the start contact

Answer and solution

Answer: (A), (B)

  1. A: the seal-in term keeps the sum at 1, and passes. True.

  2. B: makes the product 0 whatever the sum is. True.

  3. C: false, the seal-in is addressed to the coil %Q0.0.

  4. D: false, the seal-in is in a branch across (in parallel with) the start contact.