Sei sulla pagina 1di 44

Industrial Training Report

Sofcon India Pvt. Ltd.


10/21/2013 Vidya College of Engineerin Shaurya Mehrotra

CERTIFICATE

This is to certify that Shaurya Mehrotra has completed his summer training of 6 weeks at Sofcon India Pvt. Ltd. In Meerut under the guidance of Mr. D.S.Shukla The topic of his summer training report is PLC/SCADA

Mr. D.S.Shukla (Training In charge)

CERTIFICATE OF ORIGIN

This is to certify that Shaurya Mehrotra student Of B-Tech third year of, DEPARTMENT OF ELECTRONICS & INSTRUMENTATION in Vidya College Of Engineering has done an Internship program at Sofcon India Pvt. Ltd. under the able guidance and supervision of Mr. D.S.Shukla The period for which he was on training was for 6 weeks, starting from July 2013. This Summer Internship report has the requisite standard for the partial fulfillment the B-Tech. To the best of our, knowledge no part of this report has been reproduced from any other report and the contents are based on original research.

Signature (Faculty Guide)

Signature (Student)

ACKNOWLEDGEMENT

With profound respect and gratitude I take the opportunity to convey my thanks to the management Sofcon India Pvt. Ltd. for giving me the opportunity to complete my training here.

I would like to express my gratitude to all those who gave me the possibility to complete this project. I want to thank Mr.D.S.Shukla for giving me the permission to commence this project in the first instance, to do necessary research work and to use departmental data.

I am deeply indebted to Mr. Saurav Garg whose help, stimulating suggestions and encouragement helped me in all time of research for and writing of this project. He shared his knowledge and experiences and also provided me with timely feedback. Thank you sir for all the guidance provided by you and the value adding conversations you had with me during making of this project.

Table of Contents

Automation
Automation is the replacement of human labor by electromechanical machines. Making products under the control of control of computers and programmable controllers is known as Industrial Automation. Manufacturing assembly lines as well as stand-alone machine tools and robotic devices fall into this category. Automation is delegation of human control functions to technical equipment for increasing productivity, better quality, increasing safety in working conditions reducing manpower and cost.

Components used in automation:


Sensors for sensing the parameters. Transmitters for transmitting the raw signals into the electrical form. Control System which includes PLC, DCS, and PID etc. Output devices such as actuators, drives, control valves, solenoid valves, coils, indicating lamps etc.

Control System used in automation:


Desktop Computers Microcontrollers PID Controllers PLC based Control System DCS based Control System CNC based Control System PAC based Control System

Programmable Logic Controllers


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. Therefore, a PLC is a solid state/computerized industrial computer that performs discrete or sequential logic in a factory environment. It was originally developed to replace mechanical relays, timers, counters. PLCs are used to successfully execute complicated control process operations accordingly. A sequence of instruction is programmed by the user to the PLC memory and when programe is executed, the controller operates a system to correct operating specifications.

History of PLC
The first PLC System evolved from conventional computer in late 60s and early 70s. These first PLCs were installed primarily in automotive plants. Traditionally the auto plants had to be shut down for up to a month at model changeover time. The early PLCs were used with other new automation techniques to shorten changeover time. One of the major time consuming changeover procedures had been the wiring of new or revised relay and control panels. The PLC programming procedures replaced the rewiring panel full of wires, relays, timers, counters and other components. The PLCs helped reduce the changeover time to a matter of few days.

Application of PLC in Manufacturing and Assembly Process


In an Industrial set up PLCs are used to automate manufacturing and assembly processes. By process we mean a step-by-step procedure whereby a product is manufactured and assembled. It is the responsibility of the product engineering department to plan for manufacturing of new and modified products. Other processes might involve the filling and capping of bottles, the printing of newspapers, or the assembly of automobiles etc. In many such manufacturing situations PLC plays an important role in carrying out the various processes. The PLC is also designed to operate in industrial environment with wide ranges of ambient temperature, vibration, and humidity and is not usually affected by the electrical noise that is inherent in most industrial locations. Troubleshooting is simplified in most PLCs because they include fault indicators, blown-fuse indicators, input and output status indicators, and written fault information that can be displayed to the programmer.

Advantages of PLCs
Reliability in operation. Flexibility in control technique. Flexibility in programming and reprogramming the plant. Large quantity of contacts. Online/Offline modifications. Cost effective for controlling complex systems. Small physical size and shorter project time. In house simulation and testing of project. Ability to communicate with the computer system in the plant. Ease of maintenance/troubleshooting. Documentation. Security.

Architecture of PLC
A typical PLC can be divided into four components. Processor Unit Power supply Input/output Section The Programming Device

