In plc what is ladder logic




















To access the body responsible for maintaining the IEC standard please click here. Ladder logic diagrams are drawn in a similar way to relay logic circuit. However, ladder logic diagrams express logic operations using symbolic notation rather than circuit components. The rails in a relay logic circuit represent the supply wires of a relay logic control circuit. However, in ladder diagrams, the rails represent the start and end of each line of symbolic code.

The rungs in a relay logic circuit represent the wires that connect the components together. However, in a ladder diagrams, the rungs represent the logic flow through the symbolic code. When implementing a ladder logic program in a PLC there are seven basic parts of a ladder diagram that critical to know. Some of these elements are essential and others are optional. To help understand how to draw ladder logic diagrams the seven basic parts of a ladder diagram are detailed below…..

Ladder logic is basically read from the left hand rail to the right hand rail and from the first rung to the last rung left to right and top to bottom. The rungs contains input symbols that either pass or block the logic flow. The last element of each rung is an output symbol which is the result of the logic expressions contained in that rung. To start reading ladder logic we need to know some basic binary concepts and how they apply to ladder logic, how ladder logic is executed and the basic logic functions that are built into each rung.

Microprocessors, like the ones found in PLCs and personal computers operate on the binary concept. It refers to the principle that things can be thought of in one of two states. The states can be defined as:.

Luckily ladder logic uses symbolic expressions and a graphical editor for writing and reading ladder diagrams making it easier for us mere humans to comprehend. In a PLC, binary events are expressed symbolically using ladder logic in the form of a normally open contact NO and normally closed contact NC. When the event is TRUE then it is highlighted green and the logic flow can move past it to the next logic expression.

Just like the current flow in an electric circuit when a switch is turned on. This PLC input event could be something like a button being pushed, a limit switch being activated or a temperature switch being triggered.

The result of the normally closed contact NC is basically the opposite state of an event that occurs. It is sometimes referred to as reverse logic. Check out the truth table below…. If we translate a NOT function into a ladder logic diagram we express it symbolically in the form of a normally closed contact NC as seen in ladder logic truth table shown below….

In order to successfully read ladder logic we need a basic understanding of how a PLC works and how ladder logic is executed in a PLC. You see, the PLC follows a certain execution procedure and if not adhered to it can lead to the ladder logic being read incorrectly. If not then the instruction will be off. The PLC will process the code from left to right and top to bottom.

Ladder logic is the most widely used program for PLC where sequential control of a process or manufacturing operation is needed. Ladder logic is used for simple and complicated control systems. So now PLCs are used for many complex automation systems. There are many logic symbols that are used in ladder logic, such as timers, counters, math, and data moves.

So because of this we can use any logical function, or control function in the ladder logic. The control decisions are made by logic gates. Ladder logic is widely used in industrial settings for programming PLCs where sequential control of manufacturing processes and operations is required. The programming language is quite useful for programming simple yet critical systems or for reworking old hard-wired systems into newer programmable ones.

This programming language is also used heavily in highly sophisticated automation systems such as electronics and car factories. The idea behind ladder logic is that even personnel without programming backgrounds can quickly program since it makes use of conventional and familiar engineering symbols for programming.

But this advantage is quickly negated since manufacturers of PLCs often also provide ladder logic programming systems with their products, which sometimes do not use the same symbols and conventions as those made for other models of PLCs from other manufacturers; in fact, the programming system is usually meant only for specific models, so the programs cannot be ported easily to other PLC models or must be outright rewritten. Share this Term. Computer-Aided Manufacturing.

Tech moves fast! Stay ahead of the curve with Techopedia! At the same time, you will also learn about 3 other ladder logic instructions. In the previous example, you learned how to read the state of digital input and set a digital output to the same state.

It is called momentary because it has a spring inside. This means, that the pushbutton will only be active as long as you press it. The ladder program above works just fine. But as you might have noticed, the output will only be active as long as the input is active. You will have to hold your finger on the button to keep the output activated.

It would not be very convenient for the operator to hold down the button all the time. We need a way to keep the output active, even though the operator releases the pushbutton. If you are familiar with electrical schematics, you may find this familiar. This is called a latch or a self-hold. The name reveals how this works. The coil simply holds itself.

When the PLC runs this ladder logic program the first time with the button pressed , the output will be activated. This is just like the example before. The fun happens the second or third time the PLC runs the ladder logic. Since this is a momentary pushbutton, it will not be active for long. Depending on how long time the PLC takes to execute the program, the button might be deactivated again the second, third or fourth time.

The output is still active since the pushbutton was pressed in the last scan cycle. This time the PLC will, again, read the inputs and save them in the memory byte. In memory bit I0.

The first examine if closed instruction with I0. But this one has the output memory bit as a condition. It acts as a condition for itself. The reason that the self-holding instruction is put in parallel to the other instruction is to make it an OR condition.

I will come back to that later. Important to know here is that either I0. You just learned how to make a functioning ladder PLC program. A pushbutton that activates an output. In our example, this would be connected to a contactor giving supply to a fan.

The output then holds itself. We want, somehow to be able to turn off the output again. The simplest way to do that would be to add a stop button. The button will be connected to the second input. Thereby giving it the memory address I0. To answer the first question, let me introduce you to another ladder logic instruction: examine if open.

This instruction works the exact opposite way of the examine if closed instruction. The result of this instruction will be an inverted condition. If you think about it, this is precisely how we want to stop button to work. We have to place it after the self-holding instruction. Said in another way — serial connected. You can see that it inverts the condition to the output coil.

This will break the latch. To activate the latch again, the start button has to be pressed. You can read more about why you have to use normally closed contact for stop buttons in my article about it. In short, it is to make sure that the system stops when a wire to the button breaks.

Although we changed the instruction, the ladder will still work in the same way. You now learned how to set an output and hold it until a stop button is pressed. But there are other ways to do this. Latching is not the only way. Congratulations on making it this far! Learning something for the first time is always a bit rough.

Courses and books provide a wealth of information on PLCs and ladder logic, giving you the confidence to implement ladder diagram in the real-world or on your exams! In part 2 of this ladder logic tutorial, you will learn how to build real logic solutions. You will learn how to implement logic gates and how to detect rising and falling edges of a digital signal.



0コメント

  • 1000 / 1000