![]() |
VOOZH | about |
A PLC or Programmable Logic Controller is a special type of digital computer without a monitor and keyboard. This is basically used in industrial automation such as manufacturing, automotive, food and beverage, chemical processing, and more to automate systems. This tiny computer receives data through input and sends operating instructions as output.
As the name suggests, it's a programable device. The main languages that are used to program a PLC are 'Ladder Logic' and 'C'. Ladder Logic is the most used programming for PLCs.
Table of Content
Ladder logic is basically a program that is represented by a graphical diagram, which is based on a circuit diagram of relay logic. This program contains two vertical lines called 'rails' and horizontal lines called 'rungs' which makes it look like a perfect ladder. The graphical representation of an ladder logic program is called as Ladder Logic diagram(LLD).
Ladder logic diagram are graphical programming language which executes through real time input. It has two vertical line, which is called as rails, the left rail supplies power to the circuit, then it passes through each rung. Each rung has switches and output coil. Switches can perform OR, AND and NOT operation, and through these basic logic operation we can make any programming logic in PLC. A ladder logic diagram executes from left to right and top to bottom. When all the condition of a rung met the connected output coil get energized. then it activate the real world system, such as turning on a motor or turning off a motor. This process is continuously scanned and repeated by the PLC and control system to ensure the automation of operating system.
There are some Ladder logic components given below :
Vertical lines are called rails and the horizontal lines are called rungs.
NO(Normally Open) and NC(Normally Closed) are used to represent the state of current flow or contact in electronics circuit, which is also used is PLC ladder logic programming. These terms define whether the switch is open or closed.
Output devices are such as motor, valve, indicator, lights etc. but in LLD it is represented by vertical line with a label representing the output device.
File extension for Ladder Logic Diagram : .LLG
Some advantages and disadvantages of Ladder Logic are :
Ladder logic programming used in various industries such as
Some examples of Ladder Logic Programming are :
AND logic : Y=A.B (here A and B are the inputs, and Y is output)
Input (A) | Input (B) | Output (Y = A.B) |
|---|---|---|
|
0 |
0 |
0 |
|
0 |
1 |
0 |
|
1 |
0 |
0 |
|
1 |
1 |
1 |
Here, NO switches are representing input 0, means no current is passing, and NC switch are representing input 1, which means current passing through the circuit. Each line in the diagram representing each combination from truth table. First line, where A=B=0, means no current is passing. As they are in series line(according to AND logic) no current will reach to the output module. Same for the other rungs, created from the truth table, to show each switch in series, and check if it's matching the table or not.
OR Gate logic : Y = (A+B)
Input (A) | Input (B) | Output (Y = A+B) |
|---|---|---|
|
0 |
0 |
0 |
|
0 |
1 |
1 |
|
1 |
0 |
1 |
|
1 |
1 |
1 |
In a circuit OR gate represents parallel circuit, that's why we have here places two switches in parallel. Others are same as discussed in previous example, NC switches(green) means current passing, which is denoted by 1, and NC switch(white) means no current passing, denoted by 0. Then check the output from the truth table.
Similarly we can create NAND gate, NOR gate, XOR gate etc. other logic gates using ladder logic diagram.
Ladder logic programming is widely used graphical language in industrial automation control. It simplify control system design and troubleshooting. It is a graphical representation of electrical relay where we can perform various logical operation. It is used in various industries such as manufacturing automation, water treatment, chemical reaction, PH control etc. But it is less ideal for complex system. Never the less, LLD play a crucial role in automation control industry.