Processor Unit
Central Processing Unit All processors are designed to carry out arithmetic and logic operations. Microprocessors are the brain of every computer, have a unique characteristics- they are programmable which means they are told what to do by a program. Microprocessors are classified mainly by two factors bit size and clock speed. The larger the bit sizes the more powerful the computer. Clock speed determines how quickly the microprocessor executes the instructions. Clock speed ranges from 1MHz to 1GHz. The faster the clock speeds, the more powerful the computer. Microprocessor is a part of PLC CPU that receives, analyzes, processes and sends data. PLC Scan Cycle Normally, before any output device can be turned ON or OFF, the processor has to scan entire program that is in user memory. The Program may only be of a few rungs or it may be hundreds of pages in length, depending on the equipment that is being controlled. 1. 2. 3. 4. Input Scan: Detects the state of all input devices that are connected to the PLC. Program Scan: Executes the user created program logic. Output Scan: Energizes or De-energizes all output devices connected to PLC. Communications: This step includes communications with programming terminals, internal diagnostics etc.

Memory Section of the processor The processor memory consists of hundreds or thousands of locations that are referred to as words. Each word is capable of storing binary data in the form of binary digits (1 or 0). The number of bits that a word can store will depend on the system of PLC. The 16 bit word is most common. Types of Memory Memory section of the processor consists of hundreds or thousands of locations where information is stored. It is divided into two parts, user and storage: User memory is for storage of user program, which contains the ladder logic, or instruction that control the driven equipment. The storage memory is used to store information such as input/output status, timer or counter preset/accumulated values and internal control relays etc. that are necessary for the processor to control the equipments. Volatile memory is the one that loses its ability to retain the stored value when power is removed. Non-volatile memory has the ability to retain stored information when power is removed, accidentally or intentionally. Backup batteries included in the processor power supply protect volatile memory. Random Access Memory (RAM) is memories that has read and write capability. Since RAM is volatile it must have a battery backup to retain the stored program. Read Only Memory (ROM) is a common non-volatile memory that does not require battery backup and retains information when power is lost. Read only indicates that the information stored in the memory can only be read and cannot be changed. Electrically Erasable Programmable Read Only Memory (EEPROM) is a chip that can be programmed using a standard programming device and can be erased by the proper signal being applied to erase pin. Memory Size Memory size is usually expressed in the K values: 2K, 4K, 16K, and so on. K actually stands for 1000 but represents 1024 because the numbering system used with PLC binary systems. While it is common for PLCs to measure their memory capacity in words. A PLC that uses 8-bit words would have half the memory capacity of a PLC that uses 16 bit words. Its important to know the word size of any PLC before memory size can be accurately compared

INPUT/OUPUT Section
Input and Output Module The Input module performs four tasks electronically: It Senses the presence or absences of an input signal at each of its input terminals. The input signal tells what switch, sensor or other signal is ON or OFF in the process being controlled. It converts input signal for high or on to a DC level usable by modules electronic circuits. For a low input signal, no signal is converted indicating OFF. The Input module carries out electronic isolation by electronically isolating the input module output from its input. Its electronic circuit must produce an output, via output logic to be sensed by the PLC CPU. The Output Module operates in an opposite manner from the input module. A DC signal from the CPU is converted through each module section (terminal) to a usable output voltage either AC or DC. Output modules have 4,6,8,12,16 & 32terminals, plus common safety and ground terminals. Input-Output System 1. Discrete I/O systems as the name implies, this is a way of getting I/O to any from PLCs processor. There is one input signal and one output signal corresponding to the number of inputs and outputs the processor supports. This approach is typically used in very small PLCs that have all I/O in the same package only. 2. Parallel I/O Systems a parallel I/O bus, I/O modules are plugged into this bus. The I/O module contains necessary circuitry to decode the bus signals and convert these signals into voltages level that can drive necessary field loads. Each module has number of I/O points. This is also called modular system. 3. Serial I/O Systems are the systems that are not limited to distance. They are used for transmitting the information over a serial data link capable of being extended over longer distances. Since this bus contains fewer wires than does the wiring to the loads, large wiring cost saving can be realized.

Parallel I/O System

Serial I/O System

Types of Input-Output Module Discrete Analog Specialized Module Discrete input module come in a wide range of voltages for various applications i.e... 120V AC, 240V AC, 24V DC, 12V DC. Some Manufacturer also gives their module on AC/DC rating to increase flexibility. Input Module comes with a wide range of input channels such as 4, 8, 12, and 24 that determines the number of field devices that can be connected to a module. Discrete AC output modules use power transistor instead of a Triac for control of output current. Power transistor has a quicker switching capability than triad. Therefore, the response time is more in AC modules than DC modules. Discrete AC Output module usually consists of Triac, however some manufacturers also uses SCR instead of Triad. When the processor decides that the output is to be turned ON, a signal is sent form the I/O rack and LED is turned ON, the light from the Led causes the phototransistor to conduct. This provides current for the gate of the Triac. Analog input modules are used to convert analog signals from analog devices that sense such variables as temperature, light intensity, speed, pressure and convert to 16 bit binary, accomplished with and analog to digital converter. The analog output module changes the 16 bit binary value used by the processor into the analog signals using a Digital to Analog converter. These analog signals can be used to control speed, valves etc. Fast response Dc impute modules are used when processor requires the fast acting sensors to respond to high speed or high volume applications. Encoders, high speed sensors and proximity switches are examples of fast responding modules. Transistor-Transistor Logic I/O module are designed to be compatible with other solid state devices control, sensing instruments, photoelectric sensors, and some 5v DC level control devices. TTL output modules are used for interfacing with discrete devices, LED displays and various other 5v devices. The Triac is used as an electronic switch to turn output devices ON or OFF. The Triac itself is equivalent to two SCRs in reverse parallel connection with a common gate. The gate controls the switching state of the device. Once the signal is applied and the break over voltage point is reached on the gate, the triac freely conducts in either direction, completing the path for the current flow of the output device. Interposing relays are used to control larger than the rating of the individual output circuit. A standard control relay, which has a small shield value, is connected to the output module. The contacts of the control relay which are generally rated at 10 Amps can then be used to control larger loads.

