Vous êtes sur la page 1sur 55

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 race problems are common and difficult to deal with

Other Types of Control


MicroPLCs vs. Custom SBCs (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.

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

I n p u t

C i r c u i t s

Central Processor

O u t p u t

C i r c u i t s

CR

High Voltage
Isolation Barrier

MEMORY
program
Low Voltage AC Power Supply 85-264 VAC, 50/60Hz

Isolation Barrier

High Voltage

data

or

External DC Power Supply

Input Devices
Pushbuttons Selector Switches Limit Switches Level Switches 120/230 VAC 24 VDC
Sourcing Sinking

Photoelectric Sensors
Proximity Sensors Motor Starter Contacts Relay Contacts Thumbwheel Switches

Output Devices
Valves Motor Starters Solenoids Control Relays Alarms Lights Fans Horns Relays
120 VAC/VDC 240 VAC 24 VAC/VDC

Triac
120/230 VAC

Transistor MOSFET
24 VDC

PLC Application Considerations


Inputs/Outputs
Type,
AC, DC, sourcing, sinking, etc.

Functions required
Instruction set
Messaging PID PTO, PWM

Number of
10, 16, 20, 32, 156

Memory
Type
Flash or Battery backed

Arithmetic Communications
DeviceNet, Ethernet Remote I/O, DH+

Size
1k, 6k, 12k, 16k, 64k

Report generation

PLCs 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 PLCs


Identical in functionality to rack based PLCs Typically not as robust (packaging) Typically found on smaller (small and medium) sized PLCs. Will likely become the prevalent form of packaging in the future.

+
Processor Base Unit

+
Compact I/O

Modular PLCs
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) PLCs. 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 PLCs

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 Block Isolation Barrier

Input Devices

1 2 3 4 5 6 7 8

L1 L1

P L C

L2

10 COM

Output Wiring
Isolation Barrier Terminal Block

Output Devices L1 L2

CR

OUT 1 OUT 1 OUT 2 OUT 2 OUT 3 OUT 3

P L C

L1 L2

OUT 4
OUT 4 OUT 5 OUT 5 OUT 6 OUT 6

PLC Operating Cycle


START

Housekeeping
Internal checks on memory, speed and operation. Service any communication requests, etc.

Input Scan
The status of external inputs (terminal block voltage) is written to the Input image (Input file).

Output Scan
The Output Image data is transferred to the external output circuits, turning the output devices ON or OFF.

Program Scan
Each ladder rung is scanned using the data in the Input file. The resulting status (Logic being solved) is written to the Output file (Output Image).

Memory Organization

Integer Files Control File Counter File Timer File Bit File Status File Input File Output File

DATA FILES

MicroLogix MEMORY

Memory & Data


MEMORY
Bit = 1or 0 Nibble = 4 bits Byte = 2 nibbles Word(16 bits) 2 bytes Double Word= 2 words
32 bits

DATA
Octal 0-7 BCD 0-9 HEX 0-F (15) Integer (signed) -32768 to +32767 Unsigned Integer 65,535 (32767 + 32767) Floating Point
IEEE +/- 3.45x1038 to +/1.17x10-38

Long Word=2 Double words


64 bits

Data Structure
15 14 13 12 11 10 9 8 11 10 9 8 7 6 5 4 7 6 5 4 3 2 1 0 3 2 1 0

Word =16 bits :


ASCII Data : Integer Data :

0000 0000 0000 0000


15 14 13 12

0000 0000 0000 0000


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 :
HEX Data :

0000 0000 0000 0000


15 14 13 12 11 10 9 8

7 6 5 4

3 2 1 0

0000 0000 0000 0000

Inputs & Outputs


File #0
0
Outputs
File contains 6 or 12 Outputs File Type Bit Number (0-5,11)

O0:0/0
File Number
Word 0

11

000000000000

File #1
1 Inputs
File contains

File Type

Input Number (0-9,19)

I1:0/0
File Number
Word 1

15

Word 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0000 19 16

10 or 20 Inputs

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 15 14 13 12 11 10 9 8 11 10 9 8 7 6 5 4 7 6 5 4 3 2 1 0 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 15 14 13 12 11 10 9 8 3 2 1 0

B3:1/0 (RSLogix,APS)
OR

Word 1:

0000 0000 0000 0000


