47
Programmable Logic Controllers (PLC)

PLC Basics

Embed Size (px)

Citation preview

Page 1: PLC Basics

Programmable Logic Controllers (PLC)

Page 2: PLC Basics

PLC Presentation Contents

• Introduction

• What is a PLC

• PLC Types

• Choosing PLC Hardware

• PLC Applications

• Programming PLC’s

• Advantages of PLCs

• Questions

Page 3: PLC Basics

What is a PLC?

Page 4: PLC Basics

Nema Definition circa 1978

. The PLC, also known as programmable controller is defined by the National Electrical Manufacturers Association (NEMA) in 1978 as:

 

"a digitally operating electronic apparatus which uses a programmable memory for the internal storage of instructions for implementing specific functions, such as logic, sequencing, timing, counting and arithmetic, to control through digital or analog input/output, various types of machines or process".

Page 5: PLC Basics

Traditional PLC Concept

• PLC performs relay equivalent functions

• PLC performs ON/OFF control

• Ladder diagram programming

• Designed for industrial environment

Page 6: PLC Basics

|/|

CR3

CR3 M1

PB1 LS1 SOL2

PB2LS1

LS3

LS4

I/8

I/4 I/6 O/0

O/1

| | | | ( )

I/5I/7 B/0| | | | ( )

| |

|/|B/0

( )

Relay Logic vs. PLC & Ladder Logic

| |I/9

ProgrammableLogic

Controller

Inputs Outputs

CR

Page 7: PLC Basics

Terminal Block

1

2

3

4

5

6

7

8

9

Input Devices

L1

L1

L210

COM

PLC

IsolationBarrier

Input Wiring: PLC input is the load in the circuit, sensing if voltage is present

Page 8: PLC Basics

Input Devices

• Pushbuttons

• Selector Switches

• Limit Switches

• Level Switches

• Photoelectric Sensors

• Proximity Sensors

• Motor Starter Contacts

• Relay Contacts

• Thumbwheel Switches

• 120/230 VAC

• 24 VDC

– Sourcing

– Sinking

Page 9: PLC Basics

OUT 1

Output Devices

L2

L2

L1OUT 1

OUT 2

OUT 2

OUT 3

OUT 3

OUT 4

OUT 4

OUT 5

OUT 5

OUT 6

OUT 6

CR

L1PLC

Terminal Block

IsolationBarrier

Output Wiring: PLC output is the switch, controlling current flow to load

Page 10: PLC Basics

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

Page 11: PLC Basics

Inside a PLC

CR

IsolationBarrier

IsolationBarrier

MEMORY

program data

HighVoltage

HighVoltage

Low Voltage

AC Power Supply85-264 VAC,

50/60Hz

Output

Circuits

ExternalDC Power Supplyor

Communications

Input

Circuits

CentralProcessor

Page 12: PLC Basics

Input Scan

Program ScanOutput Scan

Housekeeping

START

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”).

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

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

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

PLC Operating Cycle

Page 13: PLC Basics

PLC Hardware Types

Page 14: PLC Basics

Most Basic of PLC Systems

In the most basic of PLC systems, a self contained (shoe box) PLC has 2 terminal blocks, one for Inputs and one for Outputs

Today, most PLC’s in this category are know as Micros. Typically they provide front panel LED status indication of I/O and Processor states

Programmable Controller

Inputs Outputs

CR

Page 15: PLC Basics

Modular Chassis Based PLC’s

The vast majority of PLC’s installed today are modular chassis based systems consisting of:

1. Processor Module (CPU)

2. Input & Output Modules

3. Chassis

4. Power Supply

Page 16: PLC Basics

Modular Chassis-less PLC Systems

Also available from many vendors are “Chassis less” but still Modular PLC systems. These systems still require a Processor, I/O Modules, and Power Supply, but in place of a chassis these components mount directly onto a panel, din rail, and many use a tongue and grove system to allow easy insertion and removal

Page 17: PLC Basics

Choosing PLC Hardware

Page 18: PLC Basics

PLC Application Considerations

• Inputs/Outputs– Type,

• AC, DC, sourcing, sinking, etc.

– Number of• 10, 16, 20, 32, 156

• Memory– Type

• Flash or Battery backed

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

• Functions required– Instruction set

• Messaging• PID• PTO, PWM

– Arithmetic– Communications

• DeviceNet, Ethernet• Remote I/O, DH+

– Report generation

Page 19: PLC Basics

SOURCING vs. SINKING

+VDC

SOURCING Pushbutton(PNP)

SINKING Pushbutton(NPN)

DC Power Supply

