Professional Documents
Culture Documents
Ladder Diagrams
The power lines or rails are vertical lines with the horizontal lines like rungs
of a ladder.
1
PLC Programming
• Ladder Programming
1. Each rung on the ladder defines one operation in the process control.
2. The ladder diagram as read from left to right from top to bottom.
3. Each rung must start with an input/s and must end with an output/s.
4. Electrical devices are shown in their normal condition.
5. A particular device can appear in more than one rung of a ladder.
6. The inputs and outputs are all defined by there addresses.
2
PLC Programming
• Ladder Logic Symbols
Output device
3
PLC Programming
• Logic Functions
There are many control situations requiring actions to be initiated when certain
combination of conditions is realized. For example a drill machine is only to be
started when work piece is present (interlock).
A B Input Output A B
Load
A
B AND 0 0 0
Supply Voltage
0 1 0
1 0 0
Input A Input B Output
1 1 1
I:1/00 I:1/01 O:1/00
4
PLC Programming
• OR function
A INPUTS OUTPUTS
Input Output
B
A
OR
A B
Load B
Supply Voltage
0 0 0
0 1 1
Input A Output
1 0 1
I:1/00
Input B
O:1/00
1 1 1
I:1/01
5
PLC Programming
• NOT function
A
Input Output
Supply Voltage A
0 1
Input A Output
1 0
I:1/00 O:1/00
6
PLC Programming
• NAND function INPUTS OUTPUTS
A B Input Output A B
Load
A
B NAND 0 0 1
Supply Voltage
0 1 0
1 0 0
Input A Input B Output
1 1 0
I:1/00 I:1/01 O:1/00
7
PLC Programming
• NOR function
A INPUTS OUTPUTS
Input Output
B
A
NOR
A B
Load B
Supply Voltage
0 0 1
0 1 1
Input A Output
1 0 1
I:1/00
Input B
O:1/00
1 1 0
I:1/01
8
PLC Programming
• XOR function
INPUTS OUTPUTS
Input A Input B Output
A B
O:1/00
0 0 0
Input A Input B
0 1 1
A
NOT 1 0 1
B
AND 1 1 0
OR
AND
NOT 9
PLC Programming
• Latching
There are often situations where it is necessary to hold an output
energized, even when the input ceases.
O:1/00
Output
O:1/00
10
PLC Programming
• Latching example
O:1/00
O:1/00 O:1/01
Stop Light
O:1/00 O:1/02
Run Light
END
11
PLC Programming
• Instruction Lists
Another PLC programming method, which can be considered to be the entering of a
ladder program using test, is instruction lists. For this, mnemonic codes are used,
each coed corresponding to a ladder element.
Code Description
LD Start a rung with open contact
LDN Start a rung with a closed contact
AND A series element with open contact
ANDN A series element with closed contact
OR A parallel element with open contact
ORN A parallel element with closed contact
ORB Branch parallel elements
ANB Connect branch elements in series
ST An output
12
PLC Programming
• Instruction Lists
Example:
Step Instruction
1 LD I:1/00
2 AND I:1/01
3 ST O:1/00
13
PLC Programming
• Instruction Lists
Exercise: Write the instruction list for the following ladder
diagrams:
I:1/01
I:1/00 O:1/00
(b)
I:1/01
14
PLC Programming
• Instruction Lists
Exercise: Write the instruction list for the following ladder
diagrams:
O:1/00
I:1/00 I:1/01
15
PLC Programming
• Function Block Diagrams
Basically types of diagrams used to describe logic systems. A function block
is a program instruction unit which, when executed , yields one or more
output values.
A Q A
Q
B >=1
B
16
PLC Programming
•Function Block Diagrams
A
A B Q
Q
B &
17
PLC Programming
•Function Block Diagrams
A B Q
A >=1
Q
Q
&
B
18
PLC Programming
•Function Block Diagrams
Exercise: Draw the function block diagram for the following ladder
programs:
a) A B C D Q
A B C D G Q
b)
Q E F
19
PLC Programming
Internal Relays
In PLC’s there are elements that are used to hold data, i.e. bits, and behave like
relays, being able to be switched “on” or “off” and switch other devices “on” or
“off”.
Such internal relays do not exist as real world switching devices but are merely
bits in the storage memory that behave in the same way as external relay output
and input.
There are several terms used to describe these elements, i.e. Auxiliary relays,
Flags, Markers, Coils.
20
PLC Programming
Internal Relays
In 1 In 2 IR 1
In 3
IR 1 In 4 Out 1
21