Individual status light is provided to each device that is connected to an input channel. The status light is lit when the input device is closed and is off when the device is off. These status light make a valuable troubleshooting aid to maintainers. Remote I/O racks allow the input and output module to be installed closed to the actual operating conditions. This saves amount of the conduit, cable and other associated wiring cost and labor costs. Only wiring needed for the communication back to the processor is shielded twisted pair. The status light on the output module, close to the actual equipment shorter the trouble shooting time, increases production and eases maintenance. In order to prevent damage to the output modules, it is important not to exceed the current rating. It is also important that the output module be protected from short circuits and ground faults. Thus, output modules are always fused. Some manufacturers fuse for each output channel, others have one fuse for each 8 outputs, while other use one fuse to protect each 16 outputs. Most PLCs come with a blown fuse indicator to show that fuse has blown. Some modules have indicator for each output channel Module Keying manufacturers label , color and notch the fronts of all the modules to distinguish between different type of modules, this prevents any module other than the type of which the connector is keyed from being installed in that slot. This prevents inadvertent or accidental replacement of the wrong type of module. To prevent damage and downtime it is important that the keying system is used.

Types of Input and Output Devices Discrete Inputs are either ON or OFF, Open or Closed egg Limit switches, push buttons, relay coils, solenoids, indicator lamps, alarms etc.

Analog Inputs are temperature, pressure, flow & level sensors, control valves, servo/stepper motors. Analog input is an input that has continuous signals. Typical analog inputs may vary from 0 to 20 milliamps, or 0 to 10 volts. In the following example, a level transmitter monitors the level of liquid in a tank. Depending upon the level transmitter, the signal to the PLC can either increase or decrease as the level increases or decreases.

Discrete Outputs are output that is either in an ON or OFF condition. Solenoids, Contactor coils, and lamps are examples of actuator devices connected to discrete outputs. Discrete output may also be referred to as digital outputs. In the following example, a lamp can be turned on or off by the PLC.

Analog Outputs provide an output signal that has a continuous signal. The Output may be as simple as 0-10V DC level that drives an analog meter. Examples of analog Meter outputs are speed, weight, and temperature. The output signal may also be used on more complex systems.

Power Supply
Electrical supply is used in bringing electrical energy to central processing unit. Most PLC controllers work either at 24 VDC or 220 VAC. On some PLC controllers you'll find electrical supply as a separate module. Those are usually bigger PLC controllers, while small and medium series already contain the supply module. User has to determine how much current to take from I/O module to ensure that electrical supply provides appropriate amount of current. Different types of modules use different amounts of electrical current. This electrical supply is usually not used to start external inputs or outputs. User has to provide separate supplies in starting PLC controller inputs or outputs because then you can ensure so called "pure" supply for the PLC controller. With pure supply we mean supply where industrial environment can not affect it damagingly. Some of the smaller PLC controllers supply their inputs with voltage from a small supply source already incorporated into a PLC.

MICROLOGIX 1000
Hardware Overview The Micrologix 1000 programmable controller is a packaged controller containing a power supply, input circuits, output circuits, and a processor. The controller is available in 10 I/O, 16 I/O and 32 I/O configurations, as well as an analog version with 20 discrete I/O and analog I/O. The catalog number gives all the required information about the PLC. Data Files in Micrologix 1000. Micrologix 1000 contain the status information associated with external input output and all other instruction used in main and subroutine ladder file. In addition, these files store information concerning processor operation. These files are organized by the type of data they contain. The data file types are: Output, File 0- This file stores the state of output terminals for the controller. Input, File 1- This file stores the state of input terminals for the controller. Status, File 2- This file stores controller operation information. This file is used for troubleshooting controller and program information. Bit, File 3- This file is used for internal relay logic storage. Timer, File 4- This file stores the timer accumulator, preset values and status bits. Counter, File 5- This file stores the counter accumulator, preset values and the status bits. Control, File 6- This file stores the length, pointer position, and status bits for specific instruction such as shift registers and sequences. Integer, File 7- This file is used to store numeric values or bit information.

Programming Languages for PLC