47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 7 6 5 4 15 14 13 12 11 10 9 8 3 2 1 0

Word 2:

0000 0000 0000 0000


511 15 14 13 12 11 10 9 8 7 6 5 4 496 3 2 1 0

B/16 (HHP)

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

||

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)

Timers
File Number

T4:0

File contains 40 timers

Timers

File Type

Timer Number (0-39)

Timers
File Number

T4:0
15 14 13 Word 0 EN TT DN Word 1 Word 2

File contains 40 timers

Preset Value Accumulated Value

Preset Accumulated Done Timer Timing Enable

T4:0.PRE T4:0.ACC T4:0/DN T4:0/TT T4:0/EN

How long the timer should time for. How long the timer has timed for already. Set to 1 when accumulated value > preset value. Set to 1 when accumulated value < preset value. Set to 1 when the rung containing the timer is true.

Timers
The Timers 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

]/[

][
O:0/3
M1

]/[

( )

][
O:0/3
M1

TON
TIMER ON DELAY Timer T4:0 Time Base 1.0 Preset 10 Accum 0

][

(EN) (DN)

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

||

Counters
File #5
32 Counters (MicroLogix 1000 only) Up, Down, Up/Down

File Type

Counters

C5:0
File Number

Counter Number (0-31)

File contains

32 counters

Counters
File Type

Counters

C5:0
File Number C5:0.PRE C5:0.ACC

Counter Number (0-31)


15 14 13 12 11

Word 0 CU CD DN OV UN

File contains 32 counters Preset Accumulated

Word 1 Word 2

Preset Value Accumulated Value

How many the counter should count up to How many the counter has counted already.

Done
Count Up Count Down Over/Underflow

C5:0/DN
C5:0/CU C5:0/CD

Set to 1 when accumulated value > preset value.


Set to 1 when state of CTU rung are true. Set to 1 when state of CTD rung are true.

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

]/[

][
O:0/3
M1

]/[

( )

][
O:0/3
M1

CTU
Count Up Counter Preset Accum C5:0 10 0

][

(CU) (DN)
C5:0

Reset

I:0/4

][

(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 Instructions


Start (Rung #1)

Write / Control Instructions

|| || || || || || |/| |/| |/|

() () () ()

End (Rung #5)

||
L1

|/|

()
L2

Ladder Logic Concepts

Read / Conditional Instructions

Write / Control Instructions

||
True

||
False

() False

No Logical Continuity

|| True

||
True

()
True

Logical Continuity

Logical AND Construction

IF input 4 AND input 5 THEN energize output 0


L1

are true

I/4

||

I/5

||

O/0

L2

()

True

True
Logical Continuity

True

Logical OR Construction

IF input 4 OR input 5 are true THEN energize output 0


L1

True
I/4

O/0 On

L2

||
F I/5

()

||

L1

False
I/4

O/0

On

L2

||
I/5

()

||
True

Complex Construction

I/4

I/0

I/1

||
I/5

|/|
I/1

||
I/7

|| |/|

I/9 I/10 O/0

|| ()

I/8

||

|/|
I/2

|/|
I/3 I/11

|| ||
I/1

|/|

||

Read Instructions

Open

Closed

The instruction is:


If the input device is The input bit is Examine ON Examine OFF

-| |XIC

-|/|XIO True False

Open (0) Closed (1)

Logic 0 Logic 1

False
True

XIC / Examine if Closed XIO / Examine if Open

Write Instruction
|| |/| ()

Rung State OTE Output Energize TRUE

Output Bit ON

Output Terminal Switch Closed

Motor Running

Logic Side Output Terminal Switch

-( )FALSE OFF Open Stopped


VAC VDC O/0

L2

Supply Voltage

L1

Relay Logic to Ladder Logic


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

||
LS2 PB2 CR3 I/7 I/5

|| ||
I/8

()
CR3

|| ||
CR3

()

LS3

CR3 |/|

LS4

M1

|/|

I/9

O/1

||

()

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

Troubleshooting

Controller LED Status I/O Checking PLC Side I/O Checking Field Side Logic Check

ADD

Add Source A Source B Dest

22406

22406
N7:3 0 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 Source B Dest


50000.0 50000.0 N7:34 0 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 Dest

555 555 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) N7:6 Source A 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