Home Automation EZine
Volume 2 Issue 5
October 1997

Features
Uncle Phil - Part V
Introduction to Lontalk
What's In Our Future?
Home Network
CEBus Tools
Infra-Red Automation
HTML Environments
PLC Applications

Interviews
Joe Dada - SmartLinc
Columns
Brian Baker - CEBus
Dave Rye on X-10
Home Theater
What We Need Is ...
Editorial
Letters
Events

Home Automation Products & Services

Reviews
Plato HouseLinc
X-10 Signal Analyzer

Current Issue
EZine Archive

Return to Main Menu

 

HTINews Article
- Oct97 -
[HTI Home Page]
KEEP INFORMED OF THE LATEST NEWS
Sign Up for our Newsletter
[Click Message To Learn More]

PROGRAMMABLE LOGIC CONTROLLERS
----APPLICATION PROGRAMS----
By Eugene Kowch, PID Consultants, Inc.

"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."

Eugene R. G. Kowch, P.Eng. is a Control Systems Engineer with P.I.D. Consultants Inc.. Sixteen years of providing professional integrated design and construction support for industrial, commercial and residential projects. Is an active member of the Association of Professional Engineers and Geoscientists of British Columbia.
eugenek@pro.net
http://www.angelfire.com/wv/eugenek/PID.html


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.

Contacts

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.

Coils

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

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.