+

- DC COM

DC Power Supply

+

-

Page 20: PLC Basics

SOURCING vs. SINKING DC Inputs

DC Power Supply

Field Device

DC Input Module

+

- DC COM

IN1

DC Input Module

Field Device

DC Power Supply

+

-

+VDC

IN1

SOURCING

(PNP)

SINKING

(NPN)

Page 21: PLC Basics

Rules

• Field devices on the positive side (+VDC) of the field power supply are sourcing field devices.

• Field devices on the negative side (DC COM) of the field power supply are sinking field devices.

• Sourcing field devices must be connected to sinking I/O cards and vice versa.

• Sinking field devices must be connected to sourcing I/O cards and vice versa.

RULES

Page 22: PLC Basics

PLC Applications

Page 23: PLC Basics

Installed and Running Systems in RI

- Conveyors- Curtain rods - Deodorants- Donuts - Duplex Receptacles - Fibers - Filters - Forged Parts- Glass- Goggles- Grinding and Polishing- Heat Treating Metal Products- Jails- Lenses- Nails- Natural Gas- Paper

- Pharmaceuticals - Plastics - Plating - Plating Machines - Power Generation - Power Supplies - Product Assembly Machines - Rubber products - Seafood Processing - Soda - Staples - Warehouse Automation - Waste Water Systems - Drinking Water Systems - Water Heaters - Web Handling (paper/plastic)- Wire / Cable

Page 24: PLC Basics

Motor Solenoid 1 Solenoid 2

Solenoid 3

Sensor 1

Sensor 2

Ingredient A Ingredient B

Typical PLC Application

Page 25: PLC Basics

Motor Solenoid 1 Solenoid 2

Solenoid 3

Sensor 1

Sensor 2

Ingredient A

Ingredient B

Operation of Mixer (Sequence of Control)

• Solenoid 1– On = Sol 3 is off, and Motor is

off, and Sensor 2 is off, and Auto Switch is on

– Off = Sol 3 is on, or Motor is on, or Sensor 2 is on

• Solenoid 2– On = Sol 3 is off, and Motor is

off, and Sensor 2 is on– Off = Sol 3 is on, or Motor is

on, or Sensor 1 is on

• Motor– On = Sensor 1 is on, and

Solenoid 2 is off, and Solenoid 1 is off

– Off = Solenoid 3 on

• Solenoid 3– On = Sol 1 is off, and Sol 2 is

off, and Motor has run for 30 sec.

– Off = Solenoid 3 has been on for 60 sec.

Page 26: PLC Basics

PLC Applications: Packaging

De-Palletizing, Washing, Filler, Capper, Case Packaging, Wrapping, Cartoning, Labeling, & Bagging Machines

Page 27: PLC Basics

PLC Application: SCADA & RTU

Supervisory Control and Data Acquisition (SCADA)/Remote Terminal Unit (RTU)

• puts the remote site report data at your fingertips, but also provides affordable remote communications and control, minimizing the likelihood of remote site issues.

Page 28: PLC Basics

PLC Applications: Material Handling

• Control of rollerbed conveyors or towveyors, and mobile equipment including transfer vehicles, elevated transfer vehicles, lifts and hoists, and stacker cranes.

Page 29: PLC Basics

PLC Applications: Distribution

Start and stop conveyors, control traffic at merge points, redirect packages at divert points, and control a wide assortment of OEM machines such as palletizers and accumulators.

Page 30: PLC Basics

PLC Programming

Page 31: PLC Basics

Programming PLC’s

The purpose of a PLC Program is to control the state of PLC outputs based on the current condition of PLC Inputs

Different PLC’s support different languages, but the most popular PLC language is know as “Ladder Logic”.

PLC Ladder Logic purposely resembles Relay Logic

Page 32: PLC Basics

Ladder Logic Concepts

| | |/|

Read / Conditional Instructions

Write / Control Instructions

| | |/|

| | |/|

| |

| | |/| ( )

| |

( )

( )

( )

( )

| |