Ladder Diagram: Traditional ladder logic is a graphical programming language. Initially programmed with simple contacts that simulate the opening and closing of relays. Ladder logic programming has been expanded to include such functions as counters, timers, shift registers and math operation.

Functional block Diagram: A graphical language for depicting signal and data flows through reusable function blocks. FBD is very useful for expressing the interconnection of control system algorithms and logic.

Structured Text: A high level text language that encourages structured programming. It has a language structure (syntax) that strongly resembles PASCAL and supports a wide range of standard operations and functions.

Instruction List: A low level assemble like language that is based on similar instructions list languages found in a wide range of todays PLC.

Sequential Function Chart: A method of programming complex control systems at a more highly structured level. A SFC program is an overview of the control system, in which the basic building blocks are entire program files. Each program file is created using other type of programming languages. The SFC coordinates large, complicated programming tasks into smaller, more manageable tasks.

PLC compared to other control Systems


PLCs are well adapted to a range of automation tasks. These are typically industrial processes in manufacturing where the cost of developing and maintaining the automation system is high relative to the total cost of the automation, and where changes to the system would be expected during its operational life. PLCs contain input and output devices compatible with industrial pilot devices and controls; little electrical design is required, and the design problem centers on expressing the desired sequence of operations. PLC applications are typically highly customized systems, so the cost of a packaged PLC is low compared to the cost of a specific custom-built controller design. On the other hand, in the case of mass-produced goods, customized control systems are economical. This is due to the lower cost of the components, which can be optimally chosen instead of a "generic" solution, and where the non-recurring engineering charges are spread over thousands or millions of units. For high volume or very simple fixed automation tasks, different techniques are used. For example, a consumer dishwasher would be controlled by an electromechanical cam timer costing only a few dollars in production quantities. A microcontroller-based design would be appropriate where hundreds or thousands of units will be produced and so the development cost (design of power supplies, input/output hardware and necessary testing and certification) can be spread over many sales, and where the end-user would not need to alter the control. Automotive applications are an example; millions of units are built each year, and very few end-users alter the programming of these controllers. However, some specialty vehicles such as transit buses economically use PLCs instead of custom-designed controls, because the volumes are low and the development cost would be uneconomical. Very complex process control, such as used in the chemical industry, may require algorithms and performance beyond the capability of even high-performance PLCs. Very high-speed or precision controls may also require customized solutions; for example, aircraft flight controls. Single-board computers using semi-customized or fully proprietary hardware may be chosen for very demanding control applications where the high development and maintenance cost can be supported. "Soft PLCs" running on desktoptype computers can interface with industrial I/O hardware while executing programs within a version of commercial operating systems adapted for process control needs. Programmable controllers are widely used in motion control, positioning control and torque control. Some manufacturers produce motion control units to be integrated with PLC so that G-code (involving a CNC machine) can be used to instruct machine movements. PLCs may include logic for single-variable feedback analog control loop, a "proportional, integral, derivative" or "PID controller". A PID loop could be used to control the temperature of a manufacturing process, for example. Historically PLCs were usually configured with only a few analog control loops; where processes required hundreds or thousands of loops, a distributed control system (DCS) would instead be used. As PLCs have become more powerful, the boundary between DCS and PLC applications has become less distinct. PLCs have similar functionality as Remote Terminal Units. An RTU, however, usually does not support control algorithms or control loops. As hardware rapidly becomes more powerful and cheaper, RTUs, PLCs and DCSs are increasingly beginning to overlap in responsibilities, and many vendors sell RTUs

with PLC-like features and vice versa. The industry has standardized on the IEC 61131-3 functional block language for creating programs to run on RTUs and PLCs, although nearly all vendors also offer proprietary alternatives and associated development environments. In recent years "Safety" PLCs have started to become popular, either as standalone models or as functionality and safety-rated hardware added to existing controller architectures (Allen Bradley Guardlogix, Siemens F-series etc.). These differ from conventional PLC types as being suitable for use in safety-critical applications for which PLCs have traditionally been supplemented with hard-wired safety relays. For example, a Safety PLC might be used to control access to a robot cell with trapped-key access, or perhaps to manage the shutdown response to an emergency stop on a conveyor production line. Such PLCs typically have a restricted regular instruction set augmented with safety-specific instructions designed to interface with emergency stops, light screens and so forth. The flexibility that such systems offer has resulted in rapid growth of demand for these controllers.

Connecting Sensors and Execution


Connecting external devices to a PLC controller regardless whether they are input or output is a special subject matter for industry. If it stands alone, PLC controller itself is nothing. In order to function it needs sensors to obtain information from environment, and it also needs execution devices so it could turn the programmed change into a reality. Similar concept is seen in how human being functions. Having a brain is simply not enough. Humans achieve full activity only with processing of information from a sensor (eyes, ears, touch, smell) and by taking action through hands, legs or some tools. Unlike human being who receives his sensors automatically, when dealing with controllers, sensors have to be subsequently connected to a PLC. How to connect input and output parts is the topic of this chapter.

Source and Sinking Concept


