Relay Ladder Logic

04/01/1998


Ladder diagrams, or Relay Ladder Logic (RLL), are the primary programming language for programmable logic controllers (PLCs). Ladder logic programming is a graphical representation of the program designed to look like relay logic. This convention goes back to the early days of PLCs when electricians and technicians were trained in relay logic and expected to troubleshoot these new devices as well.

The drawings show both the similarities and differences in the two types of programs. The relay logic drawing shows switches electrically connected to coils-solenoids, pilot lights, etc. The ladder diagram uses contacts to represent the switches, or any input, and the coil symbol to represent an output. A line showing an input or several inputs and an output is known as a rung.

The relay diagram used electrical continuity to show a rung as electrically closed. Ladder logic programming shows the results of a status check of the inputs and outputs where the conditions are true or not true. The original intent of RLL was to provide a way for the controller to solve logic sequences involving discrete signals.

Basic and function block rungs
The top rung of the ladder diagram shown represents a basic rung of logic. It consists of a set of input condition instructions, represented by contact symbols, and an output instruction, represented by a coil symbol. Condition instructions are placed on the left side of the rung and may be in series, parallel, or a combination of the two to determine the desired control logic. The output instruction is placed on the right side of the rung.

The line on the left side of the rung represents the imaginary 'hot' power trail while that on the right side is the imaginary 'neutral.' If any left to right path on a rung is 'closed' or 'made,' then the rung is said to be 'true' and the output is energized. This is also known as logic continuity.

As the computer chip used in the PLC became more powerful, engineers saw that there were many more uses for these controllers. The PLC became more of a computer and not just a 'relay replacer.' To take advantage of this power, additions to the instruction set were necessary. Thus were born 'function blocks.'

In most controllers, operations such as timing, counting, arithmetic, data transfer, and other advanced operations are represented by a block diagram (see the second rung in the example). Since these instructions are performed when a certain set of input conditions are true, these are considered output instructions even though sometimes there is no 'output' performed.

In the example there are outputs following the block. When the conditions are true to enable the block instruction (EN), then the block instruction will perform its operation. Upon completion of that operation the output will be energized. Sometimes the data in the block must be reset so that the operation can begin again. A rung of logic can be constructed so that when certain input condition instructions are true the block is reset (R).

This article draws upon information from Programmable Logic Controllers: The Complete Guide to the Technology, by C.T. Jones, published by Patrick-Turner Publishing Co., Atlanta, Ga. Telephone number (770)956-7992.





No comments
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by...
Each year, a panel of Control Engineering editors and industry expert judges select the System Integrator of the Year Award winners.
The Engineering Leaders Under 40 program identifies and gives recognition to young engineers who...
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
This eGuide contains a series of articles and videos that considers theoretical and practical; immediate needs and a look into the future.
Learn how to create value with re-use; gain productivity with lean automation and connectivity, and optimize panel design and construction.
Go deep: Automation tackles offshore oil challenges; Ethernet advice; Wireless robotics; Product exclusives; Digital edition exclusives
Lost in the gray scale? How to get effective HMIs; Best practices: Integrate old and new wireless systems; Smart software, networks; Service provider certifications
Fixing PID: Part 2: Tweaking controller strategy; Machine safety networks; Salary survey and career advice; Smart I/O architecture; Product exclusives
The Ask Control Engineering blog covers all aspects of automation, including motors, drives, sensors, motion control, machine control, and embedded systems.
Look at the basics of industrial wireless technologies, wireless concepts, wireless standards, and wireless best practices with Daniel E. Capano of Diversified Technical Services Inc.
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
This is a blog from the trenches – written by engineers who are implementing and upgrading control systems every day across every industry.
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.

Find and connect with the most suitable service provider for your unique application. Start searching the Global System Integrator Database Now!

Case Study Database

Case Study Database

Get more exposure for your case study by uploading it to the Control Engineering case study database, where end-users can identify relevant solutions and explore what the experts are doing to effectively implement a variety of technology and productivity related projects.

These case studies provide examples of how knowledgeable solution providers have used technology, processes and people to create effective and successful implementations in real-world situations. Case studies can be completed by filling out a simple online form where you can outline the project title, abstract, and full story in 1500 words or less; upload photos, videos and a logo.

Click here to visit the Case Study Database and upload your case study.