programmable logic controller (plc)...a programmable logic controller (plc for short) is simply a...

83
Mechatronics UNIT –IV Programmable Logic Controller (PLC)

Upload: others

Post on 24-Jan-2021

16 views

Category:

Documents


2 download

TRANSCRIPT

  • Mechatronics

    UNIT –IV

    Programmable Logic Controller

    (PLC)

  • SyllabusPLC Programming

    • Introduction, Architecture

    • Ladder Logic programming for different types of logic gates,

    • Latching,

    • Timers, Counter,

    • Practical Examples of Ladder Programming,

    • Introduction to SCADA system

  • Objectives

    1. Understand key elements of Mechatronics system,representation into block diagram

    2. Understand concept of transfer function, reduction andanalysis

    3. Understand principles of sensors, its characteristics,interfacing with DAQ microcontroller

    4. Understand the concept of PLC system and its ladderprogramming, and significance of PLC systems inindustrial application

    5. Understand the system modeling and analysis in time domainand frequency domain.

    6. Understand control actions such as Proportional, derivativeand integral and study its significance in industrialapplications.

  • Outcomes

    1. Identification of key elements of mechatronics system and itsrepresentation in terms of block diagram

    2. Understanding the concept of signal processing and use ofinterfacing systems such as ADC, DAC, digital I/O

    3. Interfacing of Sensors, Actuators using appropriate DAQmicro-controller

    4. Time and Frequency domain analysis of system model (forcontrol application)

    5. PID control implementation on real time systems

    6. Development of PLC ladder programming andimplementation of real life system

  • Before the PLC-

    ✔The development of the PLC can be compared

    analogously to the development of the Personal

    Computer.

    ❑How were machines and industrial processes

    controlled before the advent of the PLC?

    One of the means for controlling machines was through the use of

    1. Power Relays

    1. Control Relays

  • What are the disadvantages of Relay based control

    systems?

    1. Hard wired panels / relay logic are very time consuming to

    implement due to wiring and debugging related issues.

    2. Complexity

    3. Costly

    4. Hardwiring

    5. Troubleshooting problems

    6. Strict Maintenance routine

    7. Not easy to modify , etc

    8. High power consumption

    9. Noisy during switching operation

  • Control devices:

    ✔ Rotary drum switch

    ✔ Limit switch

    ✔ Electromechanical Counter

    ✔ Fuses

    ✔ Control Transformers

    ✔ Motor Starter

    ✔ Solenoid Valves

    ✔ Pneumatic plunger timers etc

  • Why PLC?

    In need of another controller which:

    ✔ Is faster and operates in real time

    ✔ Withstands vibrations, temperatures, humidity, noise

    ✔ Has inbuilt interfacing for inputs and outputs

    ✔ Is flexible and adaptable (easy to program/re-

    program)

    ✔ Easy to troubleshoot and maintain

    ✔ Consumes less space, requires less wiring,

    comparatively cheaper

  • Hardwired control systems

    • The functions are determined

    by the physical wiring.

    • Changing the function means

    changing the wiring.

    • Can be contact-making type

    (relays, contactors) or

    electronic type (logic circuits)

    PLC Systems

    • The functions are

    determined by a program

    stored in the memory.

    • The control functions can

    be changed simply by

    changing the program.

    • Consist of a control device,

    to which all the sensors

    and actuators are

    connected.

  • What is a PLC ?✔A Programmable Logic Controller (PLC for short) is simply a special

    computer device used for automation of electro-mechanical processesin modern factory automation.

    ✔A PLC is a miniature industrial grade computer that contains hardwareand software – capable of being programmed to perform controlfunctions

    ✔Where ever there is a need to control devices, the PLC provides a flexibleway to "software" and components together.

    Evolution of PLC

    1. Manual Control

    2. Hardwire logic (relays, contactors, timers)

    3. LOGIC GATES

    4. PLC

  • Advantages of the PLC-

    1. They are re-programmable

    2. Complex logics can be easily represented

    3. Multiple devices can be embedded in one unit

    4. Can easily be scaled up or modified.

    5. Smaller physical size than hard-wire solutions.

    6. PLCs have integrated diagnostics and override functions.

    7. Applications can be immediately documented, duplicated faster and less

    expensively

    8. Connection between switches/output can be modified through software

    easily.

    9. Troubleshooting is Easier and Faster.

    10.Ease of Maintenance –less downtime.

    11.Easy to develop Programs by offline simulation

    12.Less amount of Space Needed

  • Disadvantages of the PLC.

    1. Most PLCs manufacturers offer only closed architectures for

    their products .

    2. PLC devices are proprietary, which means that parts and from

    one manufacturer can’t easily be used in combination with parts

    of another manufacturer, which limits the design and cost

    options.

    3. Subject to the limitations imposed by semiconductor based

    systems.

    4. Setup and training costs could be high

    Advantages of the PLC-…..cont….

    13. Can withstand severe environmental conditions.

    14. Cost effective for controlling complex systems.

    15. Computational abilities make possible more sophisticated controls.

  • PLCs are used in all industries.

    1. Manufacturing

    2. Process Plants & Systems

    3. Machining

    4. Packaging

    5. Automated Plants Etc

  • Application of PLC-

    To detect and sort P and Q geometrically different components

  • Examples of Automated Plants

  • Examples of Automated Plants

  • Examples of Automated Plants

  • Basics of a PLCA small computer with a built-in operating system which monitor inputs

    and other variable values, make decisions based on a stored program, and

    control outputs to automate a process or machine.

    Basic parts of a PLC

    1.Power Supply

    2.Processor Module

    ✔ CPU

    ✔ Memory

    3.Communication

    Interface.

    4.I/O Modules

    ✔ Discrete/Digital Inputs

    ✔ Analog Inputs

    5.Output Modules

  • Parts of a PLC.

  • Power SupplyA power supply is used to provide power to the PLC and any other

    modules. Power supplies come in various forms:

    ✔ Power supply modules that fit into one of the slots in a chassis

    ✔ External power supplies that mount to the outside of a chassis

    ✔ Stand alone power supplies that connect to the PLC or I/O

    through a power cable

    ✔ Embedded power supplies that come as part of the PLC block.

  • I/O Devices❖ Input Devices provide inputs to the control system.

    ❖ In case of discrete-state process control, the inputs are twostate specifications such as:

    ✔ Limit switches – open or closed,

    ✔ Comparators – high or low,

    ✔ Push buttons – depressed or not depressed

    ❖Functions-

    1. Convert AC to DC

    2. Indicating status of i/p condition

    3. Providing electrical isolation

    4. To eliminate noise

    5. Providing compatible signal level for CPU

  • Input Module

    ✔ Figure shows the typical wiring to

    a PLC input module.

    ✔ The input module examines the

    state of the physical switches and

    other input devices and puts their

    state into a form suitable for

    the processor.

    ✔ It is able to accommodate a number of inputs called channels.

    ✔ If the switch is closed, the input will be 24 V DC, and if open, 0 V DC.

    The input module converts this into the 1 or 0 state needed by the

    processor.

  • Output Module

    ✔Figure shows the typical wiring to the PLCoutput module.

    ✔The Output Module supplies AC power tothe external devices such as motors,lights, solenoids, etc.

    ✔ Internally, the output module accepts a 0or 1 from the processor, and uses it toturn ON or OFF a device.

    ✔An output module can have one or severalchannels per unit. Each channel isusually provided with an indicator light toshow whether the particular channel isbeing driven ON/OFF.

  • Processor

    ✔The processor is a computer that executes a program to

    perform the operations specified in a ladder diagram.

    ✔It performs arithmetic and logic operations on input

    variable data and determines the proper state of the output

    variables.

  • CPU & Memory

    ✔ CPU: The brain of PLC is the central processing unit (CPU).

    ✔ It executes the various logic and sequencing functions by operating on

    the PLC inputs (sensor information) to determine the appropriate output

    signals for the actuator.

    ✔ The processor is microprocessor very similar in its construction to those

    used in personal computers and other data-processing equipment.

    ✔ Memory: Tied to the CPU is the PLC memory, which contains the

    program of logic, sequencing, and other input/output operations.

    ✔ The memory for a programmable logic controller is specified in the same

    way as for a computer, and may range from 1k to over 48 k(bytes) of

    storage capacity.

    ✔ Memory types are ROM, RAM, EPROM

  • Programmable Device

    ✔ The PLC is programmed by means of a programming device.

    ✔ The programming device is usually detachable from the PLC

    cabinet so that it can be shared between different controllers.

    ✔ Different PLC manufactures provide different devices:

    • Simple teach pendant-type devices, similar to those used in

    robotics

    • PLC programming keyboards and CRT displays.

  • Communication Channel

    ✔ The buses are the paths used for communication within the PLC.

    ✔ The information is transmitted in binary form, i.e. as a group of

    bits with a bit being a binary digit of 1 or 0, i.e. on/off states.

    ✔ The term word is used for the group of bits constituting some

    information. Thus an 8-bit word might be the binary number

    00100110.

    ✔ Each of the bits is communicated simultaneously along its own

    parallel wire.

  • Communication Channel

    The CPU uses the:

    ✔ the data bus for sending data between the constituent elements,

  • Communication Channel

    ✔ the address bus to send the addresses of locations for

    accessing stored data

  • Communication Channel

    ✔ the control bus for signals relating to internal control actions

  • Communication Channel

    ✔ the system bus is used for communications between the

    input/output ports and the input/output unit.

  • Requirement of PLC Operation

    ✔PC ( Personal Computer )

    ✔PLC’s software ( Simatic Manager) to write the

    programme in a programming language (LAD).

    ✔A physical PLC Unit (With a demo kit) to test the

    output of the programme written on above language.

    ✔Or a Simulator software to test the output of the

    programme without the presence of a physical PLC

    Unit.

  • Types of PLCs

    1. Single Box Type: (or, as sometimes termed, brick) is commonly

    used for small programmable controllers and is supplied as

    an integral compact package complete with power supply,

    processor, memory, and input/output units. Typically such a

    PLC might have 6, 8, 12 or 24 inputs and 4, 8 or 16 outputs

    and a memory which can store some 300 to 1000 instructions.

    2. Modular: The modular or the Rack type consists of separate

    modules for power supply, processor, input module, output

    module, memory.

  • Types of PLCs

    Brick Type PLC

    Rack Type PLC

  • AMERICAN:

    ✔ Allen Bradley

    ✔ Gould Modicon

    ✔ Texas Instruments

    ✔ General Electric

    ✔ Westinghouse

    ✔ Cutter Hammer

    ✔ Square D

    EUROPEAN:

    ✔ Siemens

    ✔ Klockner & Mouller

    ✔ Festo

    ✔ Telemechanique

    JAPANESE:

    ✔ Toshiba

    ✔ Omron

    ✔ Fanuc

    ✔ Mitsubishi

    Leading Brands of PLC

  • A Physical Circuit for Making a Lamp ON by a Switch.

    HOT line NEUTRAL line

  • Logic

    Symbols

  • Physical or Relay Ladder Example

  • Basic logic Functions

    1. AND logic

    2. OR logic

    3. NOT logic

    4. NAND logic

    5. NOR logic

    6. EX-OR logic

  • Latching

  • Combined AND and OR function

  • Motor Ladder Logic

  • Implement a latch to turn ON and OFF a motor using 2 NO push-button switches.

    about:blank

  • (NC)

    about:blank

  • Water Level Control:

    i. It’s a single point level control.

    ii. When the Level is above set point the output pump should be OFF

    iii. When the Level is below set point the output pump should be ON

  • The number of inputs are Pump ‘ON’, Pump ‘OFF’ and Level Switch; I/P=3

    The number of outputs; O/P=1

    The conditions for inputs and outputs are:

    Here relay R1 acts as a Latch.

  • Temperature Control

    A temperature control system consists of four thermostats. The system

    operates three heating units. The thermostats are set at 55°C, 60°C, 65°C

    and 70°C.

    i. Below 55°C three heater are to be in ON state

    ii. Between 55°C - 60°C two heaters are to be in ON state.

    iii. Between 60°C - 65°C one heater is to be in ON state.

    iv. Above 70°C all heaters are to be in OFF state, there is a safety shutoff in

    case any heater is operating by mistake.

    v. A master switch turns the system ON and OFF.

    Example 2

    Solution✔There are four thermostats; assume them be in NC state when the set

    point is not reached.

    ✔Let there be a control relay (CR1) to work as a safety shutoff.

    ✔The Start switch is NO and Stop switch NC type.

  • Solution-

    Teperature Thermostats Heater 1 Heater 2 Heater3

    Below 55°C TS1TS2TS3TS4

    ClosedClosedClosedClosed

    ON ON ON

    55°C-60°C TS1TS2TS3TS4

    OpenClosedClosedClosed

    OFF ON ON

    60°C-65°C TS1TS2TS3TS4

    OpenOpen

    ClosedClosed

    OFF OFF ON

    65°C-70°C TS1TS2TS3TS4

    OpenOpenOpen

    Closed

    OFF OFF ON

    Above 70°C TS1TS2TS3TS4

    OpenOpenOpenOpen

    OFF OFF OFF

  • Ladder Diagram 2

  • PLC Operation

    The operation of the PLC can be considered in two modes:

    1. The I/O scan mode

    2. The Execution mode

  • I/O Scan Mode

    • During the i/o scan mode, the processor updates all the outputs and

    inputs the state of all inputs one channel at a time. The time required for

    this depends on the speed of the processor.

  • Execution Mode

    • During this mode, the processor evaluates each rung of the ladder diagramsequentially, starting from the first rung and proceeding to the last rung.

    • As a rung is evaluated, the last known state of each switch and relaycontact in the rung is considered, and if any TRUE path to the outputdevice is detected, then that output is indicated to be energized – that is, setto ON.

    • At the end of the ladder diagram, the I/O mode is entered again, and alloutputs devices are provided with ON/OFF state determined fromexecution of the ladder program. All inputs are sampled, and the executionmode starts again.

  • PLC Addressing

    • To identify the I/O devices, the

    PLC uses the device address or

    channel.

    • It address designation depends on

    the type of programmable

    controller.

    • Table shows a typical address

    designation for different I/O

    devices.

  • Programmed Diagram Interpretation

    • In a programmed diagram, the ON / OFF state of the output of the rung

    is determined by testing the elements of the rung for a TRUE / FALSE

    condition.

    • If a complete TRUE element path to the output exists in the rung, then

    the output will be made TRUE / ON.

  • Programmed Diagram Interpretation

    • The symbol for a NO contact indicates that the device should be interpreted

    as FALSE if the contact is tested and found to be open, and TRUE if it is

    found to be closed. It is to be “Examined ON”, and if ON, it is TRUE.

    • The symbol for a NC contact indicates that if it is tested and found to be

    closed, then it is FALSE, and if tested and found open, it is ON. It is to be

    “Examined OFF”, and if OFF, it is TRUE.

  • Use a NC push-button switch to turn ON a red light

    about:blank

  • Programming of PLCs

    • Ladder Logic: Used for machine control

    • Function Block Diagram: Used for process control

    • Called "ladder" diagrams because they resemble a ladder, with two vertical rails

    (supply power) and as many "rungs" (horizontal lines) as there are control

    circuits to represent.

  • Ladder Diagram: Scanning

  • Ladder Diagram: Rung

  • • In a certain bank, each of thethree bank officers has aunique key to the vault. Thebank rules require that 2 of the3 officers be present when thevault is opened. Develop aPLC ladder program that willunlatch the door and turn ON alight when 2 of the 3 keys areinserted.

    http://plc/Bank Vault.avi

  • • A small house has 3 windowsand 2 doors. Each window anddoor has a switch attachedsuch that the contacts closewhen a door or window opens.Develop a PLC ladder that willturn ON a light if one or morewindows are open, or if bothdoors are open.

    http://plc/House.avi

  • PLC Timer Function

    • The Programmed timer function plays an important role in PLC applications to providefor needed delays in some manufacturing sequence and to specify the period of timethat some operation is to last.

    • While activated by a true path, the timer begins to accumulate time in form of “ticks”.

    • Each “tick” is worth a certain amount of time.

    • The timer is preloaded with a certain number of these ticks.

    • When the accumulated time ticks equals the preload value, the timer itself becomesTRUE.

    • The timer only counts while it has a TRUE input. If the input becomes FALSE and thenTRUE again, the timer will reset to ZERO and start to count again.

  • PLC Timer Function

  • PLC Counter Function

    • A counter is a programmed function that counts (increments) every time the

    input changes from FALSE to TRUE.

    • If in one scan, the input is False, and in the next scan, the input is True, the

    counter increments. No further counts will occur until the input goes False

    again and then True.

    • The counter has an address and a preset number of counts. When the preset

    number of counts have been accumulated, the counter becomes TRUE and

    can activate some other part of the ladder program.

  • PLC Counter Function

  • Design and write ladder logic for a simpletraffic light controller for followingsequence of operation as below,Step 1 : Turn Green on for 35 secondsStep 2 : Turn Yellow 1 on for 5 seconds.Step 3 : Red 2 on for 40 seconds.Step 4 : Sequence repeats thereafter.

    about:blank

  • Selection Criterion for PLC

    • Application Requirement

    • Input / Output Requirement

    • Memory Requirement

    • CPU Requirement

    • Software Requirement & Operator Interface

    • Communication Requirement

    • Environmental Requirements

  • SCADA

    ✔SCADA (supervisory control and data acquisition) is a type of industrial controlsystem that monitors and controls industrial processes that exist in the physicalworld.

    ✔Industrial processes include those of manufacturing, production, powergeneration, fabrication, and refining, and may run in continuous, batch, repetitiveor discrete modes.

    ✔information from sensors or manual inputs are sent to PLCs then send that info to SCADA software.

    ✔SCADA analyses and displays the data in order to help the operators and other workers to reduce waste and improve efficiency in the manufacturing process

    ✔HMI – Human Machine Interface is an interface between user and machine

    ✔HMI provides visual representation of control system and real time data acquisition.

  • • RTU: Remote Terminal Unit

    • MTU: Master Terminal Unit

    • DAS: Data Acquisition System

    • HMI: Human Machine Interface

    Components of a SCADA system