1 of 30

����������UNIT 4 �PROGRAMMABLE LOGIC CONTROLLER

Programmable Logic Controller (PLC): Introduction - Architecture of PLC – I/O Modules – Distributed I/O Modules – Programming of PLC - Conversion of Relay Logic to Ladder Logic Programming - Math Instructions - Logical Instructions - Timer and Counter – Selection of PLC – Maintenance and Trouble Shooting of PLC.

2 of 30

Programmable Logic Controller

  • Programmable logic controller (PLC) is a solid state device designed to perform a logic functions previously accomplished by electro-mechanical relays

3 of 30

4 of 30

PLC Architecture

It consist essentially of:

  • Central processing unit: control all processes with frequency 1-8 M Hz
  • Memory: Buffers as temporary storage, ROM for system data &
  • RAM for user program Input/output interface: System buses

5 of 30

I/O Module

Fixed I/O

  • (Figure 1-9) is typical of small PLCs that come in one package with no separate, removable units.
  • The processor and I/O are packaged together, and the I/O terminals will have a fixed number of connections built in for inputs and outputs.
  • The main advantage of this type of packaging is
  • lower cost. The number of available I/O points varies and usually can be expanded by buying additional units of fixed I/O.
  • One disadvantage of fixed I/O is its lack of flexibility; you are limited in what you can get in the quantities and types dictated by the packaging

6 of 30

I/O Module

  • Modular I/O is divided by compartments into which separate modules can be plugged.
  • The basic modular controller consists of a rack, power supply, processor module (CPU), input/output (I/O modules), and an operator interface for programming and monitoring.
  • The modules plug into a rack. When a module is slid into the rack, it makes an electrical connection with a series of contacts called the backplane, located at the rear of the rack.
  • The PLC processor is also connected to the backplane and can communicate with all the modules in the rack.

7 of 30

8 of 30

Discrete I/O Modules

  • The most common type of I/O interface module is the discrete type. This type of interface connects field input devices of the ON/OFF nature such as selector switches, pushbuttons, and limit switches.
  • Likewise, output control is limited to devices such as lights, relays, solenoids, and motor starters that require simple ON/OFF switching.
  • The classification of discrete I/O covers bit oriented inputs and outputs.
  • In this type of input or output, each bit represents a complete information element in itself and provides the status of some external contact or advises of the presence or absence of power in a process circuit.

9 of 30

Analog I/O Modules

  • Analog devices represent physical quantities that can have an infinite number of values. Typical analog inputs and outputs vary from 0 to 20 mA, 4 to 20 mA, or 0 to 10 V.
  • The analog input interface module contains the circuitry necessary to accept an analog voltage or current signal from the level transmitter field device. This input is converted from an analog to a digital value for use by the processor.
  • The circuitry of the analog output module accepts the digital value from the processor and converts it back to an analog signal that drives the field tank level meter.
  • Analog input modules normally have multiple input channels that allow 4, 8, or 16 devices to be interface to the PLC. The two basic types of analog input modules are voltage sensing and current sensing.

10 of 30

PROCESSOR (CPU)

  • The processor (CPU) is the “brain” of the PLC.
  • A typical processor usually consists of a microprocessor for implementing the logic and controlling the communications among the modules.
  • The processor requires memory for storing user program instructions, numerical values, and I/O devices status

11 of 30

Memory Types

  • Memory can be placed into two general categories: volatile and nonvolatile.
  • Volatile memory will lose its stored information if all operating power is lost or removed. Volatile memory is easily altered and is quite suitable
  • Types
    • Read Only Memory (ROM)
      • stores programs, and data cannot be changed after the memory chip has been manufactured.
    • Random Access Memory (RAM),
      • is used as a temporary storage area of data that may need to be quickly changed
    • Erasable Programmable Read-Only Memory (EPROM)
      • EPROMs are designed so that data stored in them can be read, but not easily altered without special equipment.
    • Electrically erasable programmable read-only memory (EEPROM)
      • nonvolatile memory that offers the same programming flexibility as does RAM.
    • Flash EEPROMs
      • EEPROMs in that they can only be used for backup storage.

12 of 30

ADVANTAGES

  • Increased Reliability
  • More Flexibility
  • Lower Cost
  • Faster Response
  • Easier to troubleshoot
  • Remote control capability
  • Communication Capability

13 of 30

How to select PLC

  • Number of input and output
  • Processor, memory and bit rate
  • Relay or transistor type
  • Resolution
  • Based on brand

14 of 30

LADDER PROGRAMMING

  • The form of programming commonly use with PLC is ladder programming.
  • Each program task is specified as though a rung of a ladder.
  • Thus a rung could specify that the state of switches A and B be examined and if both A and B are closed then a solenoid, the output is energized.

15 of 30

Cont.,

  • 1- Scan the inputs associated with one rung of the ladder program
  • 2- solve the logic operation involving those inputs • Set/ reset the outputs for that rung
  • 3- move on to the next rung and repeat operations 1, 2, 3 ....and so on until the end of program with each rung of the ladder scanned in turn.
  • The PLC then goes back to the begining of the program and starts again
  • The ladder diagram consists of two vertical lines representing the power rails. Circuits (rung) are connected as horizontal lines,

16 of 30

LOGIC GATES

17 of 30

18 of 30

19 of 30

TIMERS

  • Timer is an instruction that waits a set amount of time before doing something (control time).
  • Timers count fractions of seconds or seconds using the internal CPU clock.
  • The time duration for which a timer has been set is termed the preset and is set in multiples of the time base used.
  • Types
    • On Delay timer
    • Off Delay Timer
    • Retentive Timer

20 of 30

COUNTERS

  • A counter is set to some preset value and, when this value of input pulses has been received, it will operate its contacts.
  • The counter accumulated value ONLY changes at the off to on transition of the pulse input.
  • Types
    • Up Counter
    • Down Counter
    • Up-Down Counters

21 of 30

PLC Programming

22 of 30

23 of 30

 PLC Ladder Practice Problems

24 of 30

25 of 30

  • OFF Position—The water pump will stop if it is running and will not start if it is stopped.
  • Manual Mode—The pump will start if the water in the tank is at any level except low.
  • Automatic Mode—If the level of water in the tank reaches a high point, the water pump will start so that water can be removed from the tank, thus lowering the level.
  • When the water level reaches a low point, the pump will stop .
  • Status Indicating Lights—Water pump running light (green)
  • - Low water level status light (red)
  • - High water level status light (yellow)

26 of 30

27 of 30

28 of 30

29 of 30

  • The alarm is triggered by the closing of float switch FS.
  • The light will flash whenever the alarm condition is triggered and has not been acknowledged, even if the alarm condition clears in the meantime.
  • The alarm is acknowledged by closing selector switch SS.
  • The light will operate in the steady on mode when the alarm trigger

30 of 30

  • 158,164,167,174,176,178,186,187,190,192,193,204,206,211,259,260,262,