Basic Ladder Logic (Full Lecture)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[upbeat music] Good day and welcome to Big Bad Tech. I'm your instructor Jim Pytel. Today's topic of discussion is Basic Ladder Logic. Our objective today, is to take an introductory look at ladder logic diagrams. The principal means electrical controlled systems used to document and convey not only connection of individual devices making up the system, but also the function of that system. Additionally, this lecture includes coverage of a handy configuration called the holdin circuit. Recall during the introduction to electrically controlled systems lecture available at the Big Bad Tech channel, we briefly discussed ladder logic diagrams. Ladder logic diagrams flatten out traditional schematics and make connection and function easily readable and apparent to those practiced during their use. Ladder logic is a new language. And quite like learning a new language, necessitates repeated exposure and practice. Feel free to pause, rewind and review this lecture as needed since it establishes important grammatical rules and applies it to common industrial applications. Consider traditional schematics used to draw a DC source in a series circuit with a momentary normally open push button and a solenoid of a solenoid operated hydraulic valve. When push button one is closed, it completes a path from X1 through solenoid A to X2. The hydraulic schematic indicates that when solenoid A is energized, it would shift to the straight through position and the solenoid would extend to the limits of travel. When released, the momentary normally open push button one spring return returns it to its deactivated open state. Solenoid A would be de-energized and the spring offset directional control valve will return the valve to the cross connect position and the single acting cylinder would retract due to the spring inside the rod end. This is effective and understandable. However, the use of traditional schematics would be very cumbersome for a complicated circuit. For this reason, pilot schematics are ordinarily drawn using something called ladder logic. Tough luck compressing the hydraulic schematic. A ladder logic diagram basically flattens out a traditional schematic into readable lines, where each line is a path from one terminal of the source to the other. It is readily apparent that in order to complete a conductive path from the hot or high side X1 through solenoid A to the lower neutral side X2, one must close push button one. The low voltage output of the control transformer or the power supply in the case of a DC control voltage, X1 and X2 are now represented as the left and right side of vertical upright rails of a ladder. And the conductive path from X1 to X2 is represented as a rung on that ladder. A ladder logic diagram for an electrical control system incorporating motors and magnetic contactors is almost identical. One would show a control transformer output used to step down primary voltage between any two phases to pilot voltage as upright vertical rails. X1 being the left and X2 being the right. If one was to draw both the pilot and the primary schematics using the same diagram, ordinarily the pilot low voltage ladder logic diagram is drawn in thin lines and the primary high voltage schematic is drawn in thick lines. I tend to find this method a little busy and confusing. So I ordinarily draw the pilot and primary schematic separately. Realize the primary and pilot schematics are linked via magnetic or mechanical means. The pilot signal is low voltage, low current, low power electricity entirely separate and electrically isolated from the high voltage, high current, high power primary input and must always remain so. The only interaction between the pilot and primary electrical signals, is via magnetic or mechanical means. Examples would be the transformer, the contactor coil and the overload relay. They are electrically isolated for a reason and the primary reason is safety. Pilot signals for modern electrically controlled systems are ordinarily 120 volts AC or 24 volts DC as representative examples. With a notable progressive movement favoring 24 volts DC. It is plainly evident that these levels of electricity are not nearly as dangerous as high voltage electricity used to deliver power to an industrial motor nor nearly as dirty as oil based pilot signals for a hydraulic system. That's the point. The customary use of low voltage, low current, low power electrical pilot signals, offer a degree of ease, safety and isolation for operators and technicians assigned to install, maintain, troubleshoot, upgrade, operate and repair electrically controlled systems. Let me simplify a ladder logic diagram ever so slightly. Again this ladder logic diagram flattens out the traditional schematic and it makes readily apparent that in order to complete a conductive path from a hot or high side X1 through coil F to the lower neutral side X2, one must close the start push button. When the F coil is energized by the pilot signal, the F contactor closes the three primary contacts. Note this pilot schematic includes normally closed overload elements in series with the normally open start push button and the F coil. Consider the significance of this arrangement. Consider an operator pressing the normally open start push button which energizes the F coil which closes the primary F contactor, the motor is energized and begins rotating. However, due to misalignment of the shaft or a bad bearing the rotor locks up. The locked rotor condition begets unusually high primary current which heats up the stator windings, at which point the overload element signals the normally closed overload contact to open. Despite the operator maintaining closure of the normally open start push button, the F coil de-energizes because there is no path from X1 to X2. The de-energized F coil means the F primary contacts open and the motor de-energizes until such time the overloads are given a chance to cool, at which time the normally closed overload contact would reclose. The normally closed nature of the overload contact disallows operation of this system until it is safe to do so. Cool or not cool? Trick Question. This is totally cool. The ladder logic diagram illustrates this function in a single line. The only way you can turn this motor on, is if you're pressing the start push button, and the overloads aren't overheated. Which begs the question, how do you turn on a motor or extend a cylinder at the touch of a button? I don't know about you, but standing around holding down a momentary normally open push button all day to run a stupid fan or a dumb pump, isn't one of the things I consider a awarding priority. Before we open up this barrel of rage infected bunkies though, let's lay down some ground rules about ladder logic diagrams. First and foremost, if one needs to ground reference the output of the control transformer or DC power supply, one customarily does so on the right hand side of the pilot ladder logic diagram. In this case, the right hand X2 upright rail. This ensures that overcurrent protection devices like fuses and circuit breakers function as intended and ensures that an errant connection of ground does not inadvertently start a hydraulic system or motor. This is to suggest that ladder logic diagrams prefer high side switching arrangements. I'll come back to clarify this point in a moment. ladder logic diagrams only show pilot rated electrically active components like switches, pilot lamps, control relays, contactor coils and the solenoids or solenoid operated directional control valves. Primary devices like hydraulic components or contactors aren't included. These devices would appear in the primary hydraulic or electrical schematic. Ladder logic diagrams illustrate the connection of pilot devices only. Input devices like switches are ordinarily drawn on the left side of a rung. The one exception of this rule is the normally closed overload contacts which are a form of input placed on the extreme right. Output devices like coils or electrical loads, one of rungs input devices allow closure from one upright to the other, the load is energized. Outputs normally go on the right. A series connection of two normally open switches means both push button one and push button two must be simultaneously closed to energize lamp A. This is the logical AND operator and its function is readily apparent as illustrated by the ladder logic diagram. A parallel connection of two normally open switches means either push button three or push button four must be closed, or both together to energize lamp B. This is the logical OR operator and its function is readily apparent, as illustrated by the ladder logic diagram. Input and output devices are ordinarily only featured in the horizontal rungs. The vertical uprights are power connections only. The one exception of this rule I've occasionally observed, is the placement of fuses and main shut offs in the vertical uprights. The fuses aren't really elements in the ladder logic, but rather serve to protect the pilot circuit from short circuit events. A rung in the ladder logic diagram is never composed of input devices only. If an operator closed push button five, the rung would experience a short circuit from X1 to X2 with no opposition to current flow. The fuse in the vertical upright would blow and your lab instructor would issue you an express ticket to push up land if you were to ever do something stupid like this. This is all sorts of wrong. This is to suggest the maxim that all rungs must contain one electrical load. Similarly, load devices aren't ordinarily directly connected from one vertical upright to the next unless you want that device continually energized. Lamp C would always be energized. What's the logic in that? Our diagram and list is getting a little bit long so let's go ahead and give ourselves some room. Next, loads are never placed in series with one another. Load devices in ladder logic diagrams are designed to operate at full pilot voltage. Assuming equal resistance of lamp D and E. If push button six was closed, we'd see 12 volts across lamp D and the other 12 volts across lamp E, assuming 24 volts DC pilot voltage. This is wrong. Both lamps would be dim if they operated at all. This is to suggest the maximum one load per rung. Load devices must be placed in parallel with one another if they are to be simultaneously energized. The closure of push button seven would energize both lamp F and lamp G with a full 24 volts DC they are intended to operate at. Ladder logic diagrams must be properly documented, referenced and feature properly numbered rungs and wires and fully identified components, terminals and contacts. We'll discuss documentation, rung numbering, wire numbering, component identification and referencing in a later lecture. Finally, and this may sound like nonsense to you right now, but you'll appreciate this advice later. All internal logical loads ordinarily appear in the top half of a ladder logic diagram and all external output loads appear in the bottom half. An example might be an electrically controlled system using a control relay, a timer, a counter, a solenoid and a pilot lamp. A control relay, counter and timer, since they perform internal logic functions, would be in the top half of the ladder logic diagram. And the solenoid and pilot lamp, since they are observable external outputs, would appear in the bottom half. Again, this will make more sense as we extend our analysis into increasingly complicated electrically controlled systems. Consider this simple ladder logic diagram consisting of two rungs. Rung one is composed of a series connection of a momentary normally closed push button one and a red pilot lamp. Rung two is composed of a series connection of a momentary normally open push button two and a green pilot lamp. Let's see if we can interpret the ladder logic diagram and predict its behavior using this simple rule. All schematics all the time are always drawn in their depowered state. This means normally closed push button one is closed, and normally open push button two is open as implied by their titles. The normally closed push button one keeps the red pilot lamp in the energized state. The normally open push button two keeps the green pilot lamp in the de-energize state. The natural start state for this system is therefore red light on, green light off. If an operator actuated normally closed push button one, push button one would open and the red pilot lap would de-energize. The state of the system is now red light off, green light off. Note I'm drawing normally closed push button one being actuated into its activated open state. When an operator releases the momentary normally closed push button one, the spring return returns PB1 to it's deactivated closed state and the red light turns on. We're back at the start state. If an operator actuated normally open push button two, PB2 would close and the green pilot lamp would energize. The state of the system is now red light on, green light on. Note I'm drawing normally open PB2 being actuated into its activated closed state. When an operator releases the momentary normally open PB2, the spring return returns PB2 back to its deactivated open state and the green light turns off. We're back at the start state. Finally, if an operator were to actuate both normally closed push button one and normally open push button two simultaneously, PB1 would open and PB2 would close. The red pilot lamp would de-energize and the green pilot lamp would energize. The state of the system is now red light off, green light on. Note I'm drawing normally closed PB1 being actuated into its activated open state. A normally open PB2 being actuated into its activated closed state. When an operator releases both buttons, the spring return returns the buttons back to their deactivated states. We're back at the start state. Red light on, green light off. Consider this subtle modification to the same ladder logic diagram. Two independent push buttons have now been replaced with a single break make push button package PBX, consisting of a mechanically interlocked normally closed and normally open connection. In the deenergized start state, the red light is on and the green light is off. When an operator presses a single push button for the mechanically interlocked brake make push button package, the normally closed contact opens and the normally open contact closes at the push of a single button. The red light turns off and the green light comes on. This subtle modification, the inclusion of a mechanically interlocked push button package has fundamentally changed the behavior of this electrically controlled system. Consider a control relay, CR1 and its associated contacts, CR1A, CR1B, and CR1C. Note the associated contacts are single pole double throw transfer switches that have a common terminal in a choice of either a normally closed or normally open connection. For those interested, I've included the terminal numbers. Recall from the control relays lecture available at the Big Bad Tech channel. That when a control relays coil's energized, the associated contacts would change states. When the CR1 coil's energized, the normally closed contacts would open and the normally open contacts would close. If the coil was de-energized, the switches would returned to their deactivated states. Consider application of such a relay in a ladder logic diagram. Rung one is a series connection of a momentary contact, normally open push button one and a coil of control relay CR1. Rung two is a series connection of the normally closed side of the associated contact CR1A and a red pilot lamp. Rung three is a series connection of the normally open side of the associated contact CR1B and a green pilot lamp. Notice I've drawn the coil for CR1 and the contacts associated with the same coil in the same color. If you've got this option available, use it. As our ladder logic diagrams get more and more complicated, you'll appreciate this luxury. We'll discuss referencing, another technique to facilitate comprehension in a later lecture. How will this electric controlled system initiate operation? And how will it respond to an operator pressing and releasing push button one? By all means, pause the lecture and think this through. In its depowered state, the normally open push button one, prevents coil CR1 from being energized. This means the associated contacts are on their natural deactivated state. The normally closed side of CR1A is closed. The normally open side of CR1B is open. The normally closed CR1A contact would energize the red pilot lamp. The normally open side of the CR1B contact would deenergize the green pilot lamp. The red light is on, the green light is off. This is the natural start state for this system. If an operator were to close push button one, the normally open switch would close and the coil of CR1 would be energized. When the coil of CR1 energizes, its associated contacts would change states. The normally closed side of CR1A would open and the normally open side of CR1B would close. The now open CR1A contact de-energizes the red pilot lamp. The now closed CR1B contact energizes the green pilot lamp. The red lamp is off, the green map is on. If an operator were to release the momentary normally open push button one, the spring return returns it to its natural deactivated normally open state. The CR1 coil de-energizes and the associated contacts return to their deactivated state. The normally closed side of CR1A closes, the normally open side of CR1B opens. The red lamp is on, the green lamp is off. We've returned to the natural start state. How different is the behavior of this ladder logic diagram using control relays from that of our earlier example of a mechanically interlocked push button package? The answer is, it isn't. It's just a different style of implementing the same function. In both cases the natural state for this system was red light on, green light off. When an operator pressed a single button, the red light turned off and the green light came on. When an operator released the button, the system returned to its natural start state. This is to suggest that there is more than one way you can solve a problem and you're only limited by your resources, time and creativity. Let's modify this ladder logic diagram ever so slightly in the rung 2. The green lamp and the new rung 2 is swapped out for the solenoid of a solenoid operated hydraulic valve. This is just an ever so slightly different implementation of the first ladder logic diagram I drew in this lecture. Rather than push button one directly energizing or de-energizing solenoid A, it does so via the control relay intermediary. If an operator were to press momentary push button one, the normally open switch would close and the coil of CR1 would be energized. When the coil of CR1 energizes, its associated contacts would change states. Normally open CR1B would close. The now closed CR1B contact energizes solenoid A. The energized solenoid A shifts DCV1 to its straight through position and the cylinder extends until it reaches the limits of travel and the pressure relief valve opens or such time the operator releases momentary push button one. When released, push button one opens and de-energizes the coil of CR1. The associated contacts return to their deactivated states. The normally open CR1B opens. The solenoid is de-energized and the spring offset, directional control valve one, returns to the cross connected position and the single acting cylinder retracts. Notice the cylinder will only extend if an operator is continually holding down the momentary contact push button one. If at any time the operator released push button one, the cylinder would retract, even if it was in mid stroke. This could be a desirable trait for some electrical controlled systems. However, it could be a major disadvantage for others. Ordinarily, you want a system to function without constant human intervention. Consider this subtle modification to the ladder logic diagram by incorporating one of CR1 associated contacts. This time, the normally open side of CR1A in parallel with push button one. How would this change the function of the system? By all means, pause the lecture and think about it. Here's a clue for those of you that are bold enough to tackle this on your own. When the coil of a relay is energized, its associated contacts change states. If an operator were to press momentary push button one, the normally open switch would close and the coil of control relay CR1 would be energized by the closed PB1 path. When the coil of CR1 energizes, its associated contacts change sates. The normally open side of CR1B closes and energizes the solenoid A as previously. Notice however, that the normally open CR1A contact in parallel with PB1 also closes. This means an operator can release momentary contact push button one and the now closed CR1A contact maintains or holds the energized state of CR1's coil. This means CR1B stays closed and solenoid A stays energized and directional control Valve one remains shifted into the straight through position. This could be a major advantage. This electrical controlled hydraulic system now completely extends this cylinder to the limits of travel without constant human intervention. An operator can press and release a single button and spend the rest of the day looking at cat pictures on the internet. The curious among you may ask, how do you retract the cylinder? As currently implemented, you can't. At least not with any degree of ease. Let's give ourselves some room and return to the natural start state for this system and modify the ladder logic diagram ever so slightly by including a momentary normally closed push button in rung one and see how this assists us in our goal. Notice this momentary normally closed push button is called stop. And the momentary normally open push button is now called start. These are two independent push buttons and they are not mechanically linked in any way. If an operator were to press the start button, The momentary normally open switch would close and via the normally closed stop button, the coil of control relay CR1 would be energized. When the coil of CR1 energizes, its associated contacts change states. The normally open side of CR1A contact in parallel with the start button closes and the normally open side of CR1B closes. This energizes the solenoid A as previously. This again means that an operator can now release the start button, and the now closed CR1A contact holds or maintains the energized state of control relay CR1's coil. This means CR1B stays closed and solenoid A stays energized and DCV1 remains shifted into the straight through position. The cylinder would extend until it reached the limits of travel and the pressure relief valve would open. To retract the cylinder, an operator must now press the normally closed stop button. The now open stop button de-energizes the control relay CR1 coil and the associated contacts return to their de-energized state. CR1A opens removing the holding path in parallel to the start push button. CR1B opens and solenoid A de-energizes. The spring offset DCV1 returns to the cross connected position and the single acting cylinder retracts. The inclusion of the normally closed stop button in rung one now allows an operator to retract the cylinder. This arrangement of a momentary normally closed stop push button, a momentary normally open start push button, a coil and a normally open associated contact in parallel with a normally open start push button is extremely useful and extremely common. So useful and so common, I am strongly suggesting you commit this circuit to memory. This circuit is sometimes called a holding latching or a memory circuit, and that it maintains the last asserted state. When you press start, it remains in this state until you press stop. When you press stop, it remains at this state until you press start. This means an operator can press and release a momentary start push button, and then just walk away. Additional devices can be added to this system to enhance safety. Consider the addition of a maintained normally closed E stop in rung one. When it's natural deactivated closed state, the E stop in no way shape or form affects functionality of the system. When an operator presses and releases start, the cylinder extends to the limits of travel. When an operator presses and releases stop, the cylinder retracts. If however, an operator were to observe an unsafe scenario, by hitting the maintained E stop, the cylinder would retract and the system would be disabled. Importantly, due to the maintained rather than the momentary nature of the E stop, the system will remain disabled until the E stop is reset. The start button will not energize CR1, and as such the solenoid will not energize nor the cylinder extend despite repeated attempts to press the start button. That's the point. The maintain E stop has disabled the system. Only after the E stop has been reset and returned to the closed position, can the system now extend the cylinder. But wait, that's not all. Considered additional functionality offered by the inclusion of yet another device. Notice we've added a normally closed limit switch in rung one. Limit switches in contrast to the manual push buttons and E stops we've thus far employed, are automatic switches and do not necessitate human intervention. Notice the limit switches located in the hydraulic schematic at the limits of travel. LS1 in the ladder logic diagram and LS1 in the hydraulic schematic are the same device. Like solenoid A, LS1 is an interaction point between the pilot electrical and the primary hydraulic system. By all means, pause the lecture and consider the repercussions of this additional automatic switch. This limit switch has in fact created a one cycle reciprocation system. One cycle reciprocation means that when an operator presses and releases the start button, this cylinder rod fully extends, strikes limit switch one and then automatically retracts, marking a complete cycle without the attention of the operator. If at any time an operator wanted to stop the cycle mid stroke and retract the cylinder, they can press the momentary stop button. This returns the system to its go state, ready to initiate another extension. The E stop in contrast, will be for dangerous situations necessitating not only a stop mid stroke and retraction, but also a complete disabling of the system until such time the E stop is reset. Let's walk through the ladder logic together and illustrate the function of this one cycle reciprocation system. If an operator were to press start, the momentary normally open start push button would close and via the normally closed E stop, the normally closed stop button, the now close start push button and the normally closed limit switch, the coil of CR1 would be energized. When the coil of CR1 energizes, its associated contacts change states. Normally open CR1A in parallel with the start button closes and the normally open CR1B contact closes and energizes solenoid A as previously. DCV1 shifts to the straight through position and the cylinder begins its extension. The operator can now release the start button and via the now closed CR1A holding contact maintains the energized state of CR1's coil. CR1B stays closed, solenoid A stays energized and DCBV1 remains shifted into the straight through position. The cylinder extends until it hits LS1 at the limits of travel. Normally closed limits switch one opens and de-energizes the CR1 coil. The contacts associated with CR1 return to their de-energized state. CR1A opens removing the holding path in parallel to the start push button. CR1B opens and solenoid A de-energizes. The spring offset DCV1 returns to the cross connector position and the single acting cylinder retracts automatically. Note, while the cylinder retracts, limit switch one returns to its normally closed state since it is no longer being actuated by the cylinder rod at the limits of travel. The system returns to its natural start state ready to initiate another one cycle reciprocation. For this circuit, the stop button's only function now, is to retract the cylinder mid stroke and return to the ready state. This stop's function is similar, however, it disables the system until such time it is reset. Notice how we started with some general rules, a couple of blinking lights, and progressively worked our way into a common industrial application, taking into account safety, efficiency and automation along the way. Hopefully, this progressive approach didn't leave you in the dust. But if it did, by all means feel free to rewind and revisit portions of this lecture again. I know this may seem new and foreign to you right now, but trust me, it'll get easier and easier with more and more exposure. Keep in mind at this point in your education, I'm not asking you to design an electrically controlled system. But rather, all I'm asking you to do, is to interpret existing ladder logic diagrams. These diagrams allow a technician to not only determine how a properly functioning system will respond to a given stimuli, but also how to troubleshoot and repair an improperly functioning one. Let me reiterate that the holding circuit as illustrated in this ladder logic diagram, is a very important concept to understand. For this reason, it may warrant additional exposure on your part. Luckily, you're going to get plenty of practice, since it's a common feature in many automated systems. Later lectures will discuss motor starters, the difference between two and three wire controls, reversing starters jogging circuits, counters, timers, and more. All right, that about wraps up our discussion on basic ladder logic. Before we do so, let me remind you that hardwired relay based ladder logic is being replaced with programmed instruction sets, written inside ruggedised computers called PLCs, or programmable logic controllers. To change the functionality of an electrically controlled system employing traditional hardwired relay based ladder logic, one must physically rewire the system. Our progressively more complex ladder logic examples illustrated this fact. Every time a new device or connection was made, this necessitated a technician physically rewiring the inputs and outputs to yield the newly desired functionality. In contrast, to change the functionality of an electrically controlled system employing a PLC, one must simply reprogram the system. This is to suggest that an electrically controlled system employing a PLC is significantly easier to install, modify and troubleshoot than those employing traditional hardwired relay based ladder logic. For those concerned about the relevancy of learning traditional hard wire relay based ladder logic, take heart. PLCs are commonly programmed using something called RLL. Relay Ladder Logic. A method astoundingly similar to traditional hardwired relay based ladder logic. This is to suggest that you're learning two skills at once. An understanding of ladder logic diagrams is essential to your understanding of the function and troubleshooting of all modern electrically controlled systems. Here's a sample PLC program illustrating the same one cycle reciprocation system in RLL. You can see the obvious similarities and some important differences. We'll discuss PLCs and programming in later lectures. In conclusion, this lecture took an introductory look at basic ladder logic diagrams. We discussed the purpose and advantage of ladder logic and basic rules governing its use. Additionally, we introduced the holding circuit, and examined representative ladder logic diagrams of increasing complexity. Remember to review these concepts as often as you need to really drive it home. Imagine how well lab will go if you know what you're doing. Thank you very much for your attention and interest. We will see you again during the next lecture of our series. Remember to tell your lazy lab partner about this resource and be sure to check out the Big Bad Tech channel for additional resources and updates. [upbeat drum instrumentals]
Info
Channel: Jim Pytel
Views: 265,098
Rating: 4.9097242 out of 5
Keywords: bigbadtech, Pytel, bigbadtech.com, renewable energy, training, education, tutorial, learn, wind turbine, solar power, free, lecture, lesson, school, circuit analysis, example, basic, electronics, ladder logic, switch, coil, solenoid, contactor, pilot, control, programmable logic controller, PLC, holding, circuit, contact, normally, open, closed, held, relay, ladder, diagram, best, theory, explained, electrical, electricity
Id: qDuCusvU-mY
Channel Id: undefined
Length: 36min 4sec (2164 seconds)
Published: Sun Sep 13 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.