All About Ladder Logic We Need To Know

In this article, am trying to explain the basic details of Ladder Logic. Before that, you need to know there are so many programming languages to control PLCs. They are

a) Ladder Logic

b) FBD (Functional Block Diagram)

c) Structured Text

d) Sequential Logic

e) Instruction list

What is Ladder Logic Program?

Ladder logic is used to build tools for programmable logic controllers (PLCs) used for industrial control applications. The name is based on the observation that the programs in this language are identical to ladders, with between them two vertical rails and a set of horizontal rails.

This is a graphical language that displays the logical interaction between inputs and outputs as if they were contacts and coils in a hard-wired electromechanical relay circuit.

This language was developed for the sole purpose of making PLC programming sound “natural” to electricians who are familiar with relay-based logic and control circuits. Although Ladder Diagram programming has many drawbacks, it remains highly common in the automation industry.

How to draw Ladder Diagram?

Below are seven basic parts of a ladder diagram to help you understand how to draw ladder logic diagrams.

  • Rails: A ladder sketch has two rails, which are drawn in vertical lines at the top of the page. If they are in a relay logic circuit, they will represent the active and zero voltage connections of the power supply, where the current flows from left to right.
  • Rungs: The rungs are drawn as horizontal lines that link the rails to the logical expressions. If they were in a relay logic circuit, they would reflect the wires linking the power supply to the switching and relay elements.
  • Input: The inputs are the device used to give information to control systems such as a push-button being pressed or a limit switch is triggered. The inputs are directly hardwired to the PLC terminals and are represented in the ladder diagram by a normally open (NO) or normally closed (NC) touch symbol.
  • Outputs: It is an external device that is ON and OFF, such as an electric motor or solenoid valve. Outputs are also hardwired to the PLC terminals and a relay coil symbol is seen in the ladder diagram.

Ladder Logic Execution:

Rungs of Ladder diagram are solved from Left to right and top to bottom

Branches within rungs are solved top left to the bottom right

  • Logical Expressions: It is used in combination with Inputs and Outputs to form the required control functions.
  • Address notations & Tag names: The address notation describes the PLC’s input, output, and logic expression memory addressing structure. Tag names are descriptions allowed for addresses
  • Comments: The comments are a very significant part of the ladder diagram. Comments are shown at the beginning of each rung and are used to explain the logical expressions and controls the rung or rungs classes are operating. The interpretation of ladder diagrams is made even better by using comments.

Ladder Logic Functions:

There are several control scenarios that cause an action to be taken when a certain mixture of circumstances is realized. Let’s take a real-world event and allow it to normally close (NC) contact and call it ‘A’. Real-world events are defined as PLC inputs in ladder logic.

image

The output of a rung logic function is known in ladder logic as a PLC output.

The six most widely used logic functions in PLC ladder programming are

  • OR
  • AND
  • NOT
  • NAND
  • NOR
  • XOR

Logical OR Function

Logic OR Feature means that the output behavior will be True/High if any one or more occurrences are True/High.

image

Logical AND Function

It is a type of digital logic circuit. We get High Output (1) only when all of its inputs are High (1)

image

image

Logical NOT Function

It has only one Input and it is commonly referred to as an Inverting Buffer or inverter. When the input is High/True, the output will be Zero/False and vice versa.

image

Logical NAND Gate

NAND gate is a combination of NOT and AND gate which produces an output which is false only if all its inputs are true

Logical NOR Gate:

The Logic NOR Gate is a combination of the digital logic OR gate and an inverter i.e., NOT gate connected together in series

image

XOR Gate

Exclusive-OR gate or XOR Gate gives a high output when one of the inputs is high that we don’t get high input when both inputs are high.