PLC has input and output lines through which it is connected to a system it directs. Input can be keys, switches, sensors while outputs are led to different devices from simple signalization lights to complex communication modules. This is a very important part of the story about PLC controllers because it directly influences what can be connected and how it can be connected to controller inputs or outputs. Two terms most frequently mentioned when discussing connections to inputs or outputs are "sinking" and "sourcing". These two concepts are very important in connecting a PLC correctly with external environment. The briefest definition of these two concepts would be: SINKING = Common GND line (-) SOURCING = Common VCC line (+) First thing that catches one's eye are "+" and "-" supply, DC supply. Inputs and outputs which are either sinking or sourcing can conduct electricity only in one direction, so they are only supplied with direct current. According to what we've said thus far, each input or output has its own return line, so 5 inputs would need 10 screw terminals on PLC controller housing. Instead, we use a system of connecting several inputs to one return line as in the following picture. These common lines are usually marked "COMM" on the PLC controller housing.

Input Lines
Explanation of PLC controller input and an output line has up to now been given only theoretically. In order to apply this knowledge, we need to make it a little more specific. Example can be connection of external device such as proximity sensor. Sensor outputs can be different depending on a sensor itself and also on a particular application. Following pictures display some examples of sensor outputs and their connection with a PLC controller. Sensor output actually marks the size of a signal given by a sensor at its output when this sensor is active. In one case this is +V (supply voltage, usually 12 or 24V) and in other case a GND (0V). Another thing worth mentioning is that sinking-sourcing and sourcing - sinking pairing is always used, and not sourcing-sourcing or sinking-sinking pairing.

If we were to make type of connection more specific, we'd get combinations as in following pictures (for more specific connection schemas we need to know the exact sensor model and a PLC controller model).

Output Lines
PLC controller output lines usually can be: -transistors in PNP connection -transistors in NPN connection -relays The following two pictures display a realistic way how a PLC manages external devices. It ought to be noted that a main difference between these two pictures is a position of "output load device". By "output load device" we mean some relay, signalization light or similar.

How something is connected with a PLC output depends on the element being connected. In short, it depends on whether this element of output load device is activated by a positive supply pole or a negative supply pole.

Ladder Diagrams
Programmable controllers are generally programmed in ladder diagram (or "relay diagram") which is nothing but a symbolic representation of electric circuits. Symbols were selected that actually looked similar to schematic symbols of electric devices, and this has made it much easier for electricians to switch to programming PLC controllers. Electrician who has never seen a PLC can understand a ladder diagram. There are several languages designed for user communication with a PLC, among which ladder diagram is the most popular. Ladder diagram consists of one vertical line found on the left hand side, and lines which branch off to the right. Line on the left is called a "bus bar", and lines that branch off to the right are instruction lines. Conditions which lead to instructions positioned at the right edge of a diagram are stored along instruction lines. Logical combination of these conditions determines when and in what way instruction on the right will execute. Basic elements of a relay diagram can be seen in the following picture.

Most instructions require at least one operand, and often more than one. Operand can be some memory location, one memory location bit, or some numeric value -number. In the example above, operand is bit 0 of memory location IR000. In a case when we wish to proclaim a constant as an operand, designation # is used beneath the numeric writing (for a compiler to know it is a constant and not an address.) Based on the picture above, one should note that a ladder diagram consists of two basic parts: left section also called conditional, and a right section which has instructions. When a condition is fulfilled, instruction is executed, and that's all!

Picture above represents an example of a ladder diagram where relay is activated in PLC controller when signal appears at input line 00. Vertical line pairs are called conditions. Each condition in a ladder diagram has a value ON or OFF, depending on a bit status assigned to it. In this case, this bit is also physically present as an input line (screw terminal) to a PLC controller. If a key is attached to a corresponding screw terminal, you can change bit status from a logic one status to logic zero status, and vice versa. Status of logic one is usually designated as "ON", and status of logic zero as "OFF". Right section of a ladder diagram is an instruction which is executed if left condition is fulfilled. There are several types of instructions that could easily be divided into simple and complex. Example of a simple instruction is activation of some bit in memory location. In the example above, this bit has physical connotation because it is connected with a relay inside a PLC controller. When a CPU activates one of the leading four bits in a word IR010, relay contacts move and connect lines attached to it. In this case, these are the lines connected to a screw terminal marked as 00 and to one of COM screw terminals.

Normally Open (NO) Normally Closed (NC) Contacts


Since we frequently meet with concepts "normally open" and "normally closed" in industrial environment, it's important to know them. Both terms apply to words such as contacts, input, output, etc. (all combinations have the same meaning whether we are talking about input, output, contact or something else). Principle is quite simple, normally open switch won't conduct electricity until it is pressed down, and normally closed switch will conduct electricity until it is pressed. Good examples for both situations are the doorbell and a house alarm. If a normally closed switch is selected, bell will work continually until someone pushes the switch. By pushing a switch, contacts are opened and the flow of electricity towards the bell is interrupted. Of course, system so designed would not in any case suit the owner of the house. A better choice would certainly be a normally open switch. This way bell wouldn't work until

