Osp07 Programmable Logic Controller

download Osp07 Programmable Logic Controller

of 23

Transcript of Osp07 Programmable Logic Controller

  • 8/14/2019 Osp07 Programmable Logic Controller

    1/23

    Departemen Teknik I ndustri FTI-ITB

    TI-3222: Otomasi Sistem Produksi

    Programmable Logic Controller

    LaboratoriumLaboratorium SistemSistem ProduksiProduksi

    www.lspitb.orgwww.lspitb.org

    20042004

    TI-3222: Otomasi Sistem Produksi - 7 2

    Departemen Teknik I ndustri FTI-ITB

    Hasil Pembelajaran

    Umum Mahasiwa mampu untuk melakukan proses perancangan

    sistem otomasi, sistem mesin NC, serta merancang danmengimplementasikan sistem kontrol logika.

    Khusus Memahami fungsi PLC serta komponen-komponen PLC

  • 8/14/2019 Osp07 Programmable Logic Controller

    2/23

    TI-3222: Otomasi Sistem Produksi - 7 3

    Departemen Teknik I ndustri FTI-ITB

    PURPOSE OF Programmable

    Logic Controllers (PLCs)

    Initially designed to replace relay logic boards Sequence device actuation

    Coordinate activities

    Accepts input from a series of switches Sends output to devices or relays

    TI-3222: Otomasi Sistem Produksi - 7 4

    Departemen Teknik I ndustri FTI-ITB

    PURPOSE OF ProgrammableLogic Controllers (PLCs)

    Initially designed to replace relay logic boards Sequence device actuation

    Coordinate activities

    Accepts input from a series of switches Sends output to devices or relays

  • 8/14/2019 Osp07 Programmable Logic Controller

    3/23

    TI-3222: Otomasi Sistem Produksi - 7 5

    Departemen Teknik I ndustri FTI-ITB

    FUNCTIONS OF CONTROLLERS

    1) on-off control,

    2) sequential control,

    3) feedback control, and

    4) motion control.

    TI-3222: Otomasi Sistem Produksi - 7 6

    Departemen Teknik I ndustri FTI-ITB

    CONTROL DEVICES

    1) mechanical control - cam, governor, etc.,

    2) pneumatic control - compressed air, valves,etc.

    3) electromechanical control - switches, relays,a timer, counters, etc,

    4) electronics control - similar toelectromechanical control, except useselectronic switches.

    5) computer control.

  • 8/14/2019 Osp07 Programmable Logic Controller

    4/23

    TI-3222: Otomasi Sistem Produksi - 7 7

    Departemen Teknik I ndustri FTI-ITB

    PROGRAMMABLE LOGIC

    CONTROLLER

    Invented in 1968 as a substitute for hardwired relay panels.

    "A digitally operating electronic apparatus which uses aprogrammable memory for the internal storage ofinstructions by implementing specific functions such as logicsequencing, timing, counting, and arithmetic to control,through digital or analog input/output modules, varioustypes of machines or processes. The digital computer whichis used to perform the functions of a programmablecontroller is considered to be within this scope. Excludedare drum and other similar mechanical sequencingcontrollers."

    National Electrical Manufacturing Association (NEMA)

    TI-3222: Otomasi Sistem Produksi - 7 8

    Departemen Teknik I ndustri FTI-ITB

    VENDORS

    Rockwell

    GE/Fanuc

    Schnieder MODICOM - GOULD ALLEN-BRADLEY Honeywell SQUARE-D

    etc.

  • 8/14/2019 Osp07 Programmable Logic Controller

    5/23

    TI-3222: Otomasi Sistem Produksi - 7 9

    Departemen Teknik I ndustri FTI-ITB

    PLC

    CPU

    System

    User LadderDiagram

    Workingmemoryregisters

    Input

    Flag

    Output

    InputModule

    OutputModule

    TI-3222: Otomasi Sistem Produksi - 7 10

    Departemen Teknik I ndustri FTI-ITB

    PLC Configuration

  • 8/14/2019 Osp07 Programmable Logic Controller

    6/23

    TI-3222: Otomasi Sistem Produksi - 7 11

    Departemen Teknik I ndustri FTI-ITB

    What devices does a PLC interact with?

    INPUT RELAYS-(contacts)These are connected to the outsideworld. They physically exist and receive signals from switches,sensors, etc. Typically they are not relays but rather they aretransistors.

    INTERNAL UTILITY RELAYS-(contacts) These do not receivesignals from the outside world nor do they physically exist.They are simulated relays and are what enables a PLC toeliminate external relays. There are also some special relaysthat are dedicated to performing only one task. Some arealways on while some are always off. Some are on only onceduring power-on and are typically used for initializing datathat was stored.

    COUNTERS-These again do not physically exist. They aresimulated counters and they can be programmed to countpulses. Typically these counters can count up, down or bothup and down. Since they are simulated they are limited in

    their counting speed. Some manufacturers also include high-speed counters that are hardware based. We can think ofthese as physically existing. Most times these counters cancount up, down or up and down.

    TI-3222: Otomasi Sistem Produksi - 7 12

    Departemen Teknik I ndustri FTI-ITB

    What devices does a PLC interact with?Continued

    TIMERS-These also do not physically exist. They come in manyvarieties and increments. The most common type is an on-delaytype. Others include off-delay and both retentive and non-retentive types. Increments vary from 1ms through 1s.

    OUTPUT RELAYS-(coils)These are connected to the outside world.They physically exist and send on/off signals to solenoids, lights,etc. They can be transistors, relays, or triacs depending upon themodel chosen.

    DATA STORAGE-Typically there are registers assigned to simplystore data. They are usually used as temporary storage for math

    or data manipulation. They can also typically be used to storedata when power is removed from the PLC. Upon power-up theywill still have the same contents as before power was removed.Very convenient and necessary!!

  • 8/14/2019 Osp07 Programmable Logic Controller

    7/23

    TI-3222: Otomasi Sistem Produksi - 7 13

    Departemen Teknik I ndustri FTI-ITB

    SWITCHES

    DPSTSPDT

    Non-locking Locking

    Normally Open Normally Closed

    Multiple Throw

    P1

    P2

    Multiple Pole

    Break-before-make Make-before-break

    TI-3222: Otomasi Sistem Produksi - 7 14

    Departemen Teknik I ndustri FTI-ITB

    TERMSThrow - number of states

    Pole - number of connecting moving parts (number ofindividual circuits).

    DPST

    A serial switch box (A-B box) hastwo 25 pin serial ports to switch from.

    InputOutput

    A B

    Knob

    How is this switch classified?

    SPDT

  • 8/14/2019 Osp07 Programmable Logic Controller

    8/23

    TI-3222: Otomasi Sistem Produksi - 7 15

    Departemen Teknik I ndustri FTI-ITB

    TYPES OF SWITCHES

    1. Basic switch, operated by a mechanical level,

    2. Push-button switch,

    3. Slide switch,

    4. Thumbwheel switch,

    5. Limit switch,

    6. Proximity switch, and

    7. Photoelectric switch.

    RATING: voltage, current

    TI-3222: Otomasi Sistem Produksi - 7 16

    Departemen Teknik I ndustri FTI-ITB

    RELAYSA switch whose operation is activated by an electromagnet is called a "relay"

    contact

    coil

    input

    Relay coil Output contact

  • 8/14/2019 Osp07 Programmable Logic Controller

    9/23

    TI-3222: Otomasi Sistem Produksi - 7 17

    Departemen Teknik I ndustri FTI-ITB

    COUNTER

    Digital counters output in the form of a relay contact when apreassigned count value is reached.

    Register

    Accumulator

    contact

    input

    reset

    output

    Input

    Reset

    Output

    Count 0 1 2 3 4 5 0 1

    5

    TI-3222: Otomasi Sistem Produksi - 7 18

    Departemen Teknik I ndustri FTI-ITB

    TIMERA timer consists of an internal clock, a count value register, and an

    accumulator. It is used for or some timing purpose.

    Clock

    Accumulator

    contact

    reset

    output

    Register

    Contact

    Time 5 seconds.

    Clock

    Reset

    Output

    Count 1 2 3 40 5

  • 8/14/2019 Osp07 Programmable Logic Controller

    10/23

    TI-3222: Otomasi Sistem Produksi - 7 19

    Departemen Teknik I ndustri FTI-ITB

    AN EXAMPLE OF RELAY LOGIC

    L1

    LS1 PB1 LS2 R1

    R1

    R1TIMER

    R2

    PR=5

    For process control, it is desired to have the process start (by turning on amotor) five seconds after a part touches a limit switch. The process isterminated automatically when the finished part touches a second limitswitch. An emergency switch will stop the process any time when it ispushed.

    LS1

    PB1LS2

    R1

    TIMER

    5MotorR2

    TI-3222: Otomasi Sistem Produksi - 7 20

    Departemen Teknik I ndustri FTI-ITB

    PLC ARCHITECTUREProgrammable controllers replace most of the relay panel wiring by

    software programming.

    ProcessorI/OModules

    MemoryPowerSupply

    ProgramLoader

    Printer

    Cassette

    Loader

    EPROMLoader

    Switches

    Machines

    Peripherals External Devices

    PC

    A typical PLC

  • 8/14/2019 Osp07 Programmable Logic Controller

    11/23

    TI-3222: Otomasi Sistem Produksi - 7 21

    Departemen Teknik I ndustri FTI-ITB

    PLC COMPONENTS

    1. Processor Microprocessor based, may allow arithmeticoperations, logic operators, block memory moves,computer interface, local area network, functions, etc.

    2. Memory Measured in words.

    ROM (Read Only Memory),

    RAM (Random Access Memory),

    PROM (Programmable Read Only Memory),

    EEPROM (Electronically Erasable ProgrammableROM),

    EPROM (Erasable Programmable Read Only Memory),

    EAPROM (Electronically Alterable Programmable

    Read Only Memory), and

    Bubble Memory.

    TI-3222: Otomasi Sistem Produksi - 7 22

    Departemen Teknik I ndustri FTI-ITB

    PLC COMPONENTS3. I/O Modular plug-in periphery

    AC voltage input and output,

    DC voltage input and output,

    Low level analog input,

    High level analog input and output,

    Special purpose modules, e.g.., high speed timers,

    Stepping motor controllers, etc. PID, Motion

    4. Power supply AC power

    5. Peripheral Hand held programmer (loader),

    CRT programmer,

    Operator console,

    Printer,

    Simulator,

    EPROM loader,

    Cassette loader,

    Graphics processor, and

    Network communication interface. MAP, LAN

  • 8/14/2019 Osp07 Programmable Logic Controller

    12/23

    TI-3222: Otomasi Sistem Produksi - 7 23

    Departemen Teknik I ndustri FTI-ITB

    LADDER DIAGRAM

    A ladder diagram (also called contact symbology) is a means ofgraphically representing the logic required in a relay logicsystem.

    A

    R1

    PB1 PB2

    R1

    R1

    start emergency stop

    Rail

    Rung

    TI-3222: Otomasi Sistem Produksi - 7 24

    Departemen Teknik I ndustri FTI-ITB

    Ladder Representation

  • 8/14/2019 Osp07 Programmable Logic Controller

    13/23

    TI-3222: Otomasi Sistem Produksi - 7 25

    Departemen Teknik I ndustri FTI-ITB

    PLC WIRING DIAGRAM

    01 02 20

    20

    20 11

    01

    02

    03

    11

    12

    A

    PLCInput Output

    Externalswitches

    Stored program

    TI-3222: Otomasi Sistem Produksi - 7 26

    Departemen Teknik I ndustri FTI-ITB

    SCAN

    begin

    Input

    Output

    Resolvelogic

    Idle

    A PLC resolves the logic of a ladder diagram (program) rung by rung, fromthe top to the bottom. Usually, all the outputs are updated based on thestatus of the internal registers. Then the input states are checked and thecorresponding input registers are updated. Only after the I/Os have beenresolved, is the program then executed. This process is run in a endlesscycle. The time it takes to finish one cycle is called the scan time.

    Scan cycle

  • 8/14/2019 Osp07 Programmable Logic Controller

    14/23

    TI-3222: Otomasi Sistem Produksi - 7 27

    Departemen Teknik I ndustri FTI-ITB

    PLC INSTRUCTIONS

    1) Relay,

    2) Timer and counter,

    3) Program control,

    4) Arithmetic,

    5) Data manipulation,

    6) Data transfer, and

    7) Others, such as sequencers.

    TI-3222: Otomasi Sistem Produksi - 7 28

    Departemen Teknik I ndustri FTI-ITB

    LOGIC STATES

    ON : TRUE, contact closure, energize, etc.

    OFF: FALSE, contact open , de-energize, etc.

    (In the notes we use the symbol "~" to representnegation. AND and OR are logic operators. )

    Do not confuse the internal relay and program with the externalswitch and relay. Internal symbols are used for programming.External devices provide actual interface.

  • 8/14/2019 Osp07 Programmable Logic Controller

    15/23

    TI-3222: Otomasi Sistem Produksi - 7 29

    Departemen Teknik I ndustri FTI-ITB

    AND and OR LOGIC

    PB1 R1PB2

    R2

    R1 = PB1.AND.PB2

    R2 = PB2.AND.~PB4

    PB3 PB4

    PB1 R1

    PB2

    R1 = PB1 .OR. PB2

    AND

    OR

    TI-3222: Otomasi Sistem Produksi - 7 30

    Departemen Teknik I ndustri FTI-ITB

    COMBINED AND & OR

    R1 = PB1 .OR. (PB2 .AND. PB3)

    PB1 R1

    PB2 pb3

  • 8/14/2019 Osp07 Programmable Logic Controller

    16/23

    TI-3222: Otomasi Sistem Produksi - 7 31

    Departemen Teknik I ndustri FTI-ITB

    Relay diagram symbols

    TI-3222: Otomasi Sistem Produksi - 7 32

    Departemen Teknik I ndustri FTI-ITB

    Relay diagram symbols

  • 8/14/2019 Osp07 Programmable Logic Controller

    17/23

    TI-3222: Otomasi Sistem Produksi - 7 33

    Departemen Teknik I ndustri FTI-ITB

    RELAY

    A Relay consists of two parts, the coil and the contact(s).

    Contacts:

    a. Normally open -| |-

    b. Normally closed -|/|-

    c. Off-on transitional -||-

    d. On-off transitional -| |-

    Coil:

    a. Energize Coil -( )-

    b. De-energize -(/)-

    c. Latch -(L)-

    d. Unlatch -(U)-

    ( )

    TI-3222: Otomasi Sistem Produksi - 7 34

    Departemen Teknik I ndustri FTI-ITB

    TIMERS AND COUNTERS

    Timers:

    a. Retentive on delay -(RTO)-

    b. Retentive off delay -(RTF)-

    c. Reset -(RST)-

    Counter:

    a. Counter up -(CTU)-

    b. Counter down -(CTD)-

    c. Counter reset -(CTR)-

    RTO

    RTF

    PR value in 0.1 second

    stopcountingstop

    Input

    TrueFalseTrue

    RTO reach PR value, output ON

    RTF reach PR value , output OFF

    counting

    resumestopcounting

  • 8/14/2019 Osp07 Programmable Logic Controller

    18/23

    TI-3222: Otomasi Sistem Produksi - 7 35

    Departemen Teknik I ndustri FTI-ITB

    SEQUENCER

    Sequencers are used with machines or processes involvingrepeating operating cycles which can be segmented intosteps.

    Output

    Dwell timeCBAStep

    9 secOFFONOFF4

    3 secONOFFOFF3

    10 secOFFONON2

    5 secOFFOFFON1

    TI-3222: Otomasi Sistem Produksi - 7 36

    Departemen Teknik I ndustri FTI-ITB

    A-B PLC

    I/O points are numbered, they correspond to the I/O slot onthe PLC.

    For A-B controller used in our lab

    I/O uses 1-32

    Internal relays use 033 - 098

    Internal timers/counters/sequencers use 901-932

    Status 951-982

  • 8/14/2019 Osp07 Programmable Logic Controller

    19/23

    TI-3222: Otomasi Sistem Produksi - 7 37

    Departemen Teknik I ndustri FTI-ITB

    Programming a PLC

    TI-3222: Otomasi Sistem Produksi - 7 38

    Departemen Teknik I ndustri FTI-ITB

    Ladder Logic for Tank

  • 8/14/2019 Osp07 Programmable Logic Controller

    20/23

    TI-3222: Otomasi Sistem Produksi - 7 39

    Departemen Teknik I ndustri FTI-ITB

    Logic for Ladder Solution

    TI-3222: Otomasi Sistem Produksi - 7 40

    Departemen Teknik I ndustri FTI-ITB

    How does it work?

  • 8/14/2019 Osp07 Programmable Logic Controller

    21/23

    TI-3222: Otomasi Sistem Produksi - 7 41

    Departemen Teknik I ndustri FTI-ITB

    PROGRAMMING EXAMPLE 1

    machine busy1input from machineC3

    stopper up1output to stopperR4

    robot busy1input from robotC2

    unloading cycle1output robotR3

    scan the part1output to bar code readerR1

    loading cycle1output robotR2

    task complete1input from machineC4

    right part1input from bar code readerC1

    part arrive1micro switchMSI

    ExplanationStateDescriptionid

    Part

    microswitch

    Bar code reader

    Stopper

    Conveyor

    MachineRobot

    TI-3222: Otomasi Sistem Produksi - 7 42

    Departemen Teknik I ndustri FTI-ITB

    SOLUTION01

    02

    03

    04

    05

    11

    12

    13

    14

    15

    InputOutput

    ProgrammableControllerPLC

    MS1

    C1

    C2

    C3

    C4

    R1

    R2

    R3

    R4

    01 1411

    02

    14 04 03

    14

    12

    1305 03

    Rung 1. If partarrives and no part isstopped, trigger thebar code reader.

    Rung 2. If it is aright part, activate thestopper.

    Rung 3. If thestopper is up, themachine is not busyand the robot is notbusy, load the part

    onto the machine.

    Rung 4. If the task iscompleted and therobot is not busy,unload the machine.

  • 8/14/2019 Osp07 Programmable Logic Controller

    22/23

    TI-3222: Otomasi Sistem Produksi - 7 43

    Departemen Teknik I ndustri FTI-ITB

    EXAMPLE 2 TRAFFIC LIGHTS

    Main street

    Jefferson

    street

    Cycle time

    215Jefferson

    413Main

    GreenYellowRedStreet

    TI-3222: Otomasi Sistem Produksi - 7 44

    Departemen Teknik I ndustri FTI-ITB

    WIRING DIAGRAM

    64

    65

    66

    67

    70

    71

    ProgrammableController

    input output

    Jefferson Red

    Jefferson Yellow

    Jefferson Green

    Main Green

    Main Yellow

    Main Red

  • 8/14/2019 Osp07 Programmable Logic Controller

    23/23

    TI-3222: Otomasi Sistem Produksi - 7 45

    Departemen Teknik I ndustri FTI-ITB

    PROGRAM (1)

    RUNG1

    RUNG2

    RUNG3

    RUNG4

    RUNG5

    RUNG6

    RUNG7

    RUNG8

    RUNG9

    RUNG10

    RUNG11

    RUNG12

    20

    67

    RTO

    90366

    RTO

    901

    80

    RTO

    902

    30

    901 90267 M. Red

    901 90366 J. Green

    902 90471 M. Green

    904 90570 M. Yellow

    RST

    RST901 904

    RTO

    904

    40

    71

    RST901 903

    RST901 902

    901 901

    TI-3222: Otomasi Sistem Produksi - 7 46

    Departemen Teknik I ndustri FTI-ITB

    PROGRAM (2)

    RUNG13

    64 RTO

    907

    50

    65RTO

    906

    10

    70RTO

    905

    10

    903 90665 J. Yellow

    90264

    907J. Red

    RST901 907

    RST901 906

    RST901 905

    RUNG14

    RUNG15

    RUNG16

    RUNG17

    RUNG18

    RUNG19

    RUNG 20