Relay Ladder Logic


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...
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
The Engineering Leaders Under 40 program identifies and gives recognition to young engineers who...
This eGuide illustrates solutions, applications and benefits of machine vision systems.
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.
Robot advances in connectivity, collaboration, and programming; Advanced process control; Industrial wireless developments; Multiplatform system integration
Sensor-to-cloud interoperability; PID and digital control efficiency; Alarm management system design; Automotive industry advances
Make Big Data and Industrial Internet of Things work for you, 2017 Engineers' Choice Finalists, Avoid control design pitfalls, Managing IIoT processes
Motion control advances and solutions can help with machine control, automated control on assembly lines, integration of robotics and automation, and machine safety.
This article collection contains several articles on the Industrial Internet of Things (IIoT) and how it is transforming manufacturing.

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

Big Data and bigger solutions; Tablet technologies; SCADA developments
SCADA at the junction, Managing risk through maintenance, Moving at the speed of data
Flexible offshore fire protection; Big Data's impact on operations; Bridging the skills gap; Identifying security risks
click me