Vous êtes sur la page 1sur 56

What Is A Programmable

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

• MicroPLCs vs. Custom SBC’s (single board computers)


– High design costs
• Contract or Staff with overhead and maintenance issues associated with each

– Repair / Service nightmare for customers


• Depending on markets served supplier must develop/support services

– High level of technical expertise required by technicians


• Specialized circuit boards require specialized equipment and technical staff

– Not readily available through distribution (typically regional)


• Suppliers sell the controller imbedded, replacement parts are not readily available even in
emergency situations

– Typically does not meet worldwide standards


• Certifications cost money, typically a single controller does not warrant the investment.
Volumes are not high enough and re-certification on each revision is unrealistic

– Typically a “Domestic” product


• Because of these issues many manufacturers limit themselves to a single market.
Other Types of Controls

• Competing Control Systems


– Relays
• above 2/3 relays cost becomes a problem
• limited functions
• maintenance/reliability
• expensive to program
• difficult to troubleshoot
– Custom SBC’s (single board computers)
• High design costs
• Repair / Service nightmare for customers
• High level of technical expertise required by technicians
• Not readily available through distribution (typically regional)
• Typically does not meet worldwide standards
• Typically a “Domestic” product
Traditional PLC Concept

• PLC performs relay equivalent functions


• PLC performs ON/OFF control
• Ladder diagram program representation
• Designed for industrial environment
• Designed for ease of use and maintenance
PLC Advantages

• 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

• Pushbuttons • 120/230 VAC


• Selector Switches
• 24 VDC
• Limit Switches
– Sourcing
• Level Switches
– Sinking
• Photoelectric Sensors
• Proximity Sensors
• Motor Starter Contacts
• Relay Contacts
• Thumbwheel Switches
Output 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

• Power supply, inputs, outputs and


communication port are enclosed in a
single package. Input and output devices
are wired individually to the packaged
controller.
Packaged PLC With
Expansion
• Base is identical to the standard Packaged
PLC, but it also has the ability to drive
additional I/O. The most common form of
expansion is a block of I/O that uses the
same base, or makes use of different types
of expansion “modules”.
Modular Rack-Less PLC’s

• Identical in functionality to rack based


PLC’s
• Typically not as robust (packaging)
• Typically found on “smaller” (small and
medium) sized PLC’s.
• Will likely become the prevalent form of
packaging in the future.

+ +
Processor Base Unit Compact I/O
Modular PLC’s

• Mix N Match Components


– Processors, Power Supplies and I/O are plugged
into a rack or chassis
– Available in Small, Medium, and Large platforms
– Flexibility results in higher costs when
compared to packaged
Distributed

• Rely on communications for EVERYTHING


• All I/O is connected to the processor
through a “High Speed” data link.
• Typically found on “larger” (medium and
large) PLC’s.
• For certain applications this type of form
factor is very advantageous.
• Usually higher cost for hardware, but much
lower cost for system integration.
• RIO (Remote I/O), DeviceNet are examples
of distributed control.
Why use a Micro PLC

• 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

Housekeeping Input Scan


Internal checks on The status of external inputs
memory, speed and (terminal block voltage) is written
operation. Service to the Input image (“Input file”).
any communication
requests, etc.

Output Scan Program Scan


The Output Image data Each ladder rung is scanned
is transferred to the using the data in the Input file.
external output The resulting status (Logic
circuits, turning the being solved) is written to the
output devices ON or Output file (“Output Image”).
OFF.
Memory Organization

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

• File #3 (32 registers or words)


15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word 0: 0000 0000 0000 0000
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
7 6 5 4
B3:1/0
15 14 13 12 11 10 9 8 3 2 1 0 (RSLogix,APS)
Word 1:
0000 0000 0000 0000 OR
47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 B/16
Word 2: 0000 0000 0000 0000 (HHP)

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

Preset T4:0.PRE How long the timer should time for.