Start (Rung #1)

End (Rung #5)

Page 33: PLC Basics

Ladder Logic Concepts

Read / Conditional Instructions

Write / Control Instructions

No Logical Continuity

|/| | |

T F F

|/| |/|

( )

( )

T T T

Logical Continuity

Page 34: PLC Basics

Logical AND Construction

IF input 4 AND input 5 have power

THEN energize output 0

| |I/4

| |I/5

( )O/0

Logical Continuity

T T T

On

Page 35: PLC Basics

Logical OR Construction

IF input 4 OR input 5 have power

THEN energize output 0

| |I/4

| |I/5

( )O/0

Logical Continuity

F

T

On

| |I/4

| |I/5

( )O/0

Logical Continuity

T

F

On

Page 36: PLC Basics

Complex Construction

|/|I/11

| |I/5

|/|I/7

|/|I/1

| |I/3

| |I/2

| |I/4

|/|I/0

| |I/1

| |I/1

|/|I/8

| |I/9

( )O/0

| |I/10

Page 37: PLC Basics

Read Instructions

Unused I / 2I / 1I / 0COM I / 3 I / 6I / 5COMI / 4 I / 7 I / 9I / 8

Supply

Voltage

Unused

LS 1

False

True

Examine OFF

-|/|-XIO

False

The instruction is:The input

bit is

Logic 0

Logic 1 True

Examine ON

-| |-XIC

If the input

device is

Open (0)

Closed (1)

Page 38: PLC Basics

Write Instruction

RungState

OutputBit

OutputTerminal

De-energized

TRUE

FALSE

ON

OFF

OTEOutput Energize

-( )-

| | |/| ( )

T T T

ENERGIZED

GNDL 1 O / 0VACVDC

L 2 / N VACVDC

VACVDC

O / 2VACVDC

O / 1 O / 3 O / 5O / 4VACVDC

SupplyVoltage

Page 39: PLC Basics

Putting it Together

| | ( )I/8 O/0

GNDL 1 O / 0VAC

VDC

L 2 / N VAC

VDC

VAC

VDC

O / 2VAC

VDC

O / 1 O / 3 O / 5O / 4VAC

VDC

Supply

Voltage

Unused I / 2I / 1I / 0COM I / 3 I / 6I / 5COMI / 4 I / 7 I / 9I / 8

SupplyVoltage

Unused

PB1

Page 40: PLC Basics

Addressing Example

L1 L2

PB1 LS1 PS2 SOL6

DEVICE

PB1

LS1

PS2

SOL6

| | ( )| | | |I/5 I/6 O/0I/7

HHPI/5

I/6

I/7

O/0

LogixI:0/5

I:0/6

I:0/7

O:0/0

ADDRESS

Page 41: PLC Basics

INPUT Address Assignment:PB1- I/4 PB2- I/5LS1- I/6 LS2- I/7LS3- I/8 LS4- I/9

OUTPUT Address Assignment:SOL2- O/0 M1- O/1

|/|

CR3

CR3 M1

PB1 LS1 SOL2

PB2LS1

LS3

LS4

I/8

I/4 I/6 O/0

O/1

| | | | ( )

I/5I/7 B/0| | | | ( )

| |

|/|B/0

( )

Relay Logic to Ladder Logic

| |I/9

Page 42: PLC Basics

Advanced Instructions

• SEQUENCERS

• SHIFT REGISTERS

• DATA HANDLING

• HIGH SPEED COUNTER

• SUBROUTINES

Page 43: PLC Basics

Advantages of a PLC

Page 44: PLC Basics

Basic PLC Advantages

• Ease of programming

• Ease of maintenance

• Designed for industrial environment

• Quick installation

• Adaptable to change

Source: A-B’s Micro Solutions Presentation

Page 45: PLC Basics

Advantages over Relays

• All the capabilities of the earlier systems• Dramatic performance increase over the relay

logic systems • Greater reliability • Little maintenance due to no moving parts • No special programming skills required by

maintenance personnel • Physical size of the PLC system is much smaller

than the conventional relay based logic • And most importantly much lower cost

Source: [email protected]

Page 46: PLC Basics

Advantages over SBC’s (single board computers)

• SBC’s have high design costs– Contract or Staff with overhead and maintenance issues associated with each

• SBC’s are Repair / Service nightmare for customers– Depending on markets served supplier must develop/support services

• SBC’s requires high level of technical expertise by technicians

– Specialized circuit boards require specialized equipment and technical staff

• SBC’s not stocked through local distributors– Suppliers sell the controller imbedded, replacement parts are not readily available

even in emergency situations

• SBC’s typically do 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

• SBC’s typically a “Domestic” product– Because of these issues many manufacturers limit themselves to a single market.

Source: A-B’s Micro Solutions Presentation

Page 47: PLC Basics

Advantages over Computer based Software

• Maintenance personnel already experienced in PLC troubleshooting and servicing relay latter logic programming, not PC software

• Better power failure response

• Cost advantages for simple machine control• Higher reliability that minimizes the expense of shutdown,

troubleshooting, repair, & startup

• Industrially hardened packaging

• Long availability and support for product models without the rapid obsolescence of PCs.