Ladder Diagram: Rung 1 Rung 2 Rung 3
Ladder Diagram: Rung 1 Rung 2 Rung 3
Ladder Diagram
Rung 2
Rung 3
L1 (Input)
L2 (Output) Vertical rail
Basic Ladder Logic Symbols
Contacts
Normally Open (NO) contact
Passes power (on) when coil driving the contact is on.
Output or Coil
When power flows through the Coils via contacts they are
energized.
Input 2
The NOT Gate, or Inverter
Input Output
The Exclusive-OR, or XOR Gate
Input 1
Output
XOR
Input 2
NAND gate
NOR gate
Example
Design a ladder program to control the operation of a DC motor such that:
The motor direction is controlled by two relays: M1 for CW direction and M2 for CCW direction.
The main objective of the ladder program is to "latch" only one of the two relays at the same time, or maybe not at all
The system use two push buttons: “forward” and “reverse”, both are from NO type.
Third push button is used to stop the motor; this one is of the type NC.
The program required to monitor both direction buttons to direct the motor, note that the user will press then release
the button but the motor must continue work even after the button released and until another one is pressed.
Example
Step 1
Step 2
Step 3
Step 4
Level Application example
Required to control lubricating oil tank using two sensors.
In PLC: Each input and output device must have its own address.
(To allow PLC to know where they are physically connected.)
These relays DO NOT physically exist in the plc but rather they are bits in a register that you
can use to SIMULATE a relay.
You can use the contacts of these relays as many times as required.
Device Name Address
The program to solve this problem is as follow:
Low level sensor 0000
High level sensor 0001
Motor 0500
Internal relay 1000
Program Scan Scan 1
Notice: Even if the low level sensor is false Still a path of true logic from left to right (through the [1000] dummy relay.
Program Scan Scan 2000
After maybe 2000 scans, the oil level rises above the high-level sensor, so it becomes open (False):
After maybe 2050 scans the oil level falls below the high level sensor and it will become true again.
Even though the high level sensor became true there still is NO continuous true logic path and therefore coil 1000
remains False!