[upbeat music] Good day and welcome to Big Bad Tech. I'm your instructor Jim Pytel. And today we'll discuss basic PLC instructions. Our objective is to define the make, break and output enable instructions common to most PLCs. As well as differentiate between electrical continuity as required by traditional hard wire relay-based ladder logic and logical continuity as required by most PLCs. Pay attention to this lecture as it establishes fundamental ground rules about common PLC program instructions, that if misinterpreted, can be disastrous. This lecture is predicated on the assumption that viewers watched the introduction of PLCs lecture available at the Big Bad Tech channel. If you haven't watch this lecture yet, or only dimly recall its contents, please take the time to do so now. Programmable logic controllers, or PLCs, are programmed using one of five accepted languages where the choice of language depends upon the region where the PLC is employed. The languages include graphical means like relay ladder logic diagrams, function block diagrams, sequential function charts, and textual methods like statement or instructions list and structured text. A popular graphical method, ladder logic, mimics the schematics customarily employed in traditional hardware relay-based ladder logic including vertical upright power rails and rungs containing instructions in the process sequence. We'll start by discussing two input instructions, make and break, and one output instruction, output enable central to programing a PLC using ladder logic. Often a PLC, running a ladder logic program summarizes three simple steps. First, the PLC examines a logical states of inputs. Then, it executes the ladder logic program in a sequential rung-by-rung manner. And finally, delivers appropriate logical outputs. The amount of time a PLC takes to examine inputs, execute the program and deliver outputs is known as scan time. Where scan time is a function of a program's complexity and length. When programming a PLC, it is a recommended practice to minimize the number of instructions and rungs to minimize both the scan time and size of the stored program. Let's first discuss the two input instructions, make and break. Alternatively, these instructions are known as XIC, examine if closed, and XIO, examine if open. Another extremely helpful way of thinking about these instructions is if and if not. Before we begin, I will not apologize for the regrettable terms employed by some PLC manufacturers since it was not I that coined them, but rather historical inertia has dragged these antiquated terms into modernity quite like the human appendix and US customary measurement units. They are stupid and I don't like them anymore than you do, but we're stuck with them, so we may as well get used to them. There are good ways, bad ways, and extremely convoluted and long-winded ways to differentiate between these two important PLC instructions, but I'm going to do my best to make this distinction clear and concise. I am asking you to jettison any baggage you may have with these concepts and just sit back and listen. Long story short, I don't care how you learn this topic. All I'm asking is that you learn it and don't forget it. The instructional methods as presented in this lecture have helped a number of my former students shortcut the nonsense and not second guess themselves to death. First and foremost, the terms normally open and normally closed are used only to describe the electromechanical nature of real world field input devices like switches and contacts and should never ever be used to describe instructions in a PLC. This push button is normally closed. This pushbutton is normally open. In the deactivated state, as the name implies, the normally closed contact is closed and the normally open contact is open. In the opposite activated state, the normally closed contact is held open and the normally open contact is held closed. Similarly, this electromechanical relay has both normally closed and normally open associated contacts. Again, when the coil of the relay is in the deenergized state, the associated contacts are in their deactivated states. The normally closed contacts are closed and the normally open contacts are open. When the relay coil is in the energized state, the associated contacts switch to their opposite activated state. The normally closed contact opens and the normally open contacts close. When the coil is deenergized, the associated contacts revert to their deactivated state. These concepts should not be a surprise. And if they are, I am sending you all the way back to the beginning of the Basic Electronics One DC Circuit Analysis Playlist to begin a new. Look me up again in three to four months once you've got this concept down. The fundamental confusion regarding the programmed instructions used by PLCs lies in the fact that the make and break symbols commonly used in PLC programs look like normally open and normally closed contacts and people often mistakenly refer to them in this manner. I must reiterate, the terms normally open and normally closed are used only for the electromechanical nature of real world field input devices like switches and contacts and should never ever be used to describe instructions in a PLC. This symbol is a make, examine if closed, XIC or if instruction. This symbol is a break, examine if open, XIO or if not instruction. There are a lot of confusing entangled methods of defining and differentiating these instructions from each other, and between the logical nature of PLC instructions and electromechanical nature of field input devices, but I will cut straight to the point. PLCs look for logically asserted values. And the two instructions respond differently to the logical states of inputs. Let's first discuss how field devices deliver logical values to PLC input modules. A switch, by its nature, is a digital device in that it can be placed in one of two mutually exclusive binary states, either open or closed. Never a little bit of both, or halfway in between. When a switch between the source and the input is open, it does not deliver a voltage signal to the input and can be considered delivering a logical zero, low or false. When a switch between the source and the input is closed, it does deliver a voltage signal to the input and it'd be considered delivering a logical one high or true. The terms zero, low or false and one, high or true are simply shorthand for the absence or presence of full pilot voltage. For a system using 24 volt DC control voltage, zero volts would be considered a logical zero. And full 24 volts DC would be considered a logical one. In a perfect world, there exist an impassable no man's land between these two digital states, considered invalid. However in the real world, there's a bit of slop. For example, consider PLC intended to operate using 24 volt DC that considers control signals between zero and five volts a logical zero and the values between 15 and 24 volts a logical one. There still exists in invalid region between five and 15. However the targets for logical zero and logical one are a little larger now allowing a degree of error due to real world signal attenuation or poor connection. Different manufacturers may specify different acceptable ranges for logical zero and one. Consult the datasheet for your particular device of interest. Note the definitions of logical zero and logical one are rooted in something called positive logic. And that the absence of voltage is a logical zero, and the presence of voltage is a logical one. The same definition stood on its head could be used in something called negative logic. But this is stupid and confusing. Positive logic is the law, but that doesn't mean people don't disobey it. Be aware of this possibility. Now that we've established some pretty concrete expectations how field input devices deliver logical values to a PLC, let's discuss how the two instructions, make and break, respond to the received logical values. Pay attention, because this is important and I'm only going to say it like a million times over the course of this lecture and the next and the next and the next. If a make instruction receives a logical zero at the input, it does not allow logical continuity left or right. If a make instruction receives a logical one at the input, it does allow logical continuity from left to right. In contrast, if a break instruction receives a logical zero at the input, it does allow logical continuity from left to right. If a break instruction receives a logical one at the input, it does not allow logical continuity from left to right. Put this in your pipe and smoke it. Note I'm using the term logical continuity as if a PLC program really established or interrupted current to an output, but this is analogy only. However, using the graphical ladder logic programming method it's still very helpful to think of it in this manner. One can think of the left upright rail as a source of logical ones, i.e. full control voltage. And to logically energize an output on the right, a rung must deliver a logical one from left to right. Before we examine these input instructions in greater detail we need to discuss the output enable or OTE function. Luckily this is easy because we're going to use positive logic. If an output receives a logical zero, it is not enabled. If an output receives a logical one, it is enabled. The output enable instruction looks remarkably similar to a contact or coil and is often illustrated in a PLC program as a parentheses enclosing the output of interest. Loads hooked to a PLC output include the coils of contactors, the solenoids of fluid power valves and the indicators like LEDs. Normally, a PLC delivers output signals via an electromechanical relay for AC or DC loads, a solid-state transistor exclusively for DC loads or a TRAIC or back-to-back reverse parallel SCR exclusively for AC loads. Let's assume we're dealing with electromechanical relay outputs, since they're the easiest to understand. We'll discuss the peculiarities of the solid-state devices in other lectures. If an assigned output receives a logical zero, be the output enable instruction, the electromechanical relay coil is deenergized, and the contact remains in the deactivated open state. Whatever load is attached to that contact is similarly deenergized. If an assigned output receives a logical one be the output enable instruction, the electromechanical relay coil is energized and the contact is actuated into the activated closed state. Whatever load is attached to that contact is similarly energized. Now that we got a basic understanding and definition of the make, break and output enable instructions, let's examine some simple PLC programs and see how they respond to various field input devices in various actuation states. Consider a one input, one output PLC using 24-volt DC control logic with a single field input device on input one and a pilot lamp on electromechanical relay output Q one. Note the electromechanical nature of the field input device is normally open. And I1 has been instantiated as a make instruction controlling output Q one. Consider the response of the system for two different scenarios. First, when the field input device is in its deactivated open state. And again when it is in its activated closed state. When the field input device is in its deactivated open state input one is receiving a logical zero. Being a make instruction, this means the PLC program does not permit logical continuity from left to right and the output remains deenergized. When the field input device is in it's activated closed state, input one is receiving a logical one. Being a make instruction, this means the PLC program does permit logical continuity from left to right and the output is energized. A coil of electromechanical relay Q one is energized and its associated contacts close. The pilot lamp on output Q one is energized. Note, some PLC manufacturers offer simulation utilities and the ability to remotely monitor a program in operation. A manufacturer may illustrate those conditions that permit logical continuity and alternate colors are bold such as I have using pink while keeping the instruction symbol the same. Let's step it up a notch by performing the same analysis on the same program with only a subtle difference. This time, the electromechanical nature of the field input device attached to input one is normally closed. Note the program is still written using a make instruction despite the radically different electromechanical nature of the field input device. PLCs allow this flexibility. And I must again remind you that the electromechanical nature of the input device has absolutely nothing to do with how that particular input is logically instantiated in a PLC program. Again, let's consider the response of this system for two different scenarios. First, when the field input device is in its deactivated closed state and again when it's in its activated open state. When the field input device is in its deactivated closed state, input one is receiving a logical one. Being a make instruction, this means the PLC program does permit logical continuity from left to right, and output Q one is energized. The coil of electromechanical relay Q one is energized and its associated contacts close. The pilot lamp on Q one illuminates. When the field input device is in it's activated open state, input one is receiving a logical zero. Being a make instruction, this examines the PLC program does not permit logical continuity from left to right and output Q one is deenergized. Electromechanical relay Q one opens, and the pilot lamp on Q one is unilluminated. Although different field input devices were employed for these two different examples, notice how the make instruction responded consistently with a logical values as received by the input. If the make instruction receives a logical zero at the input it did not allow logical continuity from left to right. If the make instruction received a logical one at the input it did allow logical continuity from left to right. The electromechanical nature of the field input device had nothing to do with how the make instruction responded. The make instruction only bases its decision off the logical value at the input. Most students don't have issues with make instruction and its response to various input devices in various states since it follows a predictable pattern that closely mimics electrical continuity and traditional hard wire relay-based ladder logic. The break instruction however is where folks get lost. Be warned, things are about to get weird. At risk of blowing your mind, let's now examine the break instruction and its response to various input devices in various actuation states. The break instruction, like the make instruction, does not take into account the electromechanical nature of the field input device attached to a particular input but rather only bases its decision off the logical value at the input. The break instruction however, is essentially opposite of the make instruction in that it allows logical continuity when an input experience is a logical zero. Where as it disallows logical continuity when an input experiences a logical one. Consider a normally open field input device attached to input one, where input one has been instantiated in the PLC program as a break instruction controlling output Q one. Once again, consider the response of this system for two different scenarios. First, when the field input device is in its deactivated open state and again when it's in its activated closed state. Again, note the program is written using a break instruction. It allows logical continuity when an input experiences a logical zero and disallows logical continuity when an input experiences a logical one. When the field input device is in its deactivated open state input one is receiving a logical zero. Being a break instruction, this means the PLC program does permit logical continuity from left to right, and Q one is energized. The Q one electromechanical relay closes, and the pilot lamp illuminates. When the field input device is in its activated closed state input one is receiving a logical one. Being a break instruction, this means the PLC program does not permit logical continuity from left to right and output Q one is deenergized. Electromechanical relay Q one opens, and the pilot lamp turns off. The break instruction in my experience is one of the hardest scenarios for those just introduced to this topic to understand. Again, PLC program instructions have nothing to do with the electromechanical nature. Normally open or normally close of the field input device, they simply respond to logical values as received by the inputs. As if that wasn't enough, let's now perform the same analysis on the same program with only a subtle difference. This time the field input device attached to input one is electromechanically normally closed by nature. Let's consider the response of this system for two different scenarios. First when the field input device is in its deactivated closed state and again when it is in its activated open state. Again, note the field input device's electromechanical nature is normally closed and the program is written using a break instruction that allows logical continuity when an input experiences a logical zero. And disallows logical continuity when an input experiences a logical one. When the field input device is in its deactivated closed state, input one is receiving a logical one. Being a break instruction, this means the PLC program does not permit logical continuity from left to right and the output remains deenergized. The pilot lamp is off. When the field input device is in its activated open state input one is receiving a logical zero. Being a break instruction, this means the PLC program does permit logical continuity from left to right and output Q one is asserted. Electromechanical relay Q one closes and the pilot lamp illuminates. Again, note how the break instruction responded consistently with the logical values as received by the input despite the differing electromechanical nature of the various field input devices. If the break instruction received a logical zero at the input, it did allow logical continuity from left to right. If the break instruction received a logical one at the input it did not allow logical continuity from left to right. The electromechanical nature of the field input has nothing to do with how the break instruction responds. The break instruction only bases its decision off the logical value at the input. Note that the flexibility offered by the make and break instruction set is one of the major advantages of PLC programs and you simply must understand the differences between the two if you expect to proceed any further in this playlist. Too often, the subtleties bounce off the skulls of many viewers when first introduced this topic. So I consider it my highest duty to force it through their skulls with repeated aggressive hammering. In pursuit of this goal, consider all eight possible combinations of electromechanical field input devices, normally opened or normally closed, in various actuation states, deactivated or activated, examine with both instructions, make or break and the result in response. I'm going to walk you through this list once and if at the end of this analysis you don't dig this on every level that I do, I'm asking that you please pause the lecture and stare at this list without blinking until you do so. Consider a normally open switch in the deactivated open state instantiated in a PLC program as a make instruction. In a deactivated open state, this switch delivers a logical zero to the input and the make instruction does not allow logical continuity and the output is deenergized. Consider a normally open switch in the activated closed state instantiated in a PLC program as a make instruction. In the activated closed state, this switch delivers a logical one to the input and the make instruction does allow logical continuity and the output is energized. Consider a normally closed switch in the deactivated closed state instantiated in a PLC program as a make instruction. In the deactivated closed state, this switch delivers a logical one to the input and the make instruction does allow a logical continuity and the output is energized. Consider a normally closed switch in the activated open state instantiated in a PLC program as a make instruction. In the activated open state, this switch delivers a logical zero to the input and the make instruction does not allow logical continuity and the output is deenergized. Now let's examine the same four situations using the break instruction. Consider a normally open switch in the deactivated open state instantiated in a PLC program as a break instruction. In the deactivated open state, this switch delivers a logical zero to the input and the break instruction does allow logical continuity and the output is energized. Consider a normally open switch in the activated closed state instantiated in a PLC program as a break instruction. In the activated closed state, this switch delivers a logical one to the input and the break instruction does not allow logical continuity and the output is deenergized. Consider a normally closed switch in the deactivated closed state instantiated in a PLC program as a break instruction. In the deactivated closed state, this switch delivers a logical one to the input and the break instruction does not allow logical continuity and the output is deenergized. Consider a normally closed switch in the activated open state instantiated in a PLC program as a break instruction. In the activated open state, this switch delivers a logical zero to the input and the break instruction does allow logical continuity and the output is energized. As one might expect, the make and break constructions have opposite responses for the same scenarios which is largely the point. You can do what you want with whatever you want to do it with as many times as you want to do it. PLCs offer this mind blowing flexibility and more. Can you now dig this on every level that I do? Remember these eight scenarios. Remember this table. Because one day, someone's going to take it away and expect you to know it on a quiz or an exam. Hint, hint. Moving on, let's now put the make, break and output enable instruction to use in some example PLC programs. Here's a simple PLC program consisting of a make instruction examining input one, controlling output Q one on rung one. And a break instruction also examining input one controlling output Q two on rung two. Let's assume input one is connected to a normally open field input device. Electromechanical relay outputs Q one and Q two both illuminate pilot lamps when energized. Let's examine the response of this system when the field input device is in its deactivated open state and again when it is placed in the activated closed state. When the field input device is in its deactivated open state input one is receiving a logical zero, being the absence of voltage. The make instruction in rung one does not allow logical continuity from left to right and the Q one coil is deenergized. The pilot lamp attached to output Q one is off. In contrast, the break instruction in rung two, examining the same input does allow logical continuity from left to right and the Q two output coil is energized. The pilot lamp attached to output Q two is on. When the field input device is placed in it's activated closed state, input one receives a logical one being the presence of full voltage. The make instruction in rung one does allow logical continuity from left to right and the Q one coil is energized. The break instruction in rung two examining the same input does not allow logical continuity from left to right, and the Q two coil is deenergized. The pilot lamp attached to output Q one is on. The pilot lamp attached to output Q two is off. Do you see what this simple PLC program has already enabled us to do? We saved money. If we wanted to implement the same function using traditional hard wire relay-based ladder logic, it would necessitate more wires in addition to a more expensive and bulky mechanically interlock switch package with a set of normally open and normally closed terminals. Note as implemented using this flexible PLC, the field input device requires only a single set of terminals and contains fewer wires. In addition to these upfront savings, consider the long-term savings if you were ever asked to modify or upgrade the system. The PLC implementation could be reprogrammed far easier than a system using traditional hard wire relay-based ladder logic ever be physically rewired. Let's examine a four input four output PLC making use of a different program. Note our schematic indicates there is a normally open maintain contact selector switch on input one, a normally closed momentary contact red push button on input two. A normally open momentary contact green push button on input three. A normally open momentary contact yellow push button on input four, and four pilot lamps on the four outputs. For the purposes of this introductory application, we won't be using all the field input devices nor all the outputs. However, we've wired them up anyways on the off chance the system ever needs to be reprogrammed to perform alternate functions. Again, the reprogrammable nature of a PLC is one of its major advantages. Let's put your newfound understanding of the make, break and output enable instructions to the test and say that PLC happens to be running this program. Note rung one is a series configuration of a make instruction examining I2 and another make instruction examining I3. Note inputs one and four aren't being employed in this program nor outputs two and three. Pause the lecture and see if you can determine how this system will respond for four different scenarios. One, when both the red and green push button are in their deactivated states. Two, when only the red push button on input two is activated. Three, when only the green push button on input three is activated. And four, when both the red and green push button are activated. Here's a hint, determine the logical values the field input devices attached to input two and input three send in their deactivated and activated states. Then, consider how the instructions respond to these input conditions. Here's how the PLC responds to these four different scenarios. When no button is actuated, the normally closed red push button sends a logical one to input two. And the normally open green push button sends a logical zero to input three. The make instruction examining input two permits logical continuity to input three. However, the make instruction examining input three does not permit logical continuity onto the output. Output Q one is deenergized. When only the red push button is actuated, the now open red push button sends a logical zero to input two and the normally open green push button sends a logical zero to input three. The make instruction examining input two does not permit logical continuity to input three and we may as well stop our analysis right here since regardless of the state of input three, the output won't be energized. The shortcut isn't really that far from the truth how some PLCs operate. In order to minimize scan time, PLCs often turn back at the first locked door and only continue progress along a rung if logical continuity can be maintained. For this scenario, output Q one is deenergized. When only the green push button is actuated, the normally closed red push button sends a logical one to input two and the now closed green push button sends a logical one to input three. The make instruction examining input two permits logical continuity to input three and the make instruction examining input three permits logical continuity onto the output. Output Q one is energized, and the pilot lamp comes on. Note as presently implemented, this PLC program does not maintain the last asserted state. And due to the momentary nature of the field input devices, the pilot lamp attached to output Q one only comes on when the green push button attached input three and only the green push button is actively being held closed. As soon as the operator releases the green push button, output Q one is deenergized and the pilot lamp goes off. While this might be suitable for some applications, we'll examine holding circuits that maintain the last asserted state as implemented in PLCs using virtual relays and their associated instructions, software generated holding circuits and latching instructions in later lectures. Finally, when both buttons are actuated the now open red push button sends a logical zero to input two, and the now closed green push button sends a logical one to input three. As previously, the make instruction examining input two does not permit logical continuity to input three and we may as well stop our analysis right here since regardless of the state of input three, the output won't be energized. The point of this lengthy analysis being that the electromechanical nature, normally opened or normally closed to the field input device has absolutely nothing to do with how the make or break instruction responds to the logical values received at the PLC input. This flexibility is a major advantage of PLCs over traditional hard wire relay-based ladder logic where one is often constrained to the unalterable electromechanical nature of a particular device. PLCs additionally are far more versatile since they can be quickly reprogrammed without the time-consuming necessity of physically rewiring it. This small system with only four inputs and four outputs could still be programmed and reprogrammed to perform a truly mind-boggling array of functions only limited by the time and creativity of the programmer and the memory capacity of the PLC. All right, this about wraps up our brief introduction to the make, break and output enable instructions common to most PLCs. I'll admit, there are some truly dumb terminology employed by certain PLC manufacturers and subtle twists to wrap your mind around. But if you just get past these initial roadblocks, you'll find the advantages numerous. As already demonstrated with just these simple programs, we shown that a PLC can be more flexible, save resources and time and be easier to install, maintain, troubleshoot, modify and upgrade in contrast to traditional hard wire relay-based ladder logic. We'll be making use of these instructions to implement PLC programs in later lectures. 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, and we'll see you again during the next lecture of our series. And 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 music]