Basics of Ladder Logic

0
1235
Basics of Ladder Logic
5 mins read

Ladder logic is one of the most popular PLC programming languages used by electrical engineers. The inputs, outputs, and logic functions used in ladder logic are similar to those used in electrical circuits, making it easy for electrical engineers and technicians to understand and use. In this article, we will discuss what is ladder logic, its advantages and disadvantages, and how to read and draw ladder logic in PLC.

What is Ladder Logic?

Ladder Logic is a graphical programming language. The Ladder logic seems very similar to electrical circuit symbols as per NEMA standards.

Advertisement

Ladder-and-Electric-Circuit-Symbolic-Representation

Ladder logic programs use fundamental Boolean logic operations, such as AND, OR, and NOT, to control the electrical systems. You can make these logical operations by combining the inputs and outputs shown in the below picture.

Inputs-and-Outputs-in-Ladder-Logic

In ladder logic programming, the term “rung” refers to the horizontal lines that make up the diagram. These rungs can be thought of as individual circuits that are activated when certain conditions are met.

Rung-in-Ladder-Logic

Each rung consists of two vertical rails that represent the power supply and the ground and a series of horizontal lines that connect the inputs and outputs of the control system. Take a look at the below picture, it resembles a ladder and that is why it is termed a ladder diagram.

Vertical-Lines-in-Ladder-Logic

How to read a ladder logic diagram?

To read the ladder logic diagram, you must be aware of the symbols of logic instructions that are used in PLCs.

The inputs in ladder logic are represented by normally open (NO) or normally closed (NC) contacts. A normally open contact represents a switch that is open when there is no signal present, and it closes when the signal is applied. Conversely, a normally closed contact represents a switch that is closed when there is no signal present, and it opens when the signal is applied.

Normally Open Close and Coil Instructions

The outputs in ladder logic are represented by coils. These coils are not physical but they are virtual ones. They work on bit-level logic. When the coil bit level is one, the particular output (as per the assigned address) connected to PLC is switched ON. These outputs connected to PLC can be contactors coils (used to turn ON motors), solenoids, valves, etc.

In addition to inputs and outputs, ladder logic includes various logic functions that are used to control the operation of the system. These functions include AND, OR, NOT, and XOR. AND and OR functions are used to combine multiple inputs, while the NOT function is used to invert a signal. The XOR function is used to create exclusive OR logic.

How to draw a ladder diagram?

If you want to create a ladder logic diagram, first understand the process.

Once the process is known the next step is to note down the inputs and outputs of the control system, as well as the logic functions that are required to control the system.

The programmer then creates rungs by connecting the inputs and outputs using the appropriate logic functions. The rungs are then connected in series to create a ladder diagram that represents the entire control system.

Let us make a small ladder logic to understand better.

Example –

Simply put, we just want to start a Motor. The motor should start when the Start push button is pressed and stop when the Stop push button is pressed. The motor should continue to run until the stop push button is pressed.

Solution –

While making a ladder diagram first and foremost step is listing down the I/Os. In this example, we have two inputs and one output.

Inputs-and-Outputs-Example-List

The condition is that – when we press the start push button the motor should get ON. For the start push button, I would take NO contact in PLC. When normally open contact receives a signal the NO contact will become closed.

The other condition is when we press the stop push button the motor should get OFF. Here, we will take NC contact in PLC. When normally close contact receives a signal, it will become open and would interrupt the entire circuit. The motor relay is output so we will take a coil to represent it as you can see in the diagram below.

Start and Stop push button

Moving further, with the above ladder logic the motor would remain ON till you retain the start push button in close position. Once you release it, the motor would get stop which we do not want. Our condition is that the motor should remain ON till we press the stop push button. So, we would add a latch of the motor relay with NO contact.

Motor starter circuit ON through Latch

Now the motor would remain ON even though we release the start push button. It would remain ON through the latch as shown in the above diagram with green lines.

Advantages of Ladder Logic

  • Ladder logic is easy to understand and write, and does not require extensive programming knowledge.
  • Because it is a graphical language, the logic diagrams can be easily interpreted by operators and maintenance personnel, and it can also make it easier to troubleshoot problems with the control system.
  • Another benefit of ladder logic is that it is flexible and can be easily modified. Changes to the control system can be made by adding, deleting, or modifying rungs in the ladder diagram. This can help to reduce downtime and increase productivity in the manufacturing process.
  • Ladder logic is also a cost-effective solution for control systems.

Disadvantages of Ladder Logic

Despite its benefits, ladder logic does have some limitations.

    1. Ladder logic can become cluttered and difficult to read as more complex control strategies are implemented.
    2. It is limited in its ability to handle complex mathematical and branch logic operations.
    3. Additionally, ladder logic is not well-suited for systems that require high-speed processing or real-time control.

Summarizing

In conclusion, ladder logic is a programming language that is widely used in the field of industrial automation. It is a graphical language that is used to create logic diagrams that control various processes in manufacturing and other industries. Ladder logic is easy to read and understand, flexible, and cost-effective, making it an ideal solution for many control systems. It is having some limitations. It is not recommended for complicated control systems, or systems that need high-speed processing.

Advertisement

LEAVE A REPLY

Please enter your comment!
Please enter your name here