View
248
Download
0
Category
Preview:
Citation preview
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 1/79
Dr. A. Ramirez-Serrano
Computer-Based Control for
Manufacturing ( ENMF 515 )
Instructor:Dr. Alejandro Ramirez-Serrano
Office: ME420
Phone: 220-3632E-mail: aramirez@enme.ucalgary.ca
More about: . “Ladder Logic”
Allen-Bradley
PLC-5
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 2/79
Dr. A. Ramirez-Serrano
"Ladder" diagrams”
Ladder diagrams are specialized schematics commonly used todocument industrial control logic systems.
They are called "ladder" diagrams because they resemble a ladder, withtwo vertical rails (supply power) and as many "rungs" (horizontal lines)
as there are control circuits to represent. If we wanted to draw a simpleladder diagram showing a lamp that is controlled by a hand switch, itwould look like this:
HOT line NEUTRAL line
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 3/79
Dr. A. Ramirez-Serrano
The "L1" and "L2" designationsrefer to the two poles of a 120VAC supply, unless otherwisenoted. L1 is the "hot" conductor,and L2 is the grounded ("neutral")
conductor. These designationshave nothing to do withinductors, just to make thingsconfusing. The actual transformeror generator supplying power tothis circuit is omitted for
simplicity. In reality, the circuitlooks something like this:
Typically in industrial relay logiccircuits, but not always, the
operating voltage for the switchcontacts and relay coils will be120 volts AC. Lower voltage ACand even DC systems aresometimes built and documentedaccording to "ladder" diagrams:
So long as the switch contacts and relay
coils are all adequately rated, it really
doesn't matter what level of voltage is
chosen for the system to operate with.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 4/79
Dr. A. Ramirez-Serrano
Note the number "1" on the wire between the switch and the lamp. Inthe real world, that wire would be labeled with that number, using heat-shrink or adhesive tags, wherever it was convenient to identify. Wiresleading to the switch would be labeled "L1" and "1," respectively. Wiresleading to the lamp would be labeled "1" and "L2," respectively.
These wire numbers make assembly andmaintenance very easy. Each conductorhas its own unique wire number for thecontrol system that it's used in. Wirenumbers do not change at any junction ornode, even if wire size, color, or lengthchanges going into or out of a connectionpoint. Of course, it is preferable to
maintain consistent wire colors, but this isnot always practical. What matters is thatany one, electrically continuous point in acontrol circuit possesses the same wirenumber. Take this circuit section, forexample, with wire #25 as a single,electrically continuous point threading to
many different devices:
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 5/79
Dr. A. Ramirez-Serrano
Here, the lamp (load ) is located on theright-hand side of the rung, and so is theground connection for the power source.This is no accident or coincidence; rather,
it is a purposeful element of good designpractice. Suppose that wire #1 were toaccidently come in contact with ground,the insulation of that wire having beenrubbed off so that the bare conductorcame in contact with grounded, metalconduit. Our circuit would now functionlike this:
In ladder diagrams, the load device(lamp, relay coil, solenoid coil, etc.) isalmost always drawn at the right-hand side of the rung. While itdoesn't matter electrically where therelay coil is located within the rung,
it does matter which end of theladder's power supply is grounded,for reliable operation.Take for instance this circuit:
With both sides of the lampconnected to ground, the lampwill be "shorted out" and unableto receive power to light up. If the switch were to close, there
would be a short-circuit,immediately blowing the fuse.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 6/79
Dr. A. Ramirez-Serrano
However, consider what wouldhappen to the circuit with thesame fault (wire #1 coming incontact with ground), exceptthis time we'll swap the
positions of switch and fuse(L2 is still grounded):
This time the accidental grounding of wire #1 will force power to the
lamp while the switch will have no effect. It is much safer to have asystem that blows a fuse in the event of a ground fault than to have asystem that uncontrollably energizes lamps, relays, or solenoids inthe event of the same fault. For this reason, the load(s) must alwaysbe located nearest the grounded power conductor in the ladderdiagram.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 7/79
Dr. A. Ramirez-Serrano
Digi tal logic funct ions in
“ladder logic”
We can construct simply logic
functions for our hypothetical lampcircuit, using multiple contacts, anddocument these circuits quite easilyand understandably with additionalrungs to our original "ladder ."
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 8/79
Dr. A. Ramirez-Serrano
“OR” functions in ladder logic
If we use standard binarynotation for the status of the switches and lamp (0 for unactuated or de-energized; 1
for actuated or energized ), atruth table can be made toshow how the logic works:
Now, the lamp will come on if either contact A or contact B is actuated,because all it takes for the lamp to be energized is to have at least onepath for current from wire L1 to wire 1. What we have is a simple ORlogic function, implemented with nothing more than contacts and a lamp.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 9/79
Dr. A. Ramirez-Serrano
“AND” functions in ladder
log ic
We can mimic the ANDlogic function by wiringthe two contacts in
series instead of parallel:
Now, the lamp energizes only if contact A and contact B aresimultaneously actuated. A path exists for current from wire L1 to the
lamp (wire 2 ) if and only if both switch contacts are closed.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 10/79
Dr. A. Ramirez-Serrano
“NOT” function in ladder
log ic
The logical inversion, orNOT, function can beperformed on a contactinput simply by using a
normally-closed contactinstead of a normally-open contact:
Now, the lamp energizes if the contact is not actuated, and de-energizeswhen the contact is actuated.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 11/79
Dr. A. Ramirez-Serrano
“NAND” function in ladder
log ic
In a special branch of mathematics known as Booleanalgebra, this effect of gate
function identity changing withthe inversion of input signals isdescribed by DeMorgan'sTheorem, a subject covered in
ENMF 533 course.
If we take our OR functionand invert each "input"through the use of normally-closed contacts,we will end up with aNAND function.
The lamp will be energized if either contact is unactuated. It will go outonly if both contacts are actuatedsimultaneously.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 12/79
Dr. A. Ramirez-Serrano
“NOR” function in ladder
log ic
Likewise, if we take ourAND function and inverteach "input" through theuse of normally-closed
contacts, we will end upwith a NOR function:
A pattern quickly reveals itself when ladder circuits are compared withtheir logic gate counterparts:
1. Parallel contacts are equivalent to an OR gate.
2. Ser ies contacts are equivalent to an AND gate.
3. Normall y-closed contacts are equivalent to a NOT gate (inverter) .
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 13/79
Dr. A. Ramirez-Serrano
Combinator ial circu i ts
In the following example, we havean Exclusive-OR function builtfrom a combination of AND, OR ,and inverter (NOT ) gates:
We can build combinational logic functions by groupingcontacts in series-parallel arrangements, as well.
The top rung (NC contact A in serieswith NO contact B) is the equivalent of the top NOT/AND gate combination. The
bottom rung (NO contact A in serieswith NC contact B) is the equivalent of the bottom NOT/AND gate combination.The parallel connection between the tworungs at wire number 2 forms theequivalent of the OR gate, in allowingeither rung 1 or rung 2 to energize thelamp.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 14/79
Dr. A. Ramirez-Serrano
To make the Exclusive-OR function, we had to use two contacts perinput: one for direct input and the other for "inverted" input. Thetwo "A" contacts are physically actuated by the same mechanism, asare the two "B" contacts. The common association between contactsis denoted by the label of the contact. There is no limit to how manycontacts per switch can be represented in a ladder diagram, as eachnew contact on any switch or relay (either normally-open ornormally-closed) used in the diagram is simply marked with thesame label.
Sometimes, multiple contacts on a single switch (or relay) aredesignated by a compound labels, such as "A-1" and "A-2" insteadof two "A" labels. This may be especially useful if you want tospecifically designate which set of contacts on each switch or relay isbeing used for which part of a circuit. For simplicity's sake, I'llrefrain from such elaborate labeling in this lesson. If you see acommon label for multiple contacts, you know those contacts are allactuated by the same mechanism.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 15/79
Dr. A. Ramirez-Serrano
Another way to invert the
outputs of a switchIf we wish to invert theoutput of any switch-generated logic function,we must use a relay with anormally-closed contact.
For instance, if we want toenergize a load based onthe inverse, or NOT, of anormally-open contact, wecould do this:
We will call the relay, "control relay 1," or CR1. When the coil of CR1(symbolized with the pair of parentheses on the first rung) is energized,the contact on the second rung opens, thus de-energizing the lamp.From switch A to the coil of CR1, the logic function is noninverted. Thenormally-closed contact actuated by relay coil CR1 provides a logicalinverter function to drive the lamp opposite that of the switch's
actuation status.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 16/79
Dr. A. Ramirez-Serrano
Applying this inversionstrategy to one of ourinverted-input functionscreated earlier, such as theOR-to-NAND, we can
invert the output with arelay to create a
noninverted function:
From the switches to the coil of CR1, the logical function is that of aNAND gate. CR1's normally-closed contact provides one final inversionto turn the NAND function into an AND function.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 17/79
Dr. A. Ramirez-Serrano
Perm issive and in ter lock
ci rcui ts A practical application of switch and relay logic is in control
systems where several process conditions have to be met before apiece of equipment is allowed to start.
A good example of this is burner control for large combustionfurnaces. In order for the burners in a large furnace to be started
safely, the control system requests " permission" from severalprocess switches, including high and low fuel pressure, air fan flow check ,exhaust stack damper position, access door position, etc.
Each process conditionis called a permissive,and each permissiveswitch contact is wiredin series, so that if anyone of them detects anunsafe condition, the
circuit will be opened:
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 18/79
Dr. A. Ramirez-Serrano
Another practical application of relay logic is in control systemswhere we want to ensure twoincompatible events cannot occur at the same time.
When contactor M1 is energized, the 3 phases (A, B, and C) are connecteddirectly to terminals 1, 2, and 3 of the motor, respectively.
An example of this is in reversible motor control, where two motorcontactors are wired to switch polarity (or phase sequence) to anelectric motor, and we don't want the forward and reverse contactorsenergized simultaneously:
However, when contactor M2 is energized,phases A and B are reversed, A going tomotor terminal 2 and B going to motorterminal 1. This reversal of phase wiresresults in the motor spinning the opposite
direction. Let's examine the control circuitfor these two contactors:
Interlock circuits
Thermal overload contact
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 19/79
Dr. A. Ramirez-Serrano
Take note of the normally-closed "OL" contact, which is the thermaloverload contact activated by the "heater" elements wired in serieswith each phase of the AC motor. If the heaters get too hot, thecontact will change from its normal (closed) state to being open,which will prevent either contactor from energizing.
This control system will work fine, so long as no one pushes bothbuttons at the same time. If someone were to do that, phases A andB would be short-circuited together by virtue of the fact thatcontactor M1 sends phases A and B straight to the motor andcontactor M2 reverses them; phase A would be shorted to phase Band visa-versa. Obviously, this is a bad control system design!
Thermal overload contact
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 20/79
Dr. A. Ramirez-Serrano
This is called interlocking,and it is accomplishedthrough the use of auxiliarycontacts on each contactor,as such:
Now, when M1 is energized, the normally-closed auxiliary contact on thesecond rung will be open, thus preventing M2 from being energized, even if the "Reverse" pushbutton is actuated. Likewise, M1's energization is preventedwhen M2 is energized. Note, as well, how additional wire numbers (4 and 5)were added to reflect the wiring changes.
It should be noted that this is not the only way to interlock contactors to prevent ashort-circuit condition. Some contactors come equipped with the option of amechanical interlock: a lever joining the armatures of two contactors together sothat they are physically prevented from simultaneous closure. For additional safety,electrical interlocks may still be used, and due to the simplicity of the circuit there
is no good reason not to employ them in addition to mechanical interlocks.
To prevent this occurrence from happening, we candesign the circuit so that the energization of onecontactor prevents the energization of the other.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 21/79
Dr. A. Ramirez-Serrano
Thank you!
Next class: Motor control circuits
Time: 11:00 a.m.
Place: ME 322
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 22/79
Dr. A. Ramirez-Serrano
Motor control circuits
The interlock contacts installed in the previous section's motor control circuit work fine, but the motor will run only as long as each pushbutton switch is held down.
If we wanted to keep the motor running even after the operator takes his or herhand off the control switch(es), we could change the circuit in a couple of differentways: we could replace the pushbutton switches with toggle switches, or we couldadd some more relay logic to "latch" the control circuit with a single, momentary
actuation of either switch (See fig. below for an implementation of this commonly used in
industry approach):
When the " Forward " pushbutton is actuated, M1
will energize, closing the normally-open auxiliarycontact in parallel with that switch. When the
pushbutton is released, the closed M1 auxiliarycontact will maintain current to the coil of M1, thus
latching the " Forward " circuit in the "on" state.
The same sort of thing will happen when the
" Reverse" pushbutton is pressed. These parallel
auxiliary contacts are sometimes referred to as
seal-in contacts, the word "seal" meaningessentially the same thing as the word latch.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 23/79
Dr. A. Ramirez-Serrano
Stop Motors! The previous circuit createsa new problem: how to stop the motor! In the previous
circuit the motor will runeither forward or backwardonce the correspondingpushbutton switch ispressed, and will continue torun as long as there ispower. To stop either circuit(forward or backward), we
require some means for theoperator to interrupt powerto the motor contactors.We'll call this new switch,Stop ( normally closed ):
Now, if either forward or reverse circuits are latched, they may be"unlatched " by momentarily pressing the "Stop" pushbutton, which will
open either forward or reverse circuit, de-energizing the energized
contactor, and returning the seal-in contact to its normal (open) state.
The " Stop" switch, having normally-closed contacts, will conduct power to
either forward or reverse circuits when released.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 24/79
Dr. A. Ramirez-Serrano
Another Practical Aspect of
Motor Control
So far, so good. Let's consider another practical aspect of our motor control scheme before we quit adding to it.
If our hypothetical motor turned a mechanical load with alot of momentum, such as a large air fan, the motor might
continue to coast for a substantial amount of time after thestop button had been pressed . This could be problematic if an operator were to try to reverse the motor directionwithout waiting for the fan to stop turning. If the fan wasstill coasting forward and the " Reverse" pushbutton waspressed, the motor would struggle to overcome that inertia
of the large fan as it tried to begin turning in reverse,drawing excessive current and potentially reducing the lifeof the motor, drive mechanisms, and fan. What we might like to have is some kind of a time-delay function in thismotor control system to prevent such a premature startupfrom happening.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 25/79
Dr. A. Ramirez-Serrano
Let's begin by adding a coupleof time-delay relay coils, onein parallel with each motorcontactor coil. If we usecontacts that delay returningto their normal state, these
relays will provide us a"memory" of which directionthe motor was last poweredto turn.
What we want each time-delay contact to do is to openthe starting-switch leg of the
opposite rotation circuit forseveral seconds, while the fancoasts to a halt.
If the motor has been running in the forward direction, both M1 and TD1 will
have been energized. This being the case, the normally-closed , timed-closed
contact of TD1 between wires 8 and 5 will have immediately opened the momentTD1 was energized. When the stop button is pressed, contact TD1 waits for thespecified amount of time before returning to its normally-closed state, thusholding the reverse pushbutton circuit open for the duration so M2 can't beenergized. When TD1 times out, the contact will close and the circuit will allowM2 to be energized, if the reverse pushbutton is pressed. In like manner, TD2 willprevent the "Forward" pushbutton from energizing M1 until the prescribed time
delay after M2 (and TD2) have been de-energized.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 26/79
Dr. A. Ramirez-Serrano
The careful observer will notice thatthe time-interlocking functions of TD1and TD2 render the M1 and M2interlocking contacts redundant.
We can get rid of auxiliary contacts M1
and M2 for interlocks and just use TD1and TD2's contacts, since theyimmediately open when theirrespective relay coils are energized,thus "locking out" one contactor if theother is energized.
Each time delay relay will serve a dual
purpose: i) preventing the other contactor from energizing while the motor is running ,and ii) preventing the same contactor fromenergizing until a prescribed time after motor shutdown. The resulting circuit has the advantage of being simplerthan the previous example.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 27/79
Dr. A. Ramirez-Serrano
Fail-safe design
Logic circuits, whether comprised of electromechanicalrelays or solid-state gates, can be built in manydifferent ways to perform the same functions. There is
usually no one "correct " way to design a complex logic
circuit, but there are usually ways that are better thanothers.
In control systems, safety is (or at least should be)an important design priority.
If there are multiple ways in which a digital control circuitcan be designed to perform a task, and one of those wayshappens to hold certain advantages in safety over theothers, then that design is the better one to choose.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 28/79
Dr. A. Ramirez-Serrano
Let's take a look at a simple system
and consider how it might be
implemented in relay logic Suppose that a large laboratory
or industrial building is to beequipped with a fire alarmsystem, activated by any one of several latching switchesinstalled throughout the facility.
The system should work so thatthe alarm siren will energize if any one of the switches isactuated. At first glance itseems as though the relay logicshould be incredibly simple:
just use normally-open switchcontacts and connect them allin parallel with each other.
Essentially, this is the OR logic function implemented with four switch inputs.We could expand this circuit to include any number of switch inputs, each newswitch being added to the parallel network, but we'll limit it to 4 in thisexample to keep things simple. At any rate, it is an elementary system and
there seems to be little possibility of trouble. Except in the event of a wiringfailure, that is.
Fire alarm system
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 29/79
Dr. A. Ramirez-Serrano
Potential circuit
problems
The nature of electric circuits issuch that "open" failures (open switch contacts, broken wireconnections, open relay coils,blown fuses, etc.) are statisticallymore likely to occur than anyother type of failure. With that
in mind, it makes sense toengineer a circuit to be astolerant as possible to such afailure. Let's suppose that awire connection for Switch #2were to fail open:
If this failure were to occur, the result would be that Switch #2would no longer energize the siren if actuated. This, obviously, is notgood in a fire alarm system. Unless the system were regularly tested(a good idea anyway), no one would know there was a problem untilsomeone tried to use that switch in an emergency.
What if the system were reF il f
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 30/79
Dr. A. Ramirez-Serrano
What if the system were re-engineered so as to sound the alarmin the event of an open failure? Thatway, a failure in the wiring wouldresult in a false alarm, a scenariomuch more preferable than that of
having a switch silently fail and notfunction when needed. In order toachieve this design goal, we wouldhave to re-wire the switches so thatan open contact sounded the alarm,rather than a closed contact.
That being the case, the switches
will have to be normally-closed andin series with each other, powering arelay coil which then activates anormally-closed contact for thesiren:
When all switches are unactuated (the regular operating state of this system),
relay CR1 will be energized, thus keeping contact CR1 open, preventing thesiren from being powered. However, if any of the switches are actuated,relay CR1 will de-energize, closing contact CR1 and sounding the alarm.Also, if there is a break in the wiring anywhere in the top rung of the circuit,
the alarm will sound. When it is discovered that the alarm is false, the workers in
the facility will know that something failed in the alarm system and that it needs to be
repaired .
Fail-safecircuit:
example
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 31/79
Dr. A. Ramirez-Serrano
Fail-safe c ircu it: conclusion
Granted, the circuit is more complexthan it was before the addition of thecontrol relay, and the system couldstill fail in the "silent " mode with a
broken connection in the bottom rung,but it's still a safer design than the
original circuit, and thus preferablefrom the standpoint of safety.
This design of circuit is referred to as fail-safe, due to itsintended design to default to the safest mode in the eventof a common failure such as a broken connection in the
switch wiring.
Fail-safe design always starts with an assumption as to the most likely kind
of wiring or component failure, and then tries to configure things so that
such a failure will cause the circuit to act in the safest way, the " safest way "
being determined by the physical characteristics of the process.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 32/79
Dr. A. Ramirez-Serrano
Take for example an electrically-actuated (solenoid) valve for turning on cooling water to a machine. Energizing thesolenoid coil will move an armature which then either opens or closes the valve mechanism, depending on what kind of valve we specify. A spring will return the valve to its "normal" position when the solenoid is de-energized. We alreadyknow that an open failure in the wiring or solenoid coil is more likely than a short or any other type of failure, so weshould design this system to be in its safest mode with the solenoid de-energized.
If it's cooling water we're controlling with this valve, chances are it is safer to have the cooling water turn on in theevent of a failure than to shut off, the consequences of a machine running without coolant usually being severe. Thismeans we should specify a valve that turns on (opens up) when de-energized and turns off (closes down) whenenergized. This may seem "backwards" to have the valve set up this way, but it will make for a safer system in theend.
One interesting application of fail-safe design is in the power generation and distribution industry, where large circuitbreakers need to be opened and closed by electrical control signals from protective relays. If a 50/51 relay
(instantaneous and time overcurrent) is going to command a circuit breaker to trip (open) in the event of excessivecurrent, should we design it so that the relay closes a switch contact to send a "trip" signal to the breaker, or opens aswitch contact to interrupt a regularly "on" signal to initiate a breaker trip? We know that an open connection will bethe most likely to occur, but what is the safest state of the system: breaker open or breaker closed?
At first, it would seem that it would be safer to have a large circuit breaker trip (open up and shut off power) in theevent of an open fault in the protective relay control circuit, just like we had the fire alarm system default to an alarmstate with any switch or wiring failure. However, things are not so simple in the world of high power. To have a largecircuit breaker indiscriminately trip open is no small matter, especially when customers are depending on the continuedsupply of electric power to supply hospitals, telecommunications systems, water treatment systems, and otherimportant infrastructures. For this reason, power system engineers have generally agreed to design protective relaycircuits to output a closed contact signal (power applied) to open large circuit breakers, meaning that any open failurein the control wiring will go unnoticed, simply leaving the breaker in the status quo position.
Is this an ideal situation? Of course not. If a protective relay detects an overcurrent condition while the> Transfer interrupted! ll not be able to trip open the circuit breaker. Like the first fire alarm system design, the "silent" failure will be evident
only when the system is needed. However, to engineer the control circuitry the other way -- so that any open failurewould immediately shut the circuit breaker off, potentially blacking out large potions of the power grid -- really isn't abetter alternative.
An entire book could be written on the principles and practices of good fail-safe system design. At least here, you knowa couple of the fundamentals: that wiring tends to fail open more often than shorted, and that an electrical controlsystem's (open) failure mode should be such that it indicates and/or actuates the real-life process in the safestalternative mode. These fundamental principles extend to non-electrical systems as well: identify the most commonmode of failure, then engineer the system so that the probable failure mode places the system in the safest condition.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 33/79
Dr. A. Ramirez-Serrano
Thank you!
Next class: PLC Hardware
Time: 11:00 a.m.
Place: ME 322
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 34/79
Dr. A. Ramirez-Serrano
Computer-Based Control for
Manufacturing ( ENMF 515 )
Instructor:Dr. Alejandro Ramirez-Serrano
Office: ME420Phone: 220-3632
E-mail: aramirez@enme.ucalgary.ca
More about: .
“PLC Hardware”
Allen-Bradley
PLC-5
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 35/79
Dr. A. Ramirez-Serrano
Main Parts of a PLC
Many PLC configurations are available, even from a single vendor. But, ineach of these there are common components and concepts. The mostessential components are:
Power Supply - This can be built into the PLC or be an
external unit. Common voltage levels required by the PLC
(with and without the power supply) are 24Vdc, 120Vac,
220Vac.
CPU (Central Processing Unit) - This is a computer where
ladder logic is stored and processed.
I /O (Input/Output) - A number of input/output terminals must be provided so that the PLC can monitor the process and
initiate actions.
I ndicator lights - These indicate the status of the PLC
including power on, program running, and a fault. These are
essential when diagnosing problems.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 36/79
Dr. A. Ramirez-Serrano
PLC forms or configuration
The configuration of the PLC refers to the packaging of the components.Typical configurations are listed below from largest to smallest:
Rack - A rack is often large (up to 18” by 30” by 10”) and can hold multiple
cards. When necessary, multiple racks can be connected together. These tend to be
the highest cost, but also the most flexible and easy to maintain.
Mini - These are similar in function to PLC racks, but about half the size.
Shoebox - A compact, all-in-one unit (about the size of a shoebox) that has
limited expansion capabilities. Lower cost, and compactness make these ideal for
small applications.
Micro - These units can be as small as a deck of cards. They tend to have fixed
quantities of I/O and limited abilities, but costs will be the lowest.
Software - A software based PLC requires a computer with an interface card,
but allows the PLC to be connected to sensors and other PLCs across a network.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 37/79
Dr. A. Ramirez-Serrano
A PLC has many "input" terminals, through which it interprets
"high" and "low" logical states from sensors and switches.
It also has many output terminals, through which it outputs
"high" and "low" signals to power lights, solenoids, contactors,small motors, and other devices lending themselves to on/off control.
In an effort to make PLCs easy to program, their programming
language was designed to resemble ladder logic diagrams.Thus, an industrial electrician or electrical engineer accustomedto reading ladder logic schematics would feel comfortableprogramming a PLC to perform the same control functions.
PLC inputs & outputs
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 38/79
Dr. A. Ramirez-Serrano
PLC inputs & outputs
Inputs to, and outputs from, a PLC are necessary to monitorand control a process.
Consider the example of a light bulb. If it can only be turned
on or off, i t is logical control .
If the light can be dimmed to different levels, it is
continuous .
Both inputs and outputs can be categorized into two basic types:logical or continuous .
Continuous values seem more intuitive, but logical values are preferredbecause they allow more certainty, and simplify control.
As a result most controls applications (and PLCs) use logical inputs andoutputs for most applications. Hence, we will discuss logical I/O and leave
continuous I/O for later.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 39/79
Dr. A. Ramirez-Serrano
I nput Types
Proximity Switches
Switches
Potentiometer
LVDTs
Voltages
12-24 Vdc
100-120 Vac
10-60 Vdc12-24 Vac/dc
5 Vdc (TTL)
200-240 Vac
48 Vdc
24 Vac
PLC input types
Inputs come from sensors that translate physical phenomena intoelectrical signals. Typical examples of sensors are listed below inrelative order of popularity.
Switches - mechanical mechanisms will open or close electrical contacts for a logical signal.
Potentiometer - measures angular positions continuously, using resistance.
LVDT (linear variable differential transformer) - measures linear displacement continuously
using magnetic coupling.
Proximity Switches - use inductance,
capacitance or light to detect an object logically.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 40/79
Dr. A. Ramirez-Serrano
Output Types
Solenoid Valves
LightsMotor Starters
Servo Motors
Output Voltages
120 Vac
24 Vdc
12-48 Vac12-48 Vdc
5Vdc (TTL)
230 Vac
PLC output types
Solenoid Valves - logical outputs that can switch a hydraulic or pneumatic flow. Lights - logical outputs that can often be powered directly from PLC output
boards.
Motor Starters - motors often draw a large amount of current when started, sothey require motor starters, which are basically large relays.
Servo Motors - a continuous output from the PLC can command a variable speedor position.
Outputs to actuators allow a PLC to cause something to happenin a process. A short list of popular actuators is given below inorder of relative popularity.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 41/79
Dr. A. Ramirez-Serrano
More about PLC outputs
Outputs from PLCs are often relays,but they can also be solid stateelectronics such as transistors for DC
outputs or Triacs for AC outputs.
Continuous outputs require special
output cards with digital to analogconverters.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 42/79
Dr. A. Ramirez-Serrano
More about PLC inputs &
outputs Inputs for a PLC come in a few basic varieties, the simplest
are AC and DC inputs.
Sourcing and sinking inputs are also popular. This outputmethod dictates that a device does not supply any power.
Instead, the device only switches current on or off, like asimple switch.
Sinking - When active the output allows current to flow to a common
ground. This is best selected when different voltages are supplied.
Sourcing - When active, current flows from a supply, through theoutput device and to ground. This method is best used when alldevices use a single supply voltage.
This is also referred to as NPN (sinking) and PNP (sourcing).PNP is more popular.
This will be covered in more detail in the section about sensors.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 43/79
Dr. A. Ramirez-Serrano
Signal connection and programming standards vary somewhatbetween different models of PLC, but they are similar enough toallow a "generic" introduction to PLC programming.
The figure on the right shows a simplePLC, as it might appear from a front
view.
Two screw terminals provide connection to 120 volts
AC for powering the PLC's internal circuitry,
labeled L1 and L2.
Six screw terminals on the left-hand side provideconnection to input devices, each terminal
representing a different input "channel" with its
own "X" label. The lower-left screw terminal is a
"Common" connection, which is generally
connected to L2 (neutral) of the 120 VAC power
source.
Power supply
O u
t p u
t s
I n
p u
t s
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 44/79
Dr. A. Ramirez-Serrano
Inside the PLC housing,connected between each inputterminal and the Commonterminal, is an opto-isolatordevice ( Light-Emitting Diode) that
provides an electrically isolated"high" logic signal to thecomputer's circuitry (a photo-transistor interprets the LED'slight) when there is 120 VACpower applied between therespective input terminal and theCommon terminal.
An indicating LED on the frontpanel of the PLC gives visualindication of an "energized " input:
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 45/79
Dr. A. Ramirez-Serrano
INPUTS
In smaller PLCs the inputs are normally buil t in and are specifiedwhen purchasing the PLC.
For larger PLCs the inputs are purchased as modules , or cards,with 8 or 16 inputs of the same type on each card.
For discussion purposes we will discuss all inputs as if they have been purchased as cards. The list below shows typical ranges for input voltages,and is roughly in order of popularity.
12-24 Vdc ; 100-120 Vac ; 10-60 Vdc
12-24 Vac/dc ; 5 Vdc (TTL) ; 200-240 Vac
48 Vdc ; 24 Vac
Most popular Least popular
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 46/79
Dr. A. Ramirez-Serrano
24 V ACPower
Supply
normally open push-button
normally opentemperature switch
PLC Input Card24V AC
it is in rack 1I/O Group 3
00
01
0203
04
05
06
07
I:013
01
I:013
03
Push Button
Temperature Sensor
COM
Note: inputs are normally high impedance. This means that they will
use very little current.
Hot
Neut.
Fig. 3.2 - Input Card Example
PLC input cards rarely supply power, this meansthat an external powersupply is needed tosupply power for theinputs and sensors.
The example in Figure3.2 shows how toconnect an AC input
card.
Inputs:
PLC Cards
Also called “ slot ”
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 47/79
Dr. A. Ramirez-Serrano
Circuits
Many beginners become confused about where connectionsare needed in the circuit above.
The key word to remember is circuit , which means thatthere is a full loop that the voltage must be able to follow.
In Figure 3.2 we can start following the circuit (loop) at thepower supply. The path goes through the switches, through
the input card, and back to the power supply where it flowsback through to the start. In a full PLC implementationthere will be many circuits that must each be complete.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 48/79
Dr. A. Ramirez-Serrano
Example :
I:012
02
I:025
03
O:028
04
… …
I/O: Rack, Slot
I:025
03
O:028
04
120 Vac
5 Vdc
02
5 VdcI:012Slot No. 5 Slot No. 8
Input 01
Rack No. 2
Input 01
Input 02
Slot No. 8 Slot No. 2
Input n
Slot No. 2Slot No. 3
Input n
Rack No. 1 Input 02
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 49/79
Dr. A. Ramirez-Serrano
Common vs. Ground
A second important concept is the common.
Here the neutral on the power supply is the common, or referencevoltage.
In effect we have chosen this to be our 0V reference, and all othervoltages are measured relative to it. If we had a second power supply,we would also need to connect the neutral so that both neutrals wouldbe connected to the same common.
Often common and ground will be confused . The common is areference, or datum voltage that is used for 0V, but the ground isused to prevent shocks and damage to equipment. The ground isconnected under a building to a metal pipe or grid in the ground. Thisis connected to the electrical system of a building, to the poweroutlets, where the metal cases of electrical equipment are connected.When power flows through the ground it is bad. Unfortunately many engineers, and manufacturers mix up ground and common. It is very common to find a power supply with the ground and commonmislabeled.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 50/79
Dr. A. Ramirez-Serrano
Isolated I/O cards
One final concept that tends to trap beginners is that eachinput card is isolated.
This means that if you have connected a common to onlyone card, then the other cards are not connected. Whenthis happens the other cards will not work properly. Youmust connect a common for each of the output cards.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 51/79
Dr. A. Ramirez-Serrano
Input Cards: Selection
There are many trade-offs when deciding which type of inputcards to use.
• DC voltages are usually lower, and therefore safer (i.e., 12-24V).
• DC inputs are very fast, AC inputs require a longer on-time. For
example, a 60Hz wave may require up to 1/60sec for reasonablerecognition.
• DC voltages can be connected to larger variety of electricalsystems.
• AC signals are more immune to noise than DC, so they are suitedto long distances, and noisy (magnetic) environments.
• AC power is easier and less expensive to supply to equipment.
• AC signals are very common in many existing automation devices.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 52/79
Dr. A. Ramirez-Serrano
OUTPUTS
As with input modules, output modules rarely supply any power , but instead act as switches. External powersupplies are connected to the output card and the card willswitch the power on or off for each output. Typical outputvoltages are listed below, and roughly ordered by
popularity.
120 Vac ; 24 Vdc ; 12-48 Vac
12-48 Vdc ; 5 Vdc (TTL) ; 230 Vac
Most popular Least popular
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 53/79
Dr. A. Ramirez-Serrano
Output signals are generated bythe PLC's computer circuitryactivating a switching device(transistor, TRIAC, or even anelectromechanical relay), connectingthe "Source" terminal to any of
the "Y-" labeled output terminals.The "Source" terminal,correspondingly, is usuallyconnected to the L1 side of the120 VAC power source.
As with each input, an indicatingLED on the front panel of the PLCgives visual indication of an"energized " output:
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 54/79
Dr. A. Ramirez-Serrano
Output Cards
Output cards typically have 8 to 16 outputs of the same typeand can be purchased with different current ratings.
A common choice when purchasing output cards is relays ,
transistors or triacs .
Relays are the most flexible output devices. They are capable of switching both AC and DC outputs. But, they are slower(about 10ms switching is typical), they are bulkier, they cost
more, and they will wear out after millions of cycles. Relayoutputs are often called dry contacts.
Transistors are limited to DC outputs, and Triacs are limited toAC outputs. Transistor and triac outputs are called switched outputs.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 55/79
Dr. A. Ramirez-Serrano
Dry vs. Switched outputs
- Dry contacts - a separate relay is dedicated to each output.This allows mixed voltages ( AC or DC and voltage levels up to the
maximum), as well as isolated outputs to protect other
outputs and the PLC. Response times are often greater than10ms. This method is the least sensitive to voltage
variations and spikes.
- Switched outputs - a voltage is supplied to the PLC card,and the card switches it to different outputs using solidstate circuitry (transistors, triacs, etc.) Triacs are well suited toAC devices requiring less than 1A. Transistor outputs useNPN or PNP transistors up to 1A typically. Their responsetime is well under 1ms.
O C d
O t t
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 56/79
Dr. A. Ramirez-Serrano
Output Card
Example
(Transistors)24 V DCOutput Card
in rack 01I/O group 2
COM
00
01
02
03
04
05
06
07
24 V Lamp
Relay
+24 V DCPower
120 V AC
Power
Motor
Supply
Supply
O:012
03
O:012
07
Motor
Lamp
Neut.
COM
Outputs:
PLC Cards
Fig. 3.5 – 24Vdc Output Card Example ( sinking )
A major issue with outputs is mixed
power sources. It is good practice to
isolate all power supplies and keep
their commons separate, but this is
not always feasible. Some output
modules, such as relays, allow eachoutput to have its own common.
Other output cards require that
multiple, or all, outputs on each card
share the same common. Each out-put
card will be isolated from the rest, so
each common will have to be
connected. It is common for beginners
to only connect the common to one
card, and forget the other cards - then
only one card seems to work!
The output card shown in Figure 3.5 is an example of a
24Vdc output card that has a shared common. This type of
output card would typically use transistors for the outputs.
Single shared common
The circuits in Fig. 3.6 had the
f l h d i
Voltage supply
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 57/79
Dr. A. Ramirez-Serrano
24 V DCOutput Card
in rack 01I/O group 2
V+
00
01
02
03
04
05
06
07
24 V lamp
Relay
+24 V DC
Power
120 V AC
Power
Motor
Supply
Supply
O:012
03
O:012
07
Motor
Lamp
Neut.
COM
Output Card
Example
(Transistors)
Fig. 3.6 – 24Vdc Output Card Example with a voltage
input ( sourcing )
sequence of power supply, then device,
then PLC card, then power supply. This
requires that the output card have a
common. Some output schemes reverse
the device and PLC card, therebyreplacing the common with a voltage
input. The example in Fig. 3.5
(previous slide) is repeated in Fig. 3.6
for a voltage supply card.
Voltage supply
cards
In this example the +ive terminal of the24Vdc supply is connected to the output
card directly. When an output is ON
power will be supplied to that output.
E.g., if output 07 is ON then the supply
voltage will be output to the lamp.
Current will flow through the lamp and back to the common on the power
supply. The operation is very similar for
the relay switching the motor. Notice that
the ladder logic is identical to that in Fig.
3.5. With this type of output card only
one power supply can be used.
PLC cards
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 58/79
Dr. A. Ramirez-Serrano
120 V AC/DCOutput Card
in rack 01I/O group 2
00
01
02
03
04
05
06
07
24 V lamp
Relay
24 V DCPower
120 V ACPower
Motor
Supply
Supply
O:012
03
O:012
07
Motor
LampFig. 3.7 - Relay output
card example.
PLC cards
with relay
outputs
We can also use relay outputs to switch the
outputs. The example shown in Fig. 3.5 and
Fig. 3.6 is repeated yet again in Fig. 3.7 for
relay output.
In this example the 24Vdc supply is
connected directly to both relays (note that
this requires 2 connections now, whereas
the previous example only required one.)
When an output is activated the output
switches ON and power is delivered to the
output devices.
This layout is more similar to Fig. 3.6 with
the outputs supplying voltage, but the
relays could also be used to connect outputsto grounds, as in Fig. 3.5. When using relay
outputs it is possible to have each output
isolated from the next. A relay output card
could have AC and DC outputs beside each
other.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 59/79
Dr. A. Ramirez-Serrano
Some Design Issues:
Things to consider
• DC voltages are usually lower, and therefore safer (e.g., 24V).
• DC inputs are very fast, AC inputs require a longer on-time.• DC voltages can be connected to more electrical systems.
• AC signals are more immune to noise than DC.
• AC power is easier and less expensive to supply to equipment.
• AC signals are very common.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 60/79
Dr. A. Ramirez-Serrano
Relays: some terminology
Contactor - Special relays for switching large current loads.
Motor Starter - Basically a contactor in series with an overload relayto cut off when too much current is drawn.
Arc Suppression - when any relay is opened or closed an arc will
jump. This becomes a major problem with large relays. On relays
switching AC this problem can be overcome by opening the relay when
the voltage goes to zero (while crossing between negative and positive).When switching DC loads this problem can be minimized by blowing
pressurized gas across during opening to suppress the arc formation.
AC coi ls - If a normal relay coil is driven by AC power the contacts
will vibrate open and close at the frequency of the AC power. This
problem is overcome by adding a shading pole to the relay.
Although relays are rarely used for control logic, they are still essentialfor switching large power loads. Some important terminology for relays
is given below.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 61/79
Dr. A. Ramirez-Serrano
Selecting PLC relays
If the rated voltage is exceeded, the contacts will wear out prematurely, or if the voltage is too high fire is possible. The rated current is the maximum
current that should be used. When this is exceeded the device will becometoo hot, and it will fail sooner. The rated values are typically given for bothAC and DC, although DC ratings are lower than AC. If the actual loads usedare below the rated values the relays should work well indefinitely. If thevalues are exceeded a small amount the life of the relay will be shortenedaccordingly. Exceeding the values significantly may lead to immediate failureand permanent damage.
• Rated Voltage - The suggested operation voltage for the coil.Lower levels can result in failure to operate, voltages aboveshorten life.
• Rated Current - The maximum current before contact damageoccurs (welding or melting).
The most important consideration when selecting relays, or relay
outputs on a PLC, is the rated current and voltage.
Using inputs & outputs the PLCInterfacing
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 62/79
Dr. A. Ramirez-Serrano
Using inputs & outputs, the PLC is able to interface with real-world devices such as switchesand solenoids.
The actual logic of the controlsystem is established inside thePLC by means of a computerprogram. This program dictateswhich output gets energized underwhich input conditions. Although
the program itself appears to be aladder logic diagram, with switchand relay symbols, there are noactual switch contacts or relay coilsoperating inside the PLC to createthe logical relationships betweeninput and output. These areimaginary contacts and coils, if youwill. The program is entered and viewed via a personal computer connected to the PLC's
programming port.
Interfacing
PLCs
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 63/79
Dr. A. Ramirez-Serrano
Example :
It must be understood that the X1 contact, Y1 coil, connecting wires, and " power " appearing
in the personal computer's display are all virtual . They do not exist as real electrical
components. They exist as commands in a computer program -- a piece of software only --
that just happens to resemble a real relay schematic diagram.
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 64/79
Dr. A. Ramirez-Serrano
Ladder Diagrams in a PC
Equally important to understand is that the personalcomputer used to display and edit the PLC's program is notnecessary for the PLC's continued operation.
Once a program has been loaded to the PLC from thepersonal computer, the personal computer may beunplugged from the PLC, and the PLC will continue to followthe programmed commands. I included the personalcomputer display in the previous illustrations for your sakeonly, in aiding to understand the relationship between real-
life conditions ( switch closure and lamp status) and the program'sstatus ("power" through virtual contacts and virtual coils).
El t i l Wi i Di
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 65/79
Dr. A. Ramirez-Serrano
Electrical Wiring Diagrams
When a controls cabinet is designed or when acontrol system is implemented and constructedladder diagrams are used to document thewiring.
In order to design these diagrams several thingsare needed:
1. Know and use the device symbols used in industrial control,
2. Know how to use and connect industrial devices to PLCs, and
3. Know how to represent electric circuits using ladder logic.
Electrical Wiring Diagrams:
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 66/79
Dr. A. Ramirez-Serrano
Electrical Wiring Diagrams:
Example
A basic wiring diagram is shown in the next slide. In this examplethe system would be supplied with AC power (120Vac or 220Vac) onthe left and right rails.
Some diagram descriptions:1. The lines of these diagrams are numbered, and these numbers are
typically used to number wires when building the electrical system.2. The switch before line 010 is a master disconnect for the power tothe entire system.
3. A fuse is used after the disconnect to limit the maximum current drawn by the system.
4. Line 020 of the diagram is used to control power to the outputs of the system.
5. The stop button is normally closed, while the start button isnormally open.
6. The branch, and output of the rung are CR1, which is a master control relay.
7. The PLC receives power on line 30 of the diagram.
L1 N
Master switch
Li 020 i d l h
AC power
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 67/79
Dr. A. Ramirez-Serrano
Wiring
Diagram
Example
PLCL1 N
I:0/0
I:0/1
I:0/2
I:0/3
ac com
O:0/0
O:0/0
O:0/0
O:0/0
stop start
CR1
CR1
CR1
CR1
MCR
PB1
LS1
PB2
CR2
CR2
L1 NDrill Station
010
020
030
040
050
060
070
080
090
100
110
120
130
R
G
L1
L2
S1
040
050
060
070
090
100
110
120
Fuse Line 020 is used to control power to the
outputs of the system
Normally open start button
Normally closed
stop button
Master Control Relay
PLC neutral (ground)
PLC power
Normally open switches
NO push button
Limit switch
NC push button
The stop button is a Fail-safe design
• Stop = Normally closed;
• Start = Normal ly open.
Apply power tooutputs 90-1
100-1
110-1
120-1
90-1
100-1
110-1
120-1
These power the relay outputs of the PLC
JIC Wi i S b l
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 68/79
Dr. A. Ramirez-Serrano
JIC Wiring Symbols
To standardize electrical schematics, the J oint I nternational C ommittee (JIC) symbols were developed, some of these symbols are shown in the
following figures.
disconnect circuit interrupter
breaker (3 phase AC)normally openlimit switch
normally closedlimit switch
normally open push-button
normally closed push-button double pole
push-button
mushroom head
push-button
(3 phase AC) (3 phase AC)
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 69/79
Dr. A. Ramirez-Serrano
Problem : You are planning a project that will be controlled by aPLC. Before ordering parts you decide to plan the basic wiring and
select appropriate input and output cards.
The devices that we will use for inputs are:
• 2 contact switches,• a push button, and • a thermal switch.
The output will be for:
• a 24Vdc solenoid valve,• a 110Vac light bulb, and • a 220Vac 50HP motor.
Sketch the basic wiring including PLC cards.
Case Study
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 70/79
Dr. A. Ramirez-Serrano
PLC Versatility
The true power and versatility of a PLC is revealed when wewant to alter the behavior of a control system.
Since the PLC is a programmable device, we can alter itsbehavior by changing the commands we give it, withouthaving to reconfigure the electrical components connected to
it.
For example, suppose we wanted to make the previousswitch-and-lamp circuit function in an inverted fashion: pushthe button to make the lamp turn off, and release it to make it turn on.
The "hardware" solution would require that a normally-closedpushbutton switch be substituted for the normally-openswitch currently in place. The "software" solution is mucheasier: just alter the program so that contact X1 is normally-closed rather than normally-open.
E l
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 71/79
Dr. A. Ramirez-Serrano
Example :
In the following illustration, we have the altered system shown previously where the pushbutton is unactuated (not being pressed):
In this illustration, the switch is shown
actuated (pressed), but the light is off.
PLC Input Versatility
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 72/79
Dr. A. Ramirez-Serrano
PLC Input Versatility
One of the advantages of implementing logical control insoftware rather than in hardware isthat input signals can be re-used asmany times in the program as isnecessary.
For example, take the following circuit andprogram, designed to energize the lamp if at least two of the three pushbuttonswitches are simultaneously actuated:
To build an equivalent circuit using electromechanical relays, three relays with two normally-
open contacts each would have to be used, to provide two contacts per input switch. Using a
PLC, however, we can program as many contacts as we wish for each "X" input without
adding additional hardware, since each input and each output is nothing more than a single bit
in the PLC's digital memory (either 0 or 1), and can be recalled as many times as necessary.
PLC Output Versatility
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 73/79
Dr. A. Ramirez-Serrano
PLC Output Versatility
Furthermore, similar to inputs’ versatility since each output in the PLC is nothingmore than a bit in its memory as well, wecan assign contacts in a PLC program"actuated" by an output (Y) status.
Take for instance the system on the right,
a motor start-stop control circuit:
The pushbutton switch connected to input X1 serves as the "Start" switch, while the
switch connected to input X2 serves as the "Stop." Another contact in the program,
named Y1, uses the output coil status as a seal-in contact, directly, so that the motor
contactor will continue to be energized after the "Start" pushbutton switch is released.
You can see the normally-closed contact X2 appear in a colored block, showing that it is
in a closed ("electrically conducting ") state.
Seal-in behavior: Motor control circui t
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 74/79
Dr. A. Ramirez-Serrano
If we were to press the "Start" button, input X1 would energize,
thus "closing" the X1 contact inthe program, sending "power" tothe Y1 "coil," energizing the Y1output and applying 120 volt AC power to the real motor contactor coil. The parallel Y1 contact willalso "close," thus latching the"circuit" in an energized state:
Now, if we release the "Start" pushbutton, the normally-open X1
"contact" will return to its "open" state, but the motor will continue
to run because the Y1 seal-in "contact" continues to provide
"continuity" to "power" coil Y1, thus keeping the Y1 outputenergized:
To stop the motor, we must momentarily press
the "Stop" pushbutton, which will energize the
X2 input and "open" the normally-closed
"contact," breaking continuity to the Y1 "coil:"
When the "Stop" push button is
released, input X2
will de-energize,
returning "contact"
X2 to its normal,
"closed" state. Themotor, however,
will not start again
until the "Start"
pushbutton is
actuated, because
the "seal-in" of Y1
has been lost:
Always consider a fail-safe
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 75/79
Dr. A. Ramirez-Serrano
Always consider a fail-safe
design
An important point to make here is that fail-safe design
is just as important in PLC-controlled systems as it is in
electromechanical relay-controlled systems.
One should always consider the effects of failed (open )wiring on the device or devices being controlled. In this
motor control circuit example, we have a
problem: if the input wiring for X2 (the
"Stop " switch) were to fail open, there would
be no way to stop the motor!
Example:
Explanation of the solution:When the normally-closed "Stop" pushbutton switch is unactuated (not pressed),th PLC' X2 i t ill b i d th " l i " th X2 " t t" i id th
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 76/79
Dr. A. Ramirez-Serrano
Example:
Implement the seal-inmotor control shown inprevious slides usingfail-safe?
The solution tothis problem is areversal of logic
between the X2"contact " insidethe PLC programand the actual"Stop"pushbuttonswitch:
One Possible Solution:
the PLC's X2 input will be energized, thus "closing" the X2 "contact" inside theprogram. This allows the motor to be started when input X1 is energized, andallows it to continue to run when the "Start" pushbutton is no longer pressed.When the "Stop" pushbutton is actuated, input X2 will de-energize, thus"opening" the X2 "contact" inside the PLC program and shutting off the motor. So,
we see there is no operational difference between this new design and theprevious design.
However, if the input wiring on input X2 were to fail open, X2 input would de-energize in the same manner as when the "Stop" pushbutton is pressed. Theresult, then, for a wiring failure on the X2 input is that the motor will immediatelyshut off. This is a safer design than the one previously shown, where a "Stop"switch wiring failure would have resulted in an inability to turn off the motor.
Control Relays
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 77/79
Dr. A. Ramirez-Serrano
Control Relays
To demonstrate how one of these "internal" relays might beused, consider the following example circuit and program,
designed to emulate the function of a three-input NAND gate.Since PLC program elements are typically designed by singleletters, I will call the internal control relay "C1" rather than"CR1" as would be customary in a relay control circuit:
In addition to input (X) and output (Y) program elements, PLCs provide "internal "coils and contacts with no intrinsic connection to the outside world. These are used
much the same as "control relays" (CR1, CR2, etc.) are used in standard relay
circuits: to provide logic signal inversion when necessary.
In this circuit, the lamp will remain lit so long as any of the
pushbuttons remain unactuated (unpressed). To make the lamp
turn off, we will have to actuate (press) all three switches, like
this:
Important characteristics of
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 78/79
Dr. A. Ramirez-Serrano
Important characteristics of
PLCs
Allow multiple inputs and outputs.
PLCs can form networks of interconnected
elements enabling the control dozens of devices.
Allow remote monitoring of
the system under control
Th k !
7/30/2019 PLCs Ladder Logic 5
http://slidepdf.com/reader/full/plcs-ladder-logic-5 79/79
Thank you!
Next class: XXXXTime: 11:00 a.m.
Place: ME 322
Recommended