Basics of PLC

PLC Introduction

Simplification of engineering and precise control of manufacturing process can result in significant cost savings.  The most cost-effective way, which can pay big dividends in the long run, is flexible automation; a planned approach towards integrated control systems.  It requires a conscious effort on the part of plant managers to identify areas where automation can result in better deployment/utilization of human resources and savings in man-hours, down time.  Automation need not be high ended and too sophisticated; it is the phased, step-by-step effort to automate, employing control systems tailored to one’s specific requirements that achieves the most attractive results.  That is where Industrial electronics has been a breakthrough in the field of automation and control techniques.

DEFINATION OF PLC

A Programmable controller is a solid state user programmable control system with functions to control logic, sequencing, timing, arithmetic data manipulation and counting capabilities.  It can be viewed as an industrial computer that has a central processor unit, memory, input output interface and a programming device.  The central processing unit provides the intelligence of the controller.  It accepts data, status information from various sensing devices like limit switches, proximity switches, executes the user control program store in the memory and gives appropriate output commands to devices like solenoid valves, switches etc.



Input output interface is the communication link between field devices and the controllers; field devices are wired to the I/O interfaces.  Through these interfaces the processor can sense and measure physical quantities regarding a machine or process, such as, proximity, position, motion, level, temperature, pressure, etc.  Based on status sensed, the CPU issues command to output devices such as valves, motors, alarms, etc.

Programmer unit provides the man machine interface.  It is used to enter the application program, which often uses a simple user-friendly logic.

PLC Architecture

basic plc architecture

PLCs contain three basic sections:

  1. Central processing unit (CPU).
  2. Memory: EPROM, RAM, and so on.
  3. Input/output section for communication with peripherals (ADC, DAC).

A PLC is basically a black box with a number of inputs from, and a number of outputs to, the outside world.  It can make decisions, store data, do timing cycles, do simple arithmetic, convert codes, and so on.  The basic difference between this black box and a hardware logic system using IC chips or a relay controlled system, is that specific coded messages are stored in areas called program memory, which are PROM or ROM and RAM chips.  It is, however, much easier to change a program when a different process is required than to rewire the control system.  For example, it may take electricians a couple of weeks to require a pipe mill, whereas a programmer will spend only a fraction of this time to reprogram a PLC since no wires will have to be changed.  In addition, various recipes can be stored in memory and accessed when required, making the program extremely flexible.

The system operates through interaction with the processor and program memory.  When the power to the system is turned on, the processor reads the first instruction stored in memory and acts on this instruction.  When completed, it goes back to the memory for the next instruction, and so on until task is complete.  This operation is called the fetch-execute cycle.  The processor communicates with the outside world via input and output modules.

BENEFITS OF PROGRAMMABLE CONTROLLERS

  1. Programmable controllers are made of solid state components and hence provide high reliability.
  2. They are flexible and changes in sequence of operation can easily be incorporated due to programmability. They may be modular in nature and thus expandability and easy installation is possible.
  3. Use of PLC results in appreciable savings in Hardware and wiring cost.
  4. They are compact and occupy less space.
  5. Eliminate hardware items like Timers, counters and Auxiliary relays. The presence for timers and counters has easy accessibility.
  6. PLC can control a variety of devices and eliminates the need for customized controls.
  7. Easy diagnostic facilities are provided as a part of the system.  Diagnosis of the external systems also becomes very simple.  Thus easy service/maintenance.
  8. Programming devices provide operator friendly interface with the machine. Being an outcome of the latest art of electronics technology, Programmable controllers provide higher level of performance with computers is possible. Useful management data can be obtained and maintained.
  9. It has total protections against obsolescence and has wide scope for upgradation.

THE PARTS OF A PROGRAMMABLE CONTROLLER

Programmable logic controllers (PLC) can be considered to have three parts:

  1. Input/output Section

The I/O section contains input modules and output modules. Functionally, the input modules are equivalent to the signal converters (i.e. Analog to Digital or high power to low power). All modern PLC input modules use optical devices to accomplish electrically isolated coupling between the input circuit and the processor electronics.

Each input device is wired to a particular input terminal on the I/O section.  Thus if the switch is closed, 5v dc appears on input terminal, converts this dc voltage to a digital 1 and sends it to the processor via programmable peripheral interface (PPI).  Conversely, if the switch is open, no dc voltage appears on input terminal.  Input section will respond to this condition by sending a digital 0 to the processor.  The other input terminals behave identically.

 

 

 

 

 

 

2.      The Processor

The processor of a PLC holds and executes the user program.  In order to carry out this job, the processor must store the most up-to-date input and output conditions.

  • Input image table:

The input conditions are stored in the input image table, which is a portion of the processor’s memory.  That is, every single input module in the I/O section has assigned to it a particular location within the input image table.  That particular location is dedicated solely to the task of keeping track of the latest condition of its input terminal.  As mentioned in earlier section, if the input terminal has 5v dc power fed to it by its input device, the location within the input image table contains a binary 1(HI); if the input terminal has no 5v dc power fed to it, the location contains a binary 0(LO).

