Search for notes by fellow students, in your own course and all over the country.
Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.
Title: Basics of PLC Programming Basic Level
Description: Introduction of PLC Programming
Description: Introduction of PLC Programming
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
Basics of PLC Programming
Industrial Control Systems
Fall 2006
Lecture – PLC Programming Basics
MME 486 – Fall 2006
1 of 62
PLC Architecture
Lecture – PLC Programming Basics
MME 486 – Fall 2006
2 of 62
PLC System
Lecture – PLC Programming Basics
MME 486 – Fall 2006
3 of 62
Processor Memory Organization
The memory of a PLC is organized by types
...
Advanced ladder logic functions allow controllers to
perform calculations, make decisions and do other
complex tasks
...
They are more complex than
basic inputs contacts and output coils and rely
heavily upon data stored in the memory of the PLC
...
§ Input/output locations
§ Internal relay and
timer/counter locations
Data table
User program
The user program causes
the controller to operate
in a particular manner
Housekeeping memory
Used to carry out
functions needed to make
the processor operate
(no access by user)
Lecture – PLC Programming Basics
MME 486 – Fall 2006
5 of 62
Program Files
The user program will
account for most of the
memory of a PLC system
...
Program file organization
for SLC-500 controller
...
MME 486 – Fall 2006
6 of 62
Data Files
Data file organization
for SLC-500 controller
...
Lecture – PLC Programming Basics
MME 486 – Fall 2006
7 of 62
Data Files
Data files are organized by the type of data they contain
Lecture – PLC Programming Basics
MME 486 – Fall 2006
8 of 62
Input Table File Operation
Input module
Switch Open
Binary 0 stored
0
Lecture – PLC Programming Basics
MME 486 – Fall 2006
9 of 62
Input Table File Operation
Input module
Processor continually
reads current input
status and updates
input image table file
Switch Closed
Binary 1 stored
1
Lecture – PLC Programming Basics
MME 486 – Fall 2006
10 of 62
Output Table File Operation
Output module
Output
OFF
Processor continually
activates or deactivates
output status according
to output image table
file status
0
Status 0
Lecture – PLC Programming Basics
MME 486 – Fall 2006
11 of 62
Output Table File Operation
Output module
Processor continually
activates or deactivates
output status according
to output image table
file status
Output
ON
1
Status 1
Lecture – PLC Programming Basics
MME 486 – Fall 2006
12 of 62
Program Scan
During each operating cycle, the processor reads all
inputs, takes these values, and energizes or de-energizes
the outputs according to the user program
...
I/O scan – records status data of input
devices
...
Lecture – PLC Programming Basics
MME 486 – Fall 2006
13 of 62
Scan Process
The scan time indicates how fast the controller can react
to changes in inputs
...
If a controller
has to react to an input signal that changes states twice
during the scan time, it is is possible that the PLC will
never be able to detect this change
...
End of ladder
In addition to the program itself, the scan time is also dependent on
the clock frequency of the processor!
Lecture – PLC Programming Basics
MME 486 – Fall 2006
18 of 62
Scan Patterns
Vertical Scanning
Order
The processor examines
input and output
instructions from the
first command, vertically,
column by column and
page by page
...
End of ladder
Misunderstanding the way the PLC scans can cause programming
bugs!
Lecture – PLC Programming Basics
MME 486 – Fall 2006
19 of 62
PLC Programming Languages
The term PLC programming language refers to the method
by which the user communicates information to the PLC
...
Functional
chart
Boolean language
Lecture – PLC Programming Basics
MME 486 – Fall 2006
20 of 62
Comparing Programming Language
PB1
CR1
CR2
SOL
Relay Schematic
LS1
PB1 CR1
CR2
SOL
Equivalent ladder
diagram language
LS1
Equivalent Boolean language
Lecture – PLC Programming Basics
MME 486 – Fall 2006
21 of 62
Relay-Type Instructions
The ladder diagram language is basically a
symbolic set of instructions used to create the
controller program
...
Lecture – PLC Programming Basics
MME 486 – Fall 2006
22 of 62
Examine If Closed (XIC) Instruction
Symbol
Analogous to the normally open relay
contact
...
Can be a switch
or pushbutton, a contact from a connected output,
or a contact from an internal output
...
The status bit will be either 1 (ON) or 0 (OFF)
...
Lecture – PLC Programming Basics
MME 486 – Fall 2006
25 of 62
Examine If Closed (XIC) Instruction
I:012
I:012
04
If the status bit is 1 (ON), then the instruction is TRUE
...
For this instruction we
ask the processor to EXAMINE IF (the
contact is) OPEN (XIO)
...
Can be a switch or
pushbutton, a contact from a connected output,
or a contact from an internal output
...
The status bit will be either 1 (ON) or 0 (OFF)
...
Lecture – PLC Programming Basics
MME 486 – Fall 2006
28 of 62
Examine If Open (XIO) Instruction
I:012
I:012
04
If the status bit is 1 (ON), then the instruction is FALSE
...
The
processor makes this instruction true
(analogous to energizing a coil) when
there is path of true XIC and XIO
instructions in the rung
...
Can be a connected
device or an internal output (internal relay)
...
Lecture – PLC Programming Basics
MME 486 – Fall 2006
30 of 62
Output Energize (OTE) Instruction
O:013
I:012
I:012
I:012
11
15
O:013
01
OUTPUT ENERGIZE instruction - TRUE
Lecture – PLC Programming Basics
MME 486 – Fall 2006
31 of 62
Output Energize (OTE) Instruction
O:013
I:012
I:012
I:012
11
15
O:013
01
OUTPUT ENERGIZE instruction - FALSE
Lecture – PLC Programming Basics
MME 486 – Fall 2006
32 of 62
Status Bit Examples
Input module
A
Bit status
Button not actuated
Output
A
OFF
False
A
Output
ON
True
Lecture – PLC Programming Basics
MME 486 – Fall 2006
33 of 62
Status Bit Examples
Input module
A
Bit status
Button actuated
Output
A
ON
True
Output
A
OFF
False
Lecture – PLC Programming Basics
MME 486 – Fall 2006
34 of 62
Ladder Rung
A
B
C
Output
instruction
Input conditions
D
A ladder rung consists of a set of input conditions,
represented by contact instructions, and an output
instruction at the end of the rung, represented by the
coil symbol
...
A complete
path is referred to as having logic continuity
...
Lecture – PLC Programming Basics
MME 486 – Fall 2006
36 of 62
Rung Continuity
Bit in memory
Bit in memory
1
1
LS_1
SOL_5
The Examine If Closed instruction is TRUE
making the rung TRUE
Lecture – PLC Programming Basics
MME 486 – Fall 2006
37 of 62
Rung Continuity
Bit in memory
Bit in memory
0
0
LS_1
SOL_5
The Examine If Closed instruction is FALSE
making the rung False
Lecture – PLC Programming Basics
MME 486 – Fall 2006
38 of 62
Allen-Bradley SLC-500 Controller Addressing
Output image table
file 0
Address
output
terminal
O0:4/6
O:0:4/6
Bit address
Address
input
terminal
I1:3/12
Input image table
file 1
Energized
output
I:3/12
Bit address
Closed input
I1:3
O:0:4
User-programmed rung
12
Lecture – PLC Programming Basics
MME 486 – Fall 2006
6
39 of 62
Structure of A 16-Bit Word
Bit
OFF ON
Word
(16 bits)
0 1
15 14 13 12 11 10 9
8
7
6
5
4
3
2
1
0
I/O Connection Diagram
L1
L2
L1
L2
PB1
SOL 1
O:2/3
I:4/5
PL 1
LS1
O:3/6
I:4/6
Lecture – PLC Programming Basics
MME 486 – Fall 2006
R
40 of 62
Parallel Input Branch Instructions
A
C
B
Lecture – PLC Programming Basics
Branch instructions are used
to create parallel paths of
input condition instructions
...
MME 486 – Fall 2006
41 of 62
Parallel Output Branching
A
C
D
B
E
On most PLC models, branches can be established at
both the input and output portion of the rung
...
Lecture – PLC Programming Basics
MME 486 – Fall 2006
42 of 62
Nested Input and Output Branches
Input and output branches can be nested to avoid
redundant instructions and to speed up the processor
scan time
...
Lecture – PLC Programming Basics
MME 486 – Fall 2006
43 of 62
Nested Contact Program
A
B
C
Y
Nested
contact
D
On some PLC models,
the programming of a
nested branch circuit
cannot be done directly
...
E
Lecture – PLC Programming Basics
MME 486 – Fall 2006
44 of 62
PLC Matrix Limitation Diagram
Max series
contacts
No
...
Lecture – PLC Programming Basics
MME 486 – Fall 2006
45 of 62
Programming of Vertical Contacts
A
D
Y
Original program
C
E
D
B
A
B
C
A
C
Y
D
E
B
Y = (AD) + (BCD) + (BE) + (ACE)
Reprogrammed to obtain the
required logic
E
Lecture – PLC Programming Basics
MME 486 – Fall 2006
46 of 62
Programming for Different Scan Patterns
B
A
D
C
Y
Original program
E
F
Y = (ABC) + (ADE) + (FE) + (FDBC)
A
B
C
A
D
E
F
D
Reprogrammed to obtain the
required logic
E
F
Y
B C
Lecture – PLC Programming Basics
MME 486 – Fall 2006
47 of 62
Internal Control Relay
The internal output operates just as any other output
that is controlled by programmed logic; however, the
output is used strictly for internal purposes
...
The advantage of using internal outputs is that there
are many situations where an output instruction is
required in a program, but no physical connection to
a field device is needed
...
Lecture – PLC Programming Basics
MME 486 – Fall 2006
48 of 62
Extending the Number of Series Contacts Using
an Internal Control Relay
Internal
relay coil
Rung 1
Rung 2
Internal
relay
contact
Lecture – PLC Programming Basics
Discrete output (requires
one physical connection
on the output module)
MME 486 – Fall 2006
49 of 62
Programming The XIC Instruction
PB1
PB2
Hardwired Circuit
PL
PB1
PB2
PL
User program
providing the
same results
Note that both pushbuttons are represented by the XIC symbol
...
Since both PB1 and PB2
must close to energize the PL, the XIC instruction is used for both
...
When the
pushbutton is closed, relay coil CR is energized and contacts CR1 open
to switch the PL off
...
This is because the rung must be true when the
external pushbutton is open, and false when the pushbutton is closed
...
The computer is adapted
to the particular PLC
model using the relevant
programmable controller
software
...
Lecture – PLC Programming Basics
MME 486 – Fall 2006
56 of 62
Select Processor Type Screen
The programming software needs to know what
processor is being used in conjunction with the program
...
Lecture – PLC Programming Basics
MME 486 – Fall 2006
57 of 62
I/O Configuration Screen
The I/O screen
lets you click or
drag-and-drop a
module from an
all inclusive list to
assign it to a slot
in your
configuration
...
These
include:
Input
Output
Timer
Counter
Integer
Bit
Lecture – PLC Programming Basics
MME 486 – Fall 2006
59 of 62
Monitoring a Ladder Logic Program
Operation of the logic is apparent from the highlighting
of rungs of the various instructions on screen, which
identifies the logic state in real time and has logic
continuity
...
Program Mode – may be used to
Ø enter a new program
Ø edit or update an existing program
Ø upload files
Ø download files
Ø document programs
Ø change software configurations
When the PLC is switched into the
program mode, all outputs from the PLC
are forced off regardless of their rung
logic status, and the ladder I/O scan
sequence is halted
...
Input devices are monitored
and output devices are energized
accordingly
...
Remote Mode – allows the PLC to be
remotely changed between program and run
mode by a personnel computer connected
to the PLC processor
Title: Basics of PLC Programming Basic Level
Description: Introduction of PLC Programming
Description: Introduction of PLC Programming