Accumulated T4:0.ACC How long the timer has timed for already.
Done T4:0/DN Set to “1” when accumulated value > preset value.
Timer Timing T4:0/TT Set to “1” when accumulated value < preset value.
Enable T4:0/EN Set to “1” when the rung containing the timer is true.
Timers

• The Timer’s “done bit” turns the motor off


after a 10 second time delay

Stop Start Timer Done Motor


I:0/1 I:0/0 T4:0/DN O:0/3
]/[ ][ ]/[ ( )
M1
O:0/3
][
M1
O:0/3 TON

][ 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 contains File Number


32 counters
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

Preset C5:0.PRE How many the counter should count up to


Accumulated C5:0.ACC How many the counter has counted already.
Done C5:0/DN Set to “1” when accumulated value > preset value.
Count Up C5:0/CU Set to “1” when state of CTU rung are true.
Count Down C5:0/CD Set to “1” when state of CTD rung are true.
Over/Underflow C5:0/OV,UN Set to “1” when counter counts past 32,767 or
-32,768.
Counters

• The Counters “done bit” stops the motor


from running, after 10 operations.
Stop Start Counter Done Motor
I:0/1 I:0/0 C5:0/DN O:0/3
]/[ ][ ]/[ ( )
M1
O:0/3
][
M1
O:0/3 CTU

][ 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

What is Relay Ladder Logic?


Is the primary programming language for PLCs
A graphical representation of the program designed to look
like relay logic
Ladder Logic Concepts

Read / Conditional Write / Control


Instructions Instructions
Start (Rung #1) || ()

|| |/| ()

|| || |/| ()

|| |/| ()
||

End (Rung #5) || |/| ()

L1 L2
Ladder Logic Concepts

Read / Conditional Write / Control


Instructions Instructions

|| || ()
True False False
No Logical Continuity

|| || ()
True True True

Logical Continuity
Logical AND Construction

IF input 4 AND input 5 are true


THEN energize output 0

L1 L2
I/4 I/5 O/0
|| || ()
True True True

Logical Continuity
Logical OR Construction

IF input 4 OR input 5 are true


THEN energize output 0
True
L1
I/4 O/0 On L2
|| ()
F I/5
||
False On
L1 I/4 O/0 L2
|| ()
I/5
||
True
Complex Construction

I/4 I/0 I/1 I/9 I/10 O/0


|| |/| || || || ()
I/5 I/1 I/7 I/8
|| |/| |/| |/|
I/2 I/3
|| ||
I/11 I/1
|/| ||
Read Instructions

Open Closed

The instruction is:


If the The input
Examine ON Examine OFF
input bit is
device is -| |- -|/|-
XIC XIO

Open (0) Logic 0 False True

Closed (1) Logic 1 True False

XIC / Examine if Closed


XIO / Examine if Open
Write Instruction

|| |/| ()
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

PB1 LS1 SOL2 I/4 I/6 O/0


|| || ()
I/7 I/5 CR3
LS2 PB2 CR3
|| || ()
LS3 I/8
||
CR3 O/1
I/9
CR3 LS4 M1 |/| || ()
|/|

INPUT Address Assignment:


PB1- I/4 PB2- I/5
LS1- I/6 LS2- I/7
LS3- I/8 LS4- I/9

OUTPUT Address Assignment:


SOL2- O/0 M1- O/1

CR3 Boolean Tag


Troubleshooti
ng

• Controller LED Status


• I/O Checking – PLC Side
• I/O Checking – Field Side
• Logic Check
ADD
Add
Source A 22406
22406
Source B N7:3
0
Dest N7:12
0

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

This conditional input instruction tests whether one value (Source A) is


less than another (Source B). If the value at Source A is less than the value
at Source B, the instruction is logically true. If the value at Source A is
greater than or equal to the value at Source B, the instruction is logically
false.
GRT
Greater Than (A>B)
Source A N7:0
0
Source B 22
22

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.

Vous aimerez peut-être aussi