Ladder Diagram Tutorial

A Ladder Diagram tutorial



A PLC ()programmable logic controller) is a specialized computer used to control machines and processes.
The abbreviation 'PLC ' stands for 'Porgrammable Logic Controller'. These devices are also sometimes referred to as 'freely programmable controllers' in the trade.
This term refers to an electronic circuit that can be used to automate machinery and processes.
A PLC thus can replace a conventional relay logic circuit. A PLC always consist of a CPU module and several digital input and output modules. The number of input and output modules depends on the size of the process to be controlled.
One the major adventages of a PLC is that it makes it very easy to extend or modify the process. Consequently, PLCs have for years been an indispensable element in the automation of industrial systems.
Recently, PLCs have also like to have certain things automated in their house. Automatic garden sprinkler systems, awning controllers security systems and many other types of systems can easily be controlled using a PLC. Extensions or modifications can be made relatively easily after the system has been installed.

Every PLC works in the following manner

  1. Step1: When the PLC starts up (changes to Run mode), all outputs are set to inactive (no voltage).
  2. Step2: The states of all inputs are read in.
  3. Step3: The user program processes the instructions sequentially using the signal states acquired in Step 2. If the state of an input signal changes while the instructions are being processed, this does not have any effect during the cycle currently being executed. However, the states of timers, counters and flags are taken into account during the processing of the program.
  4. Step4: After the user program has been processed, the results are sent to the outputs.
  5. Steps 2, 3, and 4 are continuously repeated in a cyclic manner.

Introduction to PLC ladder diagram

When generating a program, it is a good idea to work from left to right and to only start a new row after the current row has been completed. The second point is also necessary because the program checks for empty rows.
You should also make a habit of always assigning a particular output only once when generating a PLC program.
If the same output is used more than once in a program, this output will be assigned the state that it receives in the last row in which it is located!



Figure 1 shows an example of a simple motor circuit, one case built using push buttons and relays and in the other case using a PLC.

If you want to modify the operation of the circuit, you will have to modify the hardware if you use the relay circuit, but with the PLC all you have to do is make a few changes to the program.

IEC 61131-3 is the open international standard IEC 61131 for PLC's.
Standard 61131-3 on IEC website

Rungs on a Ladder Diagram

Ladder Diagram input instructions perform logical OR & AND operations.
A Rung in the ladder diagram represents a rule and can contain input and output instructions.


Figure 2 shows a rung with logical AND & OR operations.
Boolean expression:
Q30 = I0 &(( I1 )|( I10 )) & I2 &(( I3 & I3 )|( (( I12 )|( I0 )) & I14 )) ;

Input instructions perform a comparison or test and set the rung state based on the outcome.
Output instructions examine the rung state and execute some operation or function.
Connecting two instructions in series implements an AND function, when BOTH instructions are true, the result is 1, otherwise the result is 0.
Connecting two instuctions in parallel implements a logical OR, when EITHER instructions are true (or both), the result is 1, otherwise the result is 0.

Add new comment