logic control with plc

Embed Size (px)

Citation preview

  • 8/10/2019 logic control with plc

    1/37

    FAKULTAS TEKNOLOGI INDUSTRI

    ITSSURABAYA

    201423/05/2014 1Instrument 2

  • 8/10/2019 logic control with plc

    2/37

    MATERI :

    Konsep dasar Programmable Logic Control

    Sequential Process

    Safety Instrument System (SIS)

    SCADA

    23/05/2014 2Instrument 2

  • 8/10/2019 logic control with plc

    3/37

    Konsep dasar PLC

    Invented in 1968

    as a substitute for hardwired relay panels.

    "A digitally operating electronic apparatus which uses a programmable

    memory for the internal storage of instructions by implementing specific

    functions such as logic sequencing, timing, counting, and arithmetic to

    control, through digital or analog input/output modules, various types ofmachines or processes. The digital computer which is used to perform the

    functions of a programmable controller is considered to be within this

    scope. Excluded are drum and other similar mechanical sequencing

    controllers."

    National Electrical Manufacturing Association (NEMA)23/05/2014 3Instrument 2

  • 8/10/2019 logic control with plc

    4/37

    CPU

    System

    User LadderDiagram

    Workingmemoryregisters

    Input

    Flag

    Output

    InputModule

    OutputModule

    Komponen PLC

    23/05/2014 4Instrument 2

  • 8/10/2019 logic control with plc

    5/37

    The main module measures

    19 x 20 x 14.5.

    have up to 10,000 I/O points

    supports all functions

    expansion slots toaccommodate PC and other

    communication devices.

    A large size PLC

    Allan-Bradley PLC-3

    A small size PLC

    Measures 4.72x 3.15 x 1.57.

    32 I/O points

    Standard RS 232 serialcommunication port

    Allan-Bradley Micrologic-100023/05/2014 5Instrument 2

  • 8/10/2019 logic control with plc

    6/37

    DPSTSPDT

    N o n -lo c k in g Lo c k in g

    No r m a lly O p e n No r m a lly C lo

    s e d

    Mu ltip le Th r o w

    P 1

    P 2

    Mu ltip le P o l

    e

    Br e a k - b e fo r e - m a k

    e Ma ke -b e fo re -b r

    e a k

    SWITCHES

    23/05/2014 6Instrument 2

  • 8/10/2019 logic control with plc

    7/37

    Throw - number of states

    Pole - number of connecting moving parts (number of individual

    circuits).

    SPDT

    DPST

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

    Input

    Output

    A B

    Knob

    How is this switch classified?

    TERMS

    23/05/2014 7Instrument 2

  • 8/10/2019 logic control with plc

    8/37

    Selector switches

    Pushbutton switches

    Photoelectricswitches

    Limit Switches

    Proximity switches

    Level switches Thumbwheel

    switches

    Slide switches

    RATING:

    24 Volts AC/DC48 Volts AC/DC120 Volts AC/DC

    230 Volts AC/DCTTL level(Transistor-to-transistor5V)

    Isolated Input

    TYPES OF SWITCHES

    23/05/2014 8Instrument 2

  • 8/10/2019 logic control with plc

    9/37

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

    contact

    coil

    input

    Relay coil

    R1

    R1Output contact

    RELAYS

    23/05/2014 9Instrument 2

  • 8/10/2019 logic control with plc

    10/37

    Digital counters output in the form of a relay contact when a preassigned count value is

    reached.

    Register

    Accumulator

    contact

    input

    reset

    outpu

    Input

    Reset

    Output

    Count 0 1 2 3 4 5 0 1

    5

    COUNTER

    23/05/2014 10Instrument 2

  • 8/10/2019 logic control with plc

    11/37

    A 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

    outpu

    Register

    Contact

    Time 5 seconds.

    Clock

    Reset

    Output

    Count 1 2 3 40 5

    TIMER

    23/05/2014 11Instrument 2

  • 8/10/2019 logic control with plc

    12/37

    L1

    LS1 PB1 LS2 R1

    R1

    R1TIMER

    R2

    PR=5

    For a process control, it is desired to have the process start (by turning on a motor)five seconds after a part touched a limit switch. The process is terminatedautomatically when the finished part touches a second limit switch. An emergencyswitch will stop the process any time when it is pushed.

    LS1

    PB1LS2

    R1

    TIMER

    5Motor

    R2

    AN EXAMPLE OF RELAY LOGIC

    23/05/2014 12Instrument 2

  • 8/10/2019 logic control with plc

    13/37

    Programmable controllers replace most of the relay panel wiring by software programming.

    Processor I/O

    Modules

    MemoryPower

    Supply

    Program

    Loader

    Printer

    CassetteLoader

    EPROM

    Loader

    Switches

    Machines

    Peripherals Exter nal Device

    PC

    A typical PLC

    PLC ARCHITECTURE

    23/05/2014 13Instrument 2

  • 8/10/2019 logic control with plc

    14/37

    1. Processor Microprocessor based, may allow arithmetic

    operations, 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 (Electric Erasable Programmable ROM),

    EPROM (Erasable Programmable Read Only Memory),

    EAPROM (Electronically Alterable Programmable

    Read Only Memory), and

    Bubble Memory.

    PLC COMPONENTS

    23/05/2014 14Instrument 2

  • 8/10/2019 logic control with plc

    15/37

    3. 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 (HHP)

    CRT programmer

    operator console

    printer

    simulator

    EPROM loader

    graphics processor

    network communication interface

    modular PC

    PLC COMPONENTS

    23/05/2014 15Instrument 2

  • 8/10/2019 logic control with plc

    16/37

    AC Voltage I/O DC Voltage I/O

    numerical input and output

    special-purpose modules, for example,high-speed timers, and stepping motorcontrollers

    Discrete I/O

    23/05/2014 16Instrument 2

  • 8/10/2019 logic control with plc

    17/37

    Analog inputs: Flow sensors Humidity sensors Potentiometers Pressure sensors

    Temperature sensors

    Analog outputs: Analog meters Analog valves and actuators DC and AC motor drives

    Analog I/O

    23/05/2014 17Instrument 2

  • 8/10/2019 logic control with plc

    18/37

    Thermocouple input

    Low level analog signal, filtered, amplified, and digitizedbefore sending to the processor through I/O bus. Fast input

    50 to 100 microsecond pulse signal detection. ASCII I/O

    Communicates with ASCII devices. Stepper motor output

    Provide directly control of a stepper motor. Servo interface

    Control DC servo motor for point-to-point control and

    axis positioning. PID control

    The Proportional Integral Derivative is used for closedloop process control.

    Network module

    Some special I/O

    23/05/2014 18Instrument 2

  • 8/10/2019 logic control with plc

    19/37

    n Allen-Bradley hand-held programmer for MicroLogix 1000

    A Hand Held Programmer

    23/05/2014 19Instrument 2

  • 8/10/2019 logic control with plc

    20/37

    A ladder diagram (also called contact symbology) is a means of graphically

    representing the logic required in a relay logic system.

    A

    R1

    PB1 PB2

    R1

    R1

    start emergency stop

    Rail

    Rung

    Ladder diagram

    23/05/2014 20Instrument 2

  • 8/10/2019 logic control with plc

    21/37

    Externalswitches

    Stored program

    01 02 20

    20

    2011

    01

    02

    03

    11

    12

    C

    PLCInput OutputA

    B

    PLC WIRING DIAGRAM

    23/05/2014 21Instrument 2

  • 8/10/2019 logic control with plc

    22/37

    AC DC TTL

    Input Connections

    23/05/2014 22Instrument 2

  • 8/10/2019 logic control with plc

    23/37

    AC DC TTL

    Output Connections

    23/05/2014 23Instrument 2

  • 8/10/2019 logic control with plc

    24/37

    A PLC resolves the logic of a ladder diagram (program) rung by rung, from the top to

    the bottom. Usually, all the outputs are updated based on the status of the internalregisters. Then the input states are checked and the corresponding input registers are

    updated. Only after the I/Os have been resolved, is the program then executed. This

    process is run in a endless cycle. The time it takes to finish one cycle is called the

    scan time. In some controllers the idle state is eliminated. In this case, the scan time

    varies depends on the program length.

    begin

    Input

    Output

    Resolvelogic

    Idle

    Scan cycle

    SCAN

    23/05/2014 24Instrument 2

  • 8/10/2019 logic control with plc

    25/37

    Ladder Diagram - most common

    Structure Text Programming (ST)

    Functional Block Programming (FB)

    Instruction List (IL)

    Sequential Function Chart (SFC)

    PLC Programming

    23/05/2014 25Instrument 2

  • 8/10/2019 logic control with plc

    26/37

    1) Relay,

    2) Timer and counter,

    3) Program control,

    4) Arithmetic,

    5) Data manipulation,

    6) Data transfer, and

    7) Others, such as sequencers.

    PLC Ladder Diagram INSTRUCTIONS

    23/05/2014 26Instrument 2

  • 8/10/2019 logic control with plc

    27/37

    ON : TRUE, contact closure, energize, etc.

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

    (In the notes we use the symbol "~" to represent negation. 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.

    LOGIC STATES

    23/05/2014 27Instrument 2

  • 8/10/2019 logic control with plc

    28/37

    PB1 R1PB2

    R2

    R1 = PB1.AND.PB2

    R2 = PB2.AND.~PB4

    PB3 PB4

    PB1 R1

    PB2

    R1 = PB1 .OR. PB2

    AND

    OR

    AND and OR LOGIC

    23/05/2014 28Instrument 2

  • 8/10/2019 logic control with plc

    29/37

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

    PB1 R1

    PB2 pb3

    COMBINED AND & OR

    23/05/2014 29Instrument 2

  • 8/10/2019 logic control with plc

    30/37

  • 8/10/2019 logic control with plc

    31/37

    Coil:

    e. Retentive memory Coil -(M)-

    f. Set retentive memory Coil -(SM)-

    g. Reset retentive memory Coil -(RM)-

    h. Positive Transition-sensing Coil -(P)-

    h. Negative Transition-sensing Coil -(N)-

    (set coil latches the state, reset coil deenergize the set coil. retentive

    coil retain the state after power failure.)

    Relay (continue)

    23/05/2014 31Instrument 2

  • 8/10/2019 logic control with plc

    32/37

    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 counting stop countingresume

    RTF stop counting stop

    True False True

    Input

    RTO reach PR value, output ONRTF reach PR value, output OFF

    PR value in 0.1 second

    TIMERS AND COUNTERS

    23/05/2014 32Instrument 2

  • 8/10/2019 logic control with plc

    33/37

    Sequencers are used with machines or processes involving repeating

    operating cycles which can be segmented into steps.

    Output

    Step A B C Dwell time

    1 ON OFF OFF 5 sec.

    2 ON ON OFF 10 sec.

    3 OFF OFF ON 3 sec.

    4 OFF ON OFF 9 sec.

    SEQUENCER

    23/05/2014 33Instrument 2

  • 8/10/2019 logic control with plc

    34/37

    I/O points are numbered, they correspond to the I/O slot on the 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

    A-B PLC

    23/05/2014 34Instrument 2

  • 8/10/2019 logic control with plc

    35/37

    Part

    microswitch

    Bar code reader

    Stopper

    Conveyor

    MachineRobot

    id description state explanation

    MSI microswitch 1 part arrive

    R1 output to bar code reader 1 scan the part

    C1 input from bar code reader 1 right part

    R2 output robot 1 loading cycle

    R3 output robot 1 unloading cycle

    C2 input from robot 1 robot busy

    R4 output to stopper 1 stopper up

    C3 input from machine 1 machine busy

    C4 input from machine 1 task complete

    PROGRAMMING EXAMPLE 1

    23/05/2014 35Instrument 2

  • 8/10/2019 logic control with plc

    36/37

    0102

    03

    04

    05

    1112

    13

    14

    15

    InputOutput

    ProgrammableControllerPLC

    MS1

    C1

    C2

    C3

    C4

    R1R2

    R3

    R4

    01 14 11

    02

    14 04 03

    14

    12

    1305 03

    Rung 1. If part arrives and no part

    is stopped, trigger the bar codereader.

    Rung 2. If it is a right part, activatethe stopper.

    Rung 3. If the stopper is up, themachine is not busy and therobot is not busy, load the partonto the machine.

    Rung 4. If the task is completed andthe robot is not busy, unload themachine.

    SOLUTION

    23/05/2014 36Instrument 2

  • 8/10/2019 logic control with plc

    37/37

    23/05/2014 37Instrument 2