Académique Documents
Professionnel Documents
Culture Documents
PLC Fundamentals –
Ladder Logic Fundamentals
MET 382
Controls & Instrumentation
for Automation
Spring ‘08
T.E. Kostek
Topics
PLC programming languages
Anatomy of a ladder program
Logic functions
Logical continuity vs. electrical continuity
I/O Mapping
Mastering examine on and examine off
instructions
The PLC scanning process
Rung 0
Rung 1
Rung 2
A3
3-rung
rung example ladder program
Rung Comment
Rung Number
Description assigned to alias tag
Base address
Input Instruction
8
Logic Functions
PLC programming is a logical procedure
10
Contacts
ANDed ( )
together
11
Logic Functions - OR
Input 1
OR
O
O t t
Output
Input 2 Logic
Contacts ( )
ORed
together
12
Input 1
XOR
Output
Input 2 Logic
13
Inputs Output
14
16
Logical Continuity
Logical continuity in a ladder rung occurs when
there is a continuous path of TRUE conditions
from the left power rail to the output instruction(s)
17
R
Rung T
True
Rung 2 F T T
18
Left power rail Right power rail
20
Electrical Continuity
Normally open (N.O.) pushbutton [shown pushed]
+24v COM
Input Module
Input
Circuitry
21
+ -
+24v COM
Input Module
Input
Circuitry
Screw terminals
22
I PB0
I_PB0
( )
No Logical Continuity
Electrical Continuity 23
I/O Mapping
Every discrete input is assigned to a specific bit
in the PLC’s memory (input image table)
If there is electrical continuity, the bit is set to a 1
If there is no electrical continuity, the bit is reset to a 0
24
I:XXX/10
O:XXX/01
16 14 12 10 06 04 02 00
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
17 15 13 11 07 05 03 01 Æ PLC
PLC--5 Systems
Output Module
25
I/O Mapping
Æ PLC
PLC--5 Systems 26
I/O Mapping
Output Image Table in RSLogix 5:
O:005 is a 16 bit
word address:
O:005/07 is the
address of a bit
which resides in
the word O:005
Æ PLC
PLC--5 Systems 27
I/O Mapping
1 word = 16 bits (bits are
Input Image Table in RSLogix 5: numbered in octal for a PLC-5)
Æ PLC
PLC--5 Systems 28
I/O Mapping
ControlLogix tag database:
Æ ControlLogix Systems 29
30
31
33
Æ PLC
PLC--5 Systems
34
35
True False
37
38
uts
(N.O.)
Inputs
s
FAN
Outpu
Stop
+24v Start
0 or 1
(N.O.)
The bit representing the push
Current flows if button is button is: True if the bit is a 1
pressed
ON (set to a 1) if there is
electrical continuity
+24v OFF (reset to a 0) if there is
Start NO electrical continuity
(N.C.)
120 VAC
0 or 1
FAN
The bit representing the fan
Output turns on when the output is:
bit in
i the
th output
t t image
i The output image table
ON (set to a 1) if there is
table is a 1 (voltage is bit is set to a 1 when the
logical continuity
applied across the output rung is true or is reset to
terminals and current flows OFF (reset to a 0) if there is a 0 when the rung is
in the output circuit) NO logical continuity false
42
43
44
47
Problem corrected, this output is only used once in the entire program 49
The
Th actual
t l ladder
l dd true/false
t /f l conditions
diti ((e.g.,
jump instructions, subroutines, etc.)
50
Typical
T i l scan ti
time ddata
t iincludes:
l d
The maximum scan time
The last scan time
51
Run Mode
When placed in the RUN mode, the processor begins
the scanning process as previously described
Program Mode
When placed in the PROGRAM mode, the processor
stops scanning the ladder program and (typically) all
the outputs are turned off
Test Mode
The TEST mode is identical to the RUN mode, except
all outputs are disabled (held in their off state) 52
RUN
When keyswitch is placed in the RUN mode, the controller
is switched into the run mode. The PLC programming
software cannot change the controllers mode.
PROG (Program)
When keyswitch is placed in the PROG mode, the
controller is switched into the program mode. The PLC
programming software cannot change the controllers
mode.
53