someone pushed the switch button and thus informed of his or her presence at the entrance. Home alarm system is an example of an application of a normally closed switch. Let's suppose that alarm system is intended for surveillance of the front door to the house. One of the ways to "wire" the house would be to install a normally open switch from each door to the alarm itself (precisely as with a bell switch). Then, if the door was opened, this would close the switch, and an alarm would be activated. This system could work, but there would be some problems with this, too. Let's suppose that switch is not working, that a wire is somehow disconnected, or a switch is broken, etc. (there are many ways in which this system could become dysfunctional). The real trouble is that a homeowner would not know that a system was out of order. A burglar could open the door, a switch would not work, and the alarm would not be activated. Obviously, this isn't a good way to set up this system. System should be set up in such a way so the alarm is activated by a burglar, but also by its own dysfunction, or if any of the components stopped working. (A homeowner would certainly want to know if a system was dysfunctional). Having these things in mind, it is far better to use a switch with normally closed contacts which will detect an unauthorized entrance (opened door interrupts the flow of electricity, and this signal is used to activate a sound signal), or a failure on the system such as a disconnected wire. These considerations are even more important in industrial environment where a failure could cause injury at work. One such example where outputs with normally closed contacts are used is a safety wall with trimming machines. If the wall doors open, switch affects the output with normally closed contacts and interrupts a supply circuit. This stops the machine and prevents an injury. Concepts normally open and normally closed can apply to sensors as well. Sensors are used to sense the presence of physical objects, measure some dimension or some amount. For instance, one type of sensors can be used to detect presence of a box on an industry transfer belt. Other types can be used to measure physical dimensions such as heat, etc. Still, most sensors are of a switch type. Their output is in status ON or OFF depending on what the sensor "feels". Let's take for instance a sensor made to feel metal when a metal object passes by the sensor. For this purpose, a sensor with a normally open or a normally closed contact at the output could be used. If it were necessary to inform a PLC each time an object passed by the sensor, a sensor with a normally open output should be selected. Sensor output would set off only if a metal object were placed right before the sensor. A sensor would turn off after the object has passed. PLC could then calculate how many times a normally open contact was set off at the sensor output, and would thus know how many metal objects passed by the sensor. Concepts normally open and normally closed contact ought to be clarified and explained in detail in the example of a PLC controller input and output. The easiest way to explain them is in the example of a relay.

Normally open contacts would represent relay contacts that would perform a connection upon receipt of a signal. Unlike open contacts, with normally closed contacts signal will interrupt a contact, or turn a relay off. Previous picture shows what this looks like in practice. First two relays are defined as normally open, and the other two as normally closed. All relays react to a signal! First relay (00) has a signal and closes its contacts. Second relay (01) does not have a signal and remains opened. Third relay (02) has a signal and opens its contacts considering it is defined as a closed contact. Fourth relay (03) does not have a signal and remains closed because it is so defined. Concepts "normally open" and "normally closed" can also refer to inputs of a PLC controller. Let's use a key as an example of an input to a PLC controller. Input where a key is connected can be defined as an input with open or closed contacts. If it is defined as an input with normally open contact, pushing a key will set off an instruction found after the condition. In this case it will be an activation of a relay 00. If input is defined as an input with normally closed contact, pushing the key will interrupt instruction found after the condition. In this case, this will cause deactivation of relay 00 (relay is active until the key is pressed). You can see in picture below how keys are connected, and view the relay diagrams in both cases.

Normally open/closed conditions differ in a ladder diagram by a diagonal line across a symbol. What determines an execution condition for instruction is a bit status marked beneath each condition on instruction line. Normally open condition is ON if its operand bit has ON status, or its status is OFF if that is the status of its operand bit. Normally closed condition is ON when its operand bit is OFF, or it has OFF status when the status of its operand bit is ON. When programming with a ladder diagram, logical combination of ON and OFF conditions set before the instruction determines the eventual condition under which the instruction will be, or will not be executed. This condition, which can have only ON or OFF values, is called instruction execution condition. Operand assigned to any instruction in a relay diagram can be any bit from IR, SR, HR, AR, LR or TC sector. This means that conditions in a relay diagram can be determined by a status of I/O bits, or of flags, operational bits, timers/counters, etc.

PLC Control Panels


Conventional Control Panel At the outset of industrial revolution, especially during sixties and seventies, relays were used to operate automated machines, and these were interconnected using wires inside the control panel. In some cases a control panel covered an entire wall. To discover an error in the system much time was needed especially with more complex process control systems. On top of everything, a lifetime of relay contacts was limited, so some relays had to be replaced. If replacement was required, machine had to be stopped and production too. Also, it could happen that there was not enough room for necessary changes. Control panel was used only for one particular process, and it wasnt easy to adapt to the requirements of a new system. As far as maintenance, electricians had to be very skillful in finding errors. In short, conventional control panels proved to be very inflexible. Typical example of conventional control panel is given in the following picture.

In this photo you can notice a large number of electrical wires, time relays, timers and other elements of automation typical for that period. Pictured control panel is not one of the more complicated ones, so you can imagine what complex ones looked like. Most frequently mentioned disadvantages of a classic control panel are: - Too much work required in connecting wires - Difficulty with changes or replacements - Difficulty in finding errors; requiring skillful work force - When a problem occurs, hold-up time is indefinite, usually long.

Control panel with a PLC controller


With invention of programmable controllers much has changed in how a process control system is designed. Many advantages appeared. Typical example of control panel with a PLC controller is given in the following picture.

Advantages of control panel that is based on a PLC controller can be presented in few basic points: 1. Compared to a conventional process control system, number of wires needed for connections is reduced by 80% 2. Consumption is greatly reduced because a PLC consumes less than a bunch of relays 3. Diagnostic functions of a PLC controller allow for fast and easy error detection. 4. Change in operating sequence or application of a PLC controller to a different operating process can easily be accomplished by replacing a program through a console or using a PC software (not requiring changes in wiring, unless addition of some input or output device is required). 5. Needs fewer spare parts 6. It is much cheaper compared to a conventional system, especially in cases where a large number of I/O instruments are needed and when operational functions are complex. 7. Reliability of a PLC is greater than that of an electro-mechanical relay or a timer.

Systematic approach in designing a process control system


First, you need to select an instrument or a system that you wish to control. Automated system can be a machine or a process and can also be called a process control system. Function of a process control system is constantly watched by input devices (sensors) that give signals to a PLC controller. In response to this, PLC controller sends a signal to external output devices (operative instruments) that actually control how system functions in an assigned manner (for simplification it is recommended that you draw a block diagram of operations flow). Secondly, you need to specify all input and output instruments that will be connected to a PLC controller. Input devices are various switches, sensors and such. Output devices can be solenoids, electromagnetic valves, motors, relays, magnetic starters as well as instruments for sound and light signalization. Following an identification of all input and output instruments, corresponding designations are assigned to input and output lines of a PLC controller. Allotment of these designations is in fact an allocation of inputs and outputs on a PLC controller which correspond to inputs and outputs of a system being designed. Third, make a ladder diagram for a program by following the sequence of operations that was determined in the first step. Finally, program is entered into the PLC controller memory. When finished with programming, checkup is done for any existing errors in a program code (using functions for diagnostics) and, if possible, an entire operation is simulated. Before this system is started, you need to check once again whether all input and output instruments are connected to correct inputs or outputs. By bringing supply in, system starts working.

Troubleshooting
The whole work of PLC controller can be represented with a diagram shown on the following page. After turning on the power, PLC is first initialized (clearing IR, SR, AR areas, presetting system timers and checking I/O lines), and if no errors were detected, monitoring process, program execution, calling the I/O lines and serving the peripheral devices starts to occur in

cycles.

Diagnostic functions of PLC


PLC controller features additional functions that make locating errors easier. Errors can be divided into two categories according to severity: 1. Fatal errors are severe and they prevent PLC controller from operating until their cause is located and solved. 2. Non-fatal errors are those that do not prevent PLC controller from operating. After detecting one or more non-fatal errors, program execution will continue. Nevertheless, it is necessary to correct these errors as soon as possible.

Non-fatal errors
When one of these errors takes place, indicators POWER and RUN will be on, and the indicator ERR/ALM will blink. Upon locating non-fatal error, manual for the given PLC controller should be consulted and the flags checked in order to understand the cause of a problem and correct the error.

Fatal errors
When any of the fatal errors take place, PLC controller stops operating and all outputs are shut down. PLC controller cannot be put back to work until the controller is turned off and then turned back on, or until it is switched to PROGRAM mode via peripheral device and the fatal error corrected. With these errors, indicators ERR/ALM are on, while the RUN indicator remains off. It is necessary to check the error flag in the manual of the given PLC in order to locate the cause of the problem and to correct the error.

Algorithm for finding errors in the program

Number Systems
People were always difficult to except the fact that something is different from themselves or their way of thinking. It is probably one of the reasons why numerical systems other than decimal are hard to understand. Still, whether we like it or not, reality is quite different. Decimal system used in everyday life is by far less used than binary code, which is the working basis for millions of computers across the world. Each numerical system rests upon its basis. With decimal numerical system, this basis is 10, with binary it is 2, while with hexadecimal it equals 16. Value of each digit depends on its position in the number, represented in certain numerical system. Sum of values of each digit is the value of the number. Binary and hexadecimal systems are especially interesting for this course. Besides these two, decimal system will be detailed, too, for the sake of comparison. Although there is nothing new to tell about decimal system, we will give it a look for its relations with other numerical systems.

Decimal numerical system


Decimal numerical system is defined with its basis 10 and decimal positioning from right to left, and it consists of digits 0,1,2,3,4,5,6,7,8,9. This means that the rightmost digit is multiplied by 1 in total sum; next digit to it is multiplied by 10, next one by 100, etc. Example:

Operations of addition, subtraction, division and multiplication in decimal numerical system are well known, so we will not detail these.

Binary numerical system


Binary numerical system is quite different from the decimal that we got used to in common life. Its basis is 2 and each digit can have one of two values, 1 or 0. Binary numerical system is used for computers and microcontrollers, because it is much easier for processing than decimal. Usually, binary number consists of 8, 16 or 32 binary digits. Origins of this division are irrelevant for this course, so we will just take it for granted.

Example: 10011011 - binary number with 8 digits To understand the logic of binary numbers, let us have an example. Lets assume that we have a cabinet with four drawers and that we should tell someone to bring us something from one of these. Nothing simpler, we could say in the lower row on the left and it would be quite sufficient. However, if it must be done without this kind of orientation, left, right, up, down and the likes, then we have a problem. There is a plenty of solutions for the situation, but we should look for the best and the most efficient! Let us mark the columns with A and rows with B. If A=1, we assume the upper row of drawers, and if A=0 we assume the lower. Similar with columns, B=1 is the left column and B=0 is the right column (following picture). Now, it is easier to explain which drawer we think of, just use one of the four combinations 00, 01, 10 or 11. This naming of each drawer is nothing more than binary nomenclature of numbers that is, converting decimal numbers into binary system. In short, labels first, second, third and fourth are substituted with 00, 01, 10 and 11.

We still need to understand the logic of binary numerical system, i.e. how to get the decimal value of a number out of the sequence consisting of ones and zeros. This procedure is called conversion of binary number to decimal value. As it can be seen, conversion of binary number to decimal value is done by totaling the sum on the right. Depending on the position in the binary number, digits carry different weight multiplied by them, and totaling them all gives us an understandable decimal number.

Lets further assume that there are marbles in each of the drawers, 2 in the first, 4 in the second, 7 in the third and 3 in the fourth. Let the person opening the drawers also use the binary system. Under these conditions, question would be How many marbles are there in 01?, and the answer would be There are 100 marbles in 01! Notice that both question and answer are clear, although we did not use common terminology. Further, notice that two digits are sufficient for decimal numbers from 0 to 3, and that all values greater than 3 require additional binary digits. Thus, for 0 ~ 7 range, three digits are sufficient, four digits cover the range 0 ~ 15, etc. Simply put, the greatest decimal number that can be represented with n binary digits is 2 raised to power n, decreased by one. Example: 24-1 = 16 - 1 = 15 So, 4 binary digits cover decimal values from 0 to 15, including the values 0 and 15, which is 16 different values. Arithmetical operations that exist in decimal numerical system also apply in binary system. In this chapter, we will cover only addition and subtraction, for simplicity sake. Basic rules that apply to binary addition are: Addition works similar to decimal numerical system - we add the digits of the same weight. If both digits added are zero, the result remains zero, while 0 and 1 total 1. Two ones give zero, but one is carried to the left position.

We can do the check by converting these numbers to decimal system and adding them. Value of the first number is 10; value of the second is 9 and 19 as result, which means that operation was done correctly. Problem occurs when the result is greater than can be represented with given number of binary digits. There are various solutions, one of them being expanding the number of binary digits like in the example below.

Subtraction works on the same principles as addition does. Two zeros give zero in result, as do two ones, while subtraction of one from zero requires borrowing one from the higher position in binary number.

Example: Conversion of numbers to decimal system gives as values 10 and 9, with the result of subtraction of 1, which is correct.

Hexadecimal numerical system


Hexadecimal numerical system has number 16 for basis. Therefore, there are 16 different digits used in this system. These are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. Letters A, B, C, D, E and F represent values 10, 11, 12, 13, 14, 15 and are used for the sake of easier notation. As with binary numerical system, we can apply the same formula here for determining the greatest decimal number that can be represented with a given number of hexadecimal digits.

Example: 162 - 1 = 256 - 1 = 255 Usually, hexadecimal numbers have prefix $ or 0x to emphasize the fact that hexadecimal system is used. Thus, number A37E should be represented with $A37E or 0xA37E. No calculations are needed for converting the hexadecimal number to binary system - it is simple substituting of hexadecimal digits with binary ones. Since maximum value of hexadecimal digit is 15, 4 binary digits are required per one hexadecimal.

Example: Check, i.e. converting both numbers to decimal system, gives us value 228 which is correct. In order to calculate decimal equivalent of hexadecimal number, each digit of number should be multiplied by 16 raised to power equal to the position in the number and then added altogether.

Addition works similar to two previous numerical systems.

Example: It is required to add the appropriate digits of a number, and if their sum equals 16, that position takes value 0. Values exceeding 16 should be added to the sum of digits on higher position. First number converted equals 14891, while other is 43457. Their sum is 58348 that is $E3EC converted to decimal numerical system. Subtraction works identically to previously mentioned systems. Example: Conversion gives us numbers 11590 and 5970, and the result of subtractions is 5620, that is $15F4 converted to decimal numerical system.

SCADA

Potrebbero piacerti anche