We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 56
UNIT-4
Programmable Logic Controller
Introduction – Architecture – Input / Output
Processing – Programming with Timers, Counters and Internal relays – Data Handling – Selection of PLC. Programmable Logic Controller (PLC) Programmable Logic Controller (PLC) or Programmable Controller is a digital computer used for automation of typically industrial electromechanical processes, such as control of Machinery on factory assembly lines, amusement rides, or light fixtures. The PLCs find vast applications in the control and operation of Automated Manufacturing Process Equipment and Machinery, Packaging and Filling equipment, Chemical Mixing, Conveyor systems and Distillation etc. Programmable Logic Controller (PLC) Initially, PLCs have been used to replace relay logic systems. These PLCs were programmed in “LADDER LOGIC”, which strongly resembles a schematic diagramof relay logic. Ladder logic notation was chosen to reduce training demands for the existing technicians; other earLy PLCs used a form of instruction list programming, based on a stack based logic solver. Programmable Logic Controller (PLC) The PLCs has following features and specific which distinguish from computers. These are, They are rugged and designed to withstand vibrations, temperature, humidity and noise. The interfacing for inputs and outputs Is inside the controller. They are easily programmed and have an easily understood programming language. Programming is primarily concerned with logic and switching operations. They can be designed with communication capabilities that allow them to interface with a computer system or human. Programmable Logic Controller (PLC) Consider a hardwired circuit used for a simple application shows a Hardwired Motor Circuit in order to control and process. It consisting of two independent switches and Motor. Here, the input devices such as sensors are connected to PLC and form switching Operation. Programmable Logic Controller (PLC) They are wired parallel to generate a simple logic Logic-1, when the switch is ON; Motor 1 is ON otherwise OFF. Logic-2, introduce more complex logic i.e., Motor 2 should be OFF when the Motor 1 is switched ON. Programmable Logic Controller (PLC) This will require the redesigning of circuit and hence we need to rewiring. Plant machine control involves such a complex process and hence controller system inherently requires of relays and circuits. To implement such a complex logic we need use a controller circuit to control the switches. Hence the switcher are not connected directly to the Motors, instead of that the switches are connected to the input modules and logic module are connected to the output modules. Programmable Logic Controller (PLC) Here, the input devices such as sensors are connected to PLC and form switching devices. The output devices such as Motors and valves are connected to the PLC only when the program conditions have been met, the output devices are switched- ON or OFF based on logics of inputs. Programmable Logic Controller (PLC) BASIC STRUCTURE The PLC is designed as a replacement for the hardwired relay and timer logic, where PLC provides ease and flexibility of control based on programming and executing logical instructions. The internal functions such as timers, counters and shift registers making sophisticated control possible using even the smallest PLC. Programmable Logic Controller (PLC) BASIC STRUCTURE A typical PLC can be divided into four parts. They are, 1. I/O MODULE 2. CPU 3. MEMORY 4. PROGRAMMING UNIT Programmable Logic Controller (PLC) BASIC STRUCTURE BASIC STRUCTURE Input/ Output Module. Input/ Output Module are used to transfer data between external devices and CPU. The input and output modules are normally incorporated into PLC in two ways. i) Fixed I/O — It is a small unit that comes in one piece with processor i.e., the 1/O terminals cannot be changed in fixed I/O. ii) Modular I/O - It is packed together i.e., there are several compartments of I/O Modules are plugged together. Input Module ensures a usable signal is available for the CPU circuit protection capabilities will also be necessary in the module to protect. the CPU circuitry from faults, surges or spikes in the incoming signal. BASIC STRUCTURE The output module reads digital signals transmitted from the CPU, and operates motor starters. Solenoids and status monitors. The module essentially functions as a switching device and provides on-off signals to the associated devices. If the output module is incapable of handling the power needed by the device, it sends a signal to an external relay, which connects with the actual power circuit. Input and Output devices are placed outside the PLC, with connecting wires attached to the terminal strips on the PLC. There are no connections in the inputs and output. Each input and output terminal has a unique address. BASIC STRUCTURE Central Processing Unit (CPU) Brain of the PLC, consisting of a microprocessor which interprets the input signals and carries out the control actions according to the program stored in the memory, communicating the decision as an action signal to the outputs. It forms the core portion of the PLC. The microprocessor based unit contains the logic and control algorithm for the controller. It scans the total information package stored in the memory and the input and output devices continuously. During the scan the CPU also executes instruction based on input data, sends appropriate output responses to the output devices, updates data acquisition systems, and indicates condition changes. BASIC STRUCTURE Central Processing Unit (CPU) Scan time for larger unit depends on the size of the memory and on the configuration of the system. Smaller PLC has longer scan times than larger units and has less memory and reduced capacity for special instructions and peripheral equipment. The power supply unit is needed to convert the AC voltage to the low DC voltage necessary for the processor and to supply power to other circuits in the input and output interface module. BASIC STRUCTURE Memory Unit The memory unit is where the program is stored that is to be used for the control actions to be exercised by the Microprocessor and data stored from input for processing and for the output. The memory in PLC stores the digital control logic, the process program and the necessary instruction to operate the system. It stored in units called “bytes”. The memory used in PLC is i) Non-volatile Memory - The memory may retain the information even the power is turned off. ii) Volatile Memory - The memory may lose the information when the electrical power is turned off. BASIC STRUCTURE Memory Unit User interface with the PLC mostly works through the volatile memory. According to the purpose of usage, there are two main memory types. i) RAM (Random Access Memory) — It is used for program and data storage. For this we need to provide a battery backup in order to prevent loss of any data when power is removed. It is a volatile memory. ii) ROM (Read Only Memory) — ROM memory cells store information permanently, and it is used to store the operating program of the computer-to permit easy startup. It is permanent storage hence called as non-volatile memory. BASIC STRUCTURE Programming Unit Used to enter the required program into the memory of the processor. The program is developed in the device and then transferred to the memory unit of the PLC. Programming device also enters the required program using ladder logic into the memory of the processor. The sequence of operation and ultimate control of equipment machinery is specified and determined by the ladder program. While entering the ladder program, the program device is normally connected to the controller. Actual programming is usually achieved by pushing keys or a keyboard and can be programmed by people without much computer programming experience. PLC Architecture A PLC consists of the following elements. i. CPU (Central Processing Unit) ii. Memory iii. I/O processing devices PLC Architecture CPU (Central Processing Unit) In general the CPU consists of, An Arithmetic and Logical Unit (ALU) which is responsible for data manipulation and carrying out arithmetic operations like addition and subtraction and logical operation like AND, OR, NOT and EX-OR etc. Memory termed registers, located within the processor and used to store information involves in program execution. A control unit which is used to control the timing of operations and control the units within the processor to ensure that operations are carried out in the correct order. PLC Architecture CPU (Central Processing Unit) Functions of CPU: To control and process all the operations of memory and I/O data in the system in accordance with the program. Holds the communication circuits and power supply. Executes the operating system, manages memory, monitors inputs, evaluates the user logic and turns gives appropriate outputs. In order to do this, the PLC is provided with a clock signal to sequence its internal operations. PLC Architecture CPU (Central Processing Unit) Buses: Internal paths used for communication within PLC. Essentially carry the information in the digital forms. There are four types of buses required in a PLC. i) Data Buses – It is used for communicating data between elements. ii) Address Buses - It is used to read the address of locations for accessing stored data. PLC Architecture CPU (Central Processing Unit) Buses: iii) Control Buses - It is used for internal control actions carried by the CPU. Example: To inform Memory devices whether they are to receive data from an input or output data. iv) System Buses – It is used for communication between the input/output ports and the input/output unit. PLC Architecture Memory Memory devices are where the program are started in the controller or some groups of binary digits or 1s and 0s stored in the form of bytes at individual locations identified by their addressed. The memory of a PLC is divided into many sections based on specific functions. i) Sectors to store the status of inputs and outputs. ii) Sectors to store system information such as scan time, fault status, fault codes and watchdog timers. There several memory elements in PLC system. PLC Architecture Memory 1. RAM (Random Access Memory) RAM is used for user’s program and data storage. RAM is designed to storage the information on the status of input and output devices and the values of timers and counters and other internal devices. The data RAM is sometimes referred to as a data table or register table. RAM is volatile memory. It will lose its stored information when power is turned off. PLC Architecture Memory 2. ROM (Read Only Memory) ROM is a permanent storage used to store the operating system and fixed data used by the CPU. ROM is not volatile memory normally, is designed so that the information stored in the memory can only be read and cannot be changed. ROM can be classified into three they are, a) PROM (Programmable Read Only Memory) PROM is a special type of ROM and allows initial and/or additional information to be written into the chip and can be written only once after being received from the manufacturer. PLC Architecture Memory b) EPROM (Erasable and Programmable ROM) It is programmable using a dedicated programmer. Information stored in the EPROM can be erased with the use for ultraviolet light source and can be reprogrammed and stored permanently. ¢) EEPROM (Electrically EPROM) Here the information stored can be erased with the electrical pulses rather than ultraviolet light. The EEPROM can be electrically over writer with new data. The storage capacity of a memory unit is determined by the number of binary words then it can store. Thus, if a memory size, is 256 words then it can store 256 x 8 = 2048 bits if 8-bit words are used and 256 x 16 = 4096 bits if 16-bit words are used. PLC Architecture Input and Output Processing Devices The input/output unit provides the interface between the system and the outside world and allowing connections to be made through input/output channels to input devices such as sensors and output devices such as motors and solenoids. Every input/output point has a unique address which can be used by the CPU. The input/output channels also provide isolation and signal conditioning functions so that sensors and actuators can often by directly connect to them without the need for other circuitry. PLC Architecture Input and Output Processing Devices Optoisolator (Opto Coupler) Electrical isolation from the exteral world is usually by means of optoisolators. Principle When a digital pulse passes through the light emitting diode, a pulse of infrared radiation is produced. This pulse is detected by the phototransistor and givesrise to a voltage in that circuit. The gap between the light emitting diode and the photo transistor gives electrical isolation but the arrangement still allows for a digital pulse in one circuit to give rise to a digital pulse in another circuit. PLC Architecture Input and Output Processing Devices PLC Architecture Input and Output Processing Devices Outputs are often specified as being of, i) Relay type i) Transistor type iii) Triac type PLC Architecture Input and Output Processing Devices i) Relay Type In Relay type the signal from the PLC output is used to operate a relay and so it able to switch currents of the order of a few amperes in an external circuit. The relay isolates the PLC from the external circuit and can be used for both d.c and a.c switching. Relays are slow to operate. PLC Architecture Input and Output Processing Devices Transistor Type The transistor type of output uses a transistor to switch current through the external circuit. This gives a faster switching action. Optoisolators are used with transistor switches to provide isolation between the external circuit and the PLC. The transistor output is only for d.c. switching. PLC Architecture Input and Output Processing Devices Transistor Type Thé switching action of a transistor would require base current which is enough for the collector current to reach the maximum value, and the voltage drop will be very small at this point. PLC Architecture Input and Output Processing Devices Triac Type The Triac type output is used for switching AC voltages. A Triac device is used which acts as a two-way SCR with one gate connected at the output unit. INPUT/OUTPUT PROCESSING Processing of Input/ Output is through the programming the PLC. The basic form of programming commonly used with PLCs in “Ladder Programming”. Ladder Programming involves each program task being specified as though a Rung of a Ladder. Thus such a Rung could specify that the state of switches A and B, the inputs, be examined and if A and B are both closed then a solenoid, the output is energized. The programming sequences followed by a PLC are, Step 1: Scan the inputs associated with one Rung of the ladder program Step2: Solve the logic operation involving those inputs. Step3: Set/reset the outputs for the Rung. Step4: Move on to the next Rung and repeat operations in Step 1,2 and 3. Step5: Move on to the next Rung and repeat operations in Step 1, 2 and 3. And 50 on until the end of the program. Each rung of the ladder program is then scanned in turn. There are two methods that can be used for input/output processing. i) Continuous updating ii) Mass input/output copying i) Continuous Updating Continuous updating involves the CPU scanning the input channels as they occur in the program instructions. Here each input point is scanned individually and its effect on the program is determined. Due to scanning built in delay may be occurred about 3 ms, when each input is examined in order to ensure that only valid input signals are road by the microprocessor. i) Continuous Updating
This delay enables the microprocessor to avoid
counting as input signal twice, or more frequently, if there is contact bounce at a switch. Here the number of inputs may have to be scanned. Each with a 3ms delay, before the program has the instruction for a logic operation to be executed and an output to occur. The outputs are latched so that they retain their status until the next updating. ii) Mass Input/ Output Copying In continuous updating, there has to be a 3ms delay on each input, the time taken to examine several hundred input/ output points can become comparatively long time. To avoid such a delay, the input/ output is processing in a Mass Input/Output copying method for a more rapid execution of a program. In Mass Input/ Output copying method, a specific area of RAM is used as a buffer store between the control logic and the input/output unit. Each input/output has an address in this memory. At the start of each program cycle the CPU scan all the inputs and copies their status into the input/output addresses in RAM. ii) Mass Input/ Output Copying As the program is executed the stored input data is Read, as required from RAM and the logic operations are carried out. The resulting output signals are stored in the reserved input/output section of RAM. At the end of each program cycle all the outputs are transferred from RAM to the output channels. The outputs are latched so that they retain their status until the next updating. PROGRAMMING The programming of PLC is based on the “Ladder Diagram”. Ladder diagram involves writing a program in a similar manner to drawing a switching circuit. The symbols used in ladder diagram are known as ladder symbols. PROGRAMMING
And the circuit i.e., inputs and outputs are
connected horizontal. Hence the ladder diagram describes the output A occurs when the input 1 occurs. PROGRAMMING
Here the ladder diagram describes the
output A occurs when both the inputs 1 and 2 occurs. PROGRAMMING
Here the ladder diagram describes the
output A when input 1 or input 2 occurs. PROGRAMMING PROGRAMMING LOGIC FUNCTIONS Logic is the ability of PLC to make decisions when more than one factor must be taken into account before a device is operated. The logic functions can be obtained by combinations of switches. AND FUNCTION An AND function operates like a series circuit and works with two inputs to produce a single output. Consider a situation where a coil is not energized unless two, normally open, switches are both closed. Switches A and B have both to be closed, which thus gives an AND logic situation. OR FUNCTION NOT FUNCTION NOR FUNCTION NAND FUNCTION XOR FUNCTION