Académique Documents
Professionnel Documents
Culture Documents
Controller?
• A solid state device that controls output
devices based on input status and a user
developed program.
• Originally developed to directly replace
relays used for discrete control.
Inputs Outputs
Programmable
Controller
C
R
Other Types of Control
• MicroPLCs vs. Relays
– above 2/3 relays cost becomes a problem
• panel space, cost
– limited functions
• limited logic, no math, no application specific instructions
• timers and counters cost $ to add
• no communications
– difficult to “exchange” data
– maintenance/reliability
• mechanical devices wear out, create and are affected by
vibration
– expensive to program
• time consuming, difficult to document, hard to “pass on”
logic
– difficult to troubleshoot
• requires skilled technician
Other Types of Control
• Ease of programming
• Ease of maintenance
• Designed for industrial
environment
• Quick installation
• Adaptable to change
Today's Higher Level
Control Capability
• Arithmetic
• Data Comparison
• Word Manipulation
• Master Control Relay Instructions
• Program Skip Capability
• Sequencing
• Matrix Data Manipulation
• Proportional, Integral, Differential (PID)
Control
Where do you Use a
MicroPLC?
• Conveyor control
• Printed circuit board handling equipment
• SCADA(Supervisory Control And Data
Acquisition)
– remote pump/lift station (water/wastewater)
– Flow monitoring for leak detection (oil&gas)
• Strapping machinery / trash compactors
• Palletizers
• Compressor control
• Replace hard-wired relay panels or SBCs
• Many, many more
Inside A PLC
Communications
C C
I i O i
r r
n
p c Central u
t c
u u
i
Processor p u
i
t u
t t CR
t
s s
High High
Voltage Isolation
Voltage
Isolation MEMORY Barrier
Barrier
program data
Low Voltage
AC Power Supply External
85-264 VAC, or DC Power Supply
50/60Hz
Input Devices
• Valves • Relays
• Motor Starters – 120 VAC/VDC
• – 240 VAC
Solenoids
– 24 VAC/VDC
• Control Relays
• Triac
• Alarms
– 120/230 VAC
• Lights
• Transistor MOSFET
• Fans – 24 VDC
• Horns
PLC Application
Considerations
• Inputs/Outputs
– Type, • Functions required
• AC, DC, sourcing, – Instruction set
sinking, etc. • Messaging
– Number of • PID
• 10, 16, 20, 32, 156 • PTO, PWM
• Memory – Arithmetic
– Type – Communications
• Flash or Battery • DeviceNet, Ethernet
backed • Remote I/O, DH+
– Size – Report generation
• 1k, 6k, 12k, 16k, 64k
PLC’s Come in a Variety of
Sizes...
• Pico
– Typically less than 20 I/O
• Micro
– Typically less than 32 I/O
• Small
– Typically less than 128 I/O
• Medium
– Typically less than 1024 I/O
• Large
– Typically greater than 1024
I/O
And a variety of
shapes/configurations
• Packaged
– MicroLogix 1000,1200 and
1500
• Packaged with expansion
– MicroLogix 1200 and 1500
• Modular (rack less)
– MicroLogix 1200 and 1500
• Modular (rack based)
– SLC 500 and PLC5
• Distributed
– SLC 500 and PLC5
Packaged PLC
+ +
Processor Base Unit Compact I/O
Modular PLC’s
• Performance
– Although small in size these products can
perform the same tasks as much larger PLC’s
• Reliability
– Designed to meet existing industrial design
standards
• UL, CSA, CE
• Designed & manufactured in ISO9000 facilities
• International Focus
– Standard product available throughout the
world
Input Wiring
Terminal Isolation
Block Barrier
Input Devices
1
2
3
L1 4
5 P
L1 6 L
7
8 C
9
10
L2 COM
Output Wiring
Isolation Terminal
Barrier Block
Output Devices
OUT 1 L1
CR
OUT 1 L2
OUT 2
OUT 2
P OUT 3 L1
L2
L OUT 3
OUT 4
C OUT 4
OUT 5
OUT 5
OUT 6
OUT 6
PLC Operating Cycle
START
Integer Files
6
Control File
5
Counter File
4
Timer File
3
Bit File
2
Status File
1
Input File
0
Output File
FILES
DATA
MicroLogix
MEMORY
Memory & Data
• DATA
• MEMORY – Octal 0-7
– Bit = 1or 0 – BCD 0-9
– Nibble = 4 bits – HEX 0-F (15)
– Byte = 2 nibbles – Integer (signed)
– Word(16 bits) 2 -32768 to +32767
bytes – Unsigned Integer
– Double Word= 2 65,535 (32767 +
words 32767)
• 32 bits – Floating Point
– Long Word=2 • IEEE +/- 3.45x1038 to
Double words +/-1.17x10-38
• 64 bits
Data Structure
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word =16 bits : 0000 0000 0000 0000
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ASCII Data : 0000 0000 0000 0000
Integer Data : Signed INTEGER between -32,768 & 32,767
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BCD Data : 0000 0000 0000 0000
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HEX Data : 0000 0000 0000 0000
Inputs & Outputs
File #0 File Type
Bit Number
(0-5,11)
O0:0/0
0
Outputs
File contains 11 5 0
File Number
6 or 12 Outputs Word 0 000000000000
File Type
File #1 Input Number
(0-9,19)
1
Inputs I1:0/0 15 9 0
File Number Word 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
File contains
Word 1 0000
10 or 20 Inputs
19 16
Status File
• File #2
– General purpose file that consists of 32 registers
(words). These registers are mixed in “word”
and “bit” formats depending on the function
they represent. The Status file is primarily used
for:
• Setting system operating features,
• Displaying system status and faults
– Programming aids consisting of:
• Timebase bits
• Math overflow flags
• Index registers
• Subroutine control
Bit File
511 496
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word 31: 0000 0000 0000 0000
Timers
• Timer Operation
– The timer times as long as its rung is TRUE.
When the timer times up to a specified value, it
alerts the rest of the program by setting a bit.
When the rung becomes FALSE, the timer stops
timing and resets itself to zero.
I:0.0
||
0
Timers
• File #4
– 40 Timers (MicroLogix 1000 only)
– TON, TOF, and RTO
• Timer On Delay
• Timer Off Delay
• Retentive Timer On
– .01 and 1 second time base
File Type
Timer Number
(0-39)
T4:0
4
Timers
File Number
File contains
40 timers
Timers
File Type
Timer Number
(0-39)
T4:0
4
Timers
File Number 15 14 13
File contains
Word 0 EN TT DN
40 timers Word 1 Preset Value
Word 2 Accumulated Value
][ TIMER ON DELAY
Timer T4:0
(EN)
Time Base
Preset
1.0
10
(DN)
Accum 0
Counters
• Counter Operation
– The counter counts (by one) every time its rung
goes from FALSE to TRUE. When a specified
number of counts has been reached, the
counter alerts the rest of the program by setting
a bit. The program must reset the counter to
start counting from zero again.
I:0.0
||
0
Counters
• File #5
– 32 Counters (MicroLogix 1000 only)
– Up, Down, Up/Down
File Type
Counter Number
(0-31)
C5:0
5
Counters
File Type
Counter Number
(0-31)
5
Counters
C5:0 15 14 13 12 11
Word 0 CU CD DN OV UN
File contains File Number Word 1 Preset Value
32 counters Word 2 Accumulated Value
][ Count Up
Counter C5:0
(CU)
Preset
Accum
10
0
(DN)
Reset
I:0/4 C5:0
][ (RES)
Control
• File #6
– Used for higher level application specific
commands.
• FIFO/LIFO Stacks
• Sequencers
• Bit Shifts etc..
– Required to allow the PLC to “manage/control”
the application instruction.
– 16 Registers (words) in MicroLogix 1000
Integer
• File #7
– General purpose data registers (words)
– Primarily used for:
• Comparison instructions
• Math instructions
• Sequencers
• FIFO and LIFO stacks
– 105 Registers (words) in MicroLogix 1000
Relay Ladder Logic
|| |/| ()
|| || |/| ()
|| |/| ()
||
L1 L2
Ladder Logic Concepts
|| || ()
True False False
No Logical Continuity
|| || ()
True True True
Logical Continuity
Logical AND Construction
L1 L2
I/4 I/5 O/0
|| || ()
True True True
Logical Continuity
Logical OR Construction
Open Closed
|| |/| ()
T T T
Logic Side
Output
Rung Output Output Terminal Switch
Terminal Motor
State Bit
Switch
OTE TRUE ON Closed Running
Output Energize
-( )-
FALSE OFF Open Stopped VAC O/0
VDC
Supply
L2 Voltage L1
Relay Logic to Ladder Logic
Description
When rung conditions are true, this output instruction adds Source A to Source B
and stores the result at the destination address. Source A and Source B can either
be values or addresses that contain values, however Source A and Source B
cannot both be constants
SUB
SUB
Source A 50000.0
50000.0
Source B N7:34
0
Dest N7:35
0
Description
When rung conditions are true, the SUB output instruction subtracts Source B
from Source A and stores the result in the destination. Source A and Source B
can either be values or addresses that contain values, however Source A and
Source B cannot both be constants.
MOV
Move
Source 555
555
Dest N7:O
?
Description
When rung conditions preceding this instruction are true, the MOV
instruction moves a copy of the source to the destination each scan.
The original value remains intact and unchanged in its source location.
LES
Less Than (A<B)
Source A N7:6
0
Source B 12
12
Description
Description
This input instruction compares two user specified values. If the value
stored in Source A is greater than the value stored in Source B, it allows
rung continuity. The rung will go "true" and the output will be energized
(provided no other instructions affect the rung's status). If the value at
Source A is less than or equal to the value at Source B, the instruction is
logically false.