What is ladder logic




















As you realized that the tank was, in fact, empty, the conclusion was that the level sensor was broken. You replaced the sensor, and the pump resumed regular operation. As we discussed above, the ladder logic instructions on the left side are called inputs. Their condition is evaluated on a true or false basis. If the evaluation is concluded with a TRUE, the output of the ladder logic rung is executed. Every programming language allows the user to add documentation to their software. In ladder logic, this opportunity comes with every rung, instruction and data structure.

By adding a comment above the rung, you're making it easier for the person after you to understand your train of thought and troubleshoot the logic as needed. Furthermore, the comments may be used to indicate a change or temporary fix of a certain problem that was encountered by a PLC programmer.

There are many instructions that will execute on the output side. In the example we covered above, our focus was on the OTE Instruction. As you gain experience as a PLC programmer, you'll encounter and master additional instructions. Each rung of ladder logic lies between the two side rails just like a regular ladder. These rails are what energizes each rung as they are executed. The rails remain grayed out until the main routine calls the program.

In the screenshot, the rails are green, which means that this specific logic is being executed. Each instruction will be tied to one or more tags. Each tag requires a data structure element as well as a name or label. In the examples we looked at above, tags were labeled as "Condition1", "Condition2", "Condition3", etc. In production circumstances, tags would typically reflect the physical element they control or a set of PLC based tags. Furthermore, tags may also have a description that allows the user to give the tag a text-based description.

As you invest yourself in PLC Programming, you'll quickly realize that the list of different instructions available to you is vast. Furthermore, as you become advanced at the craft, you may find yourself creating your instructions through the use of an Add-On-Instruction or AOI. However, assuming that you're here for the basics, let's discuss the most useful instructions you should start working with as you tackle industrial automation.

We've looked at these instructions at the start of the tutorial. It's the essential input check you can make on your data.

Although it may seem that this would have limited utility, many of the advanced constructs within PLCs have a boolean state. For example, a Variable Frequency Drive may have an array of boolean structures that are tied to different faults. Therefore, you may create the same number of XIC instructions to verify which failure is present on the drive. The Output Energize instruction is used to set digital outputs on field devices such as valves, motor contactors, relays, solenoids and more.

Timers are a basic data-structure of PLCs. They allow the user to create a condition that will start an internal timer and execute an action based on what the user has programmed. This instruction will start counting as soon as the input is energized.

The timer will continue timing until it reaches a value specified by the user. A PLC programmer can use boolean status bits of the timer in order to execute logic based on the timer running, completed or not-running status bits.

This instruction is fundamental in PLC programming and is often seen in basic sequences, de-bouncing logic and any other programs that require timed execution of ladder logic. One of the most iconic first circuits a PLC programmer must master is a motor starter. So if there is any logical continuity then the control out will be energized by the PLC. 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. The rung is the horizontal lines in a ladder diagram, in the above image we can see the input and out-put instructions in the rung.

The output instruction will check the rung and only after that it will execute the function. Best of Techopedia weekly.

News and Special Offers occasional. Ladder Logic. Techopedia Explains Ladder Logic. What Does Ladder Logic Mean? Techopedia Explains Ladder Logic Ladder logic is described as a rule-based language rather than a procedural or imperative one.

Each "rung" in the ladder represents a rule, so when implemented to relays and various electromechanical devices, these rules execute simultaneously and immediately. But if the program is applied to PLCs, the rules are executed sequentially through software and in a continuous loop. By executing the loop quickly enough, the effect still seems like a simultaneous and immediate execution within the required time tolerance.

The capabilities of the PLC being used have to be considered during programming as the electromechanical nature of the devices connected to it might not be able to keep up with the instructions, and it may seem that some rules are being skipped when the devices really just cannot keep up.

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.



0コメント

  • 1000 / 1000