The Basics of Ladder Logic


Ladder logic is the basis of most control functions

Ladder logic uses switch or relay contacts to implement Boolean expressions. In years past, ladder logic was made possible with discrete relays and was sometimes termed “relay logic.” Today most implementations are done using a specialized microprocessor-based device called a programmable logic controller (PLC). Although the means of implementation have changed over the years, the basic concepts remain the same.

Logical functions. When studying logic, one must begin with the basic functions. Input values can be combined using the logical AND, OR, and exclusive OR (XOR) functions (Fig. 1 at right). Logic gates use digital electronics to implement these functions. Each gate is actually a circuit, typically consisting of transistors and biasing resistors. As an example, the transistor-transistor logic (TTL) 7408 chip contains four, two-input AND gates in one integrated circuit (IC) package. These gates and other types on separate ICs can be wired together to implement a wide array of digital logic.

In the case of ladder logic, logic functions are implemented by developing a ladder diagram. Named for its resemblance to a ladder, the diagram consists of two vertical rails connected by several horizontal rungs. Each rail is energized at a different voltage, and each rung contains at least one element, such as a relay coil or an indicator lamp, across which voltage can drop. In a ladder circuit, normally open (type-A) and normally closed (type-B) contacts are interconnected so as to implement the logical functions. Connecting two contacts in series implements an AND function, since the first and second contacts must both be closed to complete the circuit. Connecting the same two contacts in parallel implements a logical OR, since at least one contact must be closed to complete the circuit. An XOR implementation for two inputs, which is actually [(A AND B') OR (A' AND B)] where the prime mark indicates a logical NOT or inversion, requires a type-A and a type-B contact for both inputs.

A relay coil, whether it's a discrete device or a “virtual” device mimicked by PLC software, controls one or more sets of contacts. When a relay coil is energized or “picked up,” its type-A contacts close and its type-B contacts open. Conversely, when the coil is de-energized or “dropped out,” its contacts return to their normal state.

Seal-in function. Many times, momentary pushbuttons are used to provide user input to a control circuit. If such a switch is used as a start pushbutton for a motor, the switch must be “sealed-in” so the motor doesn't stop when the pushbutton is released. This requires a path to develop around the switch so current can continue to flow after the switch contacts open. The seal-in function can be provided with a relay coil and a single set of type-A contacts as shown in the dashed box in Fig. 2. When the start button is pushed, the SI relay picks up and its type-A contacts close, providing a current path after the start pushbutton is released.

Other functions.

A variety of specialized input devices, such as temperature sensors, pressure switches, position indicators, and flow switches, can provide input to the ladder logic circuit. Devices like timers and counters can also be added to make more complex logic possible. Fig. 2 shows a simple motor control circuit that will only allow the motor to start — and remain running — when its lube oil pump is running, at least one valve is open, and no alarms exist. Pressing the stop button drops out the SI coil, stopping the motor. Indicator lamps — red for running, green for stopped — can also be used. This basic control circuit forms the basis for much more complex control circuits.


 

Want to use this article? Click here for options!





Acceptable Use Policy
blog comments powered by Disqus

what's wrong here?

What's Wrong Here?

May 10, 2012 12:44 PM

What's Wrong Here?

Apr 19, 2012 10:09 AM

What's Wrong Here?

Apr 5, 2012 2:27 PM

View all What's Wrong Here?

product spotlight

EV charger tester

May 25, 2012 8:26 AM

EV charger tester

The Electrician is portable tester that verifies critical power and safety requirements of electric vehicle (EV) chargers...

View all 2012 Product Spotlights

Free Product Info

Our Product Information site is the ultimate online resource for products and services offered by Advertisers featured in our Magazine. This service is provided as a quick and easy way to request Product Information online. Get FREE product information now.

Recent Comments

More...


Social Media

More ways to stay informed...

follow us on twitter

Find us on Facebook

EC&M Whitepaper

Arc Mitigation –A Three-Step Approach

Did you know that an arc-flash incident hospitalizes 5-7 workers per day in North America, severely impacting processes and profitability with lost production? Download This Sponsored Whitepaper Today!

What's New in Residential Cabling?
Date: Wednesday, May 30, 2012
Time: 2:00pm ET


In this The Home Depot sponsored Low Voltage Webinar, Ron Kipper RCDD / NTS will discuss the need for compression style coaxial connectors and the migration of the entire CATV, Satellite and Audio / Video industry to them. Register Today!

Grounding Versus Bonding
Now Available On-Demand


In this 60-minute FREE webinar, Mike Holt of Mike Holt Enterprises, Inc. will explain the purpose of grounding and bonding as related to the most current requirements set forth in the 2011 NEC. Register to View On-Demand!

resources

product info icon

product info

tradeshow icon

tradeshow

research icon

research

industry links

industry links

rss icon

rss

Browse Back Issues

Browse Back Issues