In the February 1997 issue of HTINews was an introductory article on programmable logic controllers (PLC). In that article the system hardware was explained, Input and Output Units (I/O) and the Central Processing Unit (CPU). This article will discuss the application programs for the PLC.

The application program is written in a language called ladder logic. Ladder logic comes from the electrical industry when relays were used to control equipment. Relays were energized from a power rail through a series of contacts that formed a rung. A number of rungs in turn formed a network. Below is an example of a standard across-the-line electrical diagram for a push button-activated motor start/stop circuit.

Pushing the motor start push button energizes motor start/stop relay R1and closes the contact to start pump motor M1. The motor auxiliary contact on motor start/stop relay R1 also closes, allowing the motor start/stop circuit to be latched ON. Two events can cause R1 to drop out:

* An overload (OL1) on motor M1
* The motor stop push button is pushed

Ladder logic programming consists of three general types of logic elements – contacts, coils, and shorts.


Control4 Home Automation
Contacts are used to pass or inhibit power flow in a ladder logic program. Four kinds of contacts may be used – normally open, normally closed, positive transitional and negative transitional.

The normally open (N.O.) contact passes power when the input is ON.

The normally closed (N.C.) contact passes power when the input is OFF.

The positive transitional contact passes power for only one scan as the input transitions from OFF to ON.

The negative transitional contact passes power for only one scan as the input transitions from ON to OFF.


A coil is either ON or OFF, depending on power flow. When a coil is ON, it either passes power to a discrete output circuit or changes the state of an internal contact. There are two types of coils – normal and memory-retentive.

The normal coil turns OFF when power is removed.

The memory-retentive coil comes back in the same state when power is restored for one scan.


Shorts are simply straight-line connections between contacts in a ladder logic network. A vertical short connects contacts one above the other in a network column. When two contacts are connected by a vertical short, power is passed when one or both contacts receive power. Horizontal shorts are used to expand a rung in a ladder logic network without breaking the power flow.

An implementation of the circuit using contacts, coils, and shorts in a ladder logic network is shown below.

The illustration above shows that the sequence of operation remains essentially the same when the pump motor start/stop circuit is designed for the PLC. The big difference is that all the I/O points are wired directly to the input/output units built into the PLC system and the actual control is programmed in ladder logic in the PLC. The ladder logic implementation allows greater flexibility of control and decreased development time, since all the hard-wiring between points of control is done electronically.