The processor needs to know the latest input conditions because the user program instructions are contingent upon those conditions.  In other words, an individual instruction may have one outcome if a particular input is HI and a different outcome if that input is LO.

(b)  Output image table:

The output conditions are stored in the output image table, which is another portion of the processor’s memory.  The output image table bears the same relation to the output interface of the I/O section that while terminals are analog inputs.  You can directly connect any analog input to the processor via these terminals.  Analog signal from these terminals is first converted to digital value via programmable peripheral interface (PPI).  The I/O section’s output modules are functionally the same as the output amplifiers.  They receive a low power digital signal from the processor and convert it into a high power signal capable of driving an industrial load.  A modern PLC output module is optically isolated, and uses a triac, power transistor or relay as the series connected load controlling device. Terminal 1 to 8 are these type of O/P terminals whereas terminal D/A is Analog output terminal from processor.  Each output device is wired to a particular output terminal on the I/O interface.  Thus, for example, if output module 1 receives a digital 1 by applying 5v dc to output terminal 1, thereby illuminating LED is extinguished.

Besides 5v dc (TTL devices), I/O module are also for interfacing to other industrial levels, including 12v dc.

The input image table bears to the input modules.  That is, every single output module has assigned to it a particular memory location is dedicated solely to the task of keeping track of the latest condition of its output module.

Of course, the output situation differs from the input situation with regard to the direction of information flow is from the output image table to the output modules, while in the input situation the information flow is from the input modules to the input image table.  The locations within the input and output image tables are identified by addresses, which refers to unique address of each terminal.

(c)        Central processing unit:

The subsection of the processor that actually performs the program execution will be called the central processing unit (CPU) with reference to input and output image table CPU executes the user program and continuously updates the output image table.

The output image table has a dual nature; its first function is to receive immediate information from the CPU and pass if on to the output modules of the I/O section; but secondly, it also must be capable of passing output information “backward” to the CPU, when the user program instruction that the CPU is working on calls for an item of output information.  The input image table does not have its dual nature.  Its single mission is to acquire information from the input modules and pass that information “forward” to the CPU when the instruction that the CPU is working on calls for an item of input information.

(d)  User program memory:

A particular portion of the processor’s memory is used for storing the user program instructions.  We will use the name user program memory to refer to this processor subsection.

Before a PLC can begin controlling an industrial system, a human user must enter the coded instructions that make up the user program.  This procedure called programming the PLC.

As the user enters instructions, they are automatically stored at sequential locations within the user program memory.  This sequential placement of program instructions is self-regulated by the PLC, with no discretion needed by the human user.

The total number of instructions in the user program can range from a half dozen or so, for controlling a simple machine, to several thousand, for controlling a complex machine or process.

After the programming procedure is complete, the human user manually switches the PLC out to PROGRAM mode into RUN mode, which causes the CPU to start executing the program from beginning to end repeatedly.

(e)  The complete scan cycle:

As long as the PLC is justify in the RUN mode, the processor executes the user program over and over again.  Figure depicts the entire repetitive series of events.  Beginning at the top of the circle representing the scan cycle, the first operation is the input scan.  During the input scan, the current status of every input module is stored in the input image table, bringing it up to date.

Following the input scan, the processor enters its user program execution.  Sometimes called “program scan”.  The program executes with reference to input and output image tables and updates output image table.

Throughout the user program execution, the processor continuously keeps its output image table up to date, as stated earlier.  However, the output modules themselves are not kept continuously up to date.  Instead, the entire output image table is transferred to the output module during the output scan following the program execution.

  • Data Memory:

A PLC is a computer, after all.  Therefore, it can perform arithmetic, numeric comparisons, counting, etc.  Naturally the numbers and data can change from one scan cycle to the next.  Therefore the PLC must have a section of its memory set aside for keeping track of variable data, or numbers, that are involved with the user program.  This section of memory we will call data memory.

When the CPU is executing an instruction for which a certain data value must be known, that data value is brought in from data memory.  When the CPU executes an instruction that provides a numerical result, that result is put out into data memory.  Thus, CPU can read from or write to the data memory.  Understand that this relationship is different from the relationship between the CPU and the user program memory.  When the user program is executing, the CPU can only reads from the user program memory, never write to it.

  • Operating System of PLC:

The function of the operating system is to present the user with the equivalent of an extended machine or virtual machine that is easier to program than the underlying hardware.

Due to this operating system, PLC is very easy to program.  It can be programmed using electrical schemes with familiar relay symbols so that a plant electrician can easily access the PLC.  Even though he does not know the assembly language or even if he may not have any familiarity with computers and electronics, he will be able to program the PLC.

The function of PLC Operating system is:

  1. Loads the user program from programming device to program memory.
  2. To read status of input devices.
  3. To execute user program.
  4. To form and update input image table.
  5. As per the status of output image table controls the output devices.
  6. To provide user-friendly functions.

This O.S. makes supervision over entire system, so O.S. programs are said to running in supervisory mode.

When the user completely enters his program in user memory, he transfers control from PROGRAM mode to RUN mode.  In RUN mode the control of the whole system is transferred to operating system.  Now operating system takes care of the whole system such that the whole system becomes automatic and appears as magic to users.