You are on page 1of 44

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01. INDUSTRIAL AUTOMATION


01.1 Introduction.
Automation is a process of technological development, which is aimed at reducing human involvement in performing a task. Specifically, industrial automation is concerned with the application of mechanical, electrical, electronic, networking and computer-based systems to operate and control the automatic manufacturing of goods. As industrial automation is aimed at reduction of human involvement in controlling a machine or process, its implementation necessarily entails the following steps.  Step 1: Replacement of human s muscles (hands) by some output devices, e.g. the electrical motors, pneumatic actuators or hydraulic cylinders.  Step 2: Replacement of human s senses (eyes, ears, etc.) by input devices such as limit switches and sensors.  Step 3: Replacement of human s brain by a logic signal processing device such as a computer, micro-controller or programmable controller.  Step 4: The use of signal conversion means to match the output element with the signal-processing layer.

NDES

EP/08/7303

Page | 1

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.2 Output Devices.


An automation system is incomplete and the PLC system is virtually paralyzed without means of interface to the field output devices. Some of the most commonly controlled devices are motors, solenoid valves, relays, Hydraulics and pneumatics cylinders, indicators, Actuators & etc. Drive motions in mechanical systems. Most often this is by converting electrical energy into some form of mechanical motion.

01.2. a SOLENOIDS
Solenoids are the most common actuator components. The basic principle of operation is there is moving ferrous cores (a piston) that will move inside wire coil as shown in Figure follow. Normally the piston is held outside the coil by a spring. When a voltage is applied to the coil and current flows, the coil builds up a magnetic field that attracts the piston and pulls it into the center of the coil. The piston can be used to supply a linear force. Well known applications of these include pneumatic values and car door openers.

As mentioned before, inductive devices can create voltage spikes and may need snubbers, although most industrial applications have low enough voltage and current ratings hey can be connected directly to the PLC outputs. Most industrial solenoids will be powered by 24Vdc and draw a few hundred mA.

01.2.b VALVES
The flow of fluids and air can be controlled with solenoid controlled valves. An example of a solenoid controlled valve is shown in following figure. The solenoid is mounted on the side. When actuated it will drive the central spool left. The top of the valve body has two ports that will be connected to a device such as a hydraulic cylinder. The bottom of the valve body has a single pressure line in the center with two exhausts to the side. In the top drawing the power flows in through the center to the right hand cylinder port. The left hand cylinder port is allowed to exit through an exhaust port. In the bottom drawing the solenoid is in a new position and the pressure is now applied to the left hand port on the top, and the right hand port can exhaust. The symbols to the left of the figure show the schematic equivalent of the actual valve positions. Valves are also available that allow the valves to be blocked when unused.
NDES EP/08/7303 Page | 2

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.2.c CYLINDERS
A cylinder uses pressurized fluid or air to create a linear force/motion as shown in following figure. In the figure a fluid is pumped into one side of the cylinder under pressure, causing that side of the cylinder to expand, and advancing the piston. The fluid on the other side of the piston must be allowed to escape freely - if the incompressible fluid was trapped the cylinder could not advance. The force the cylinder can exert is proportional to the cross sectional area of the cylinder.

NDES

EP/08/7303

Page | 3

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.2.d MOTORS
Motors are common actuators, but for logical control applications their properties are not that important. Typically logical control of motors consists of switching low current motors directly with a PLC, or for more powerful motors using a relay or motor starter. Motors will be discussed in greater detail in the chapter on continuous actuators.

01.2.e OTHERS
There are many other types of actuators including those on the brief list below. y Heaters The are often controlled with a relay and turned on and off to maintain a temperature within a range. y Lights - Lights are used on almost all machines to indicate the machine state and provide feedback to the operator. Most lights are low current and are connected directly to the PLC. y Sirens/Horns - Sirens or horns can be useful for unattended or dangerous machines to make conditions well known. These can often be connected directly to the PLC.

NDES

EP/08/7303

Page | 4

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.3 Input Devices.


Intelligence of an automated system is greatly depending on the ability of a PLC to read in the signal from various types of automatic sensing and manual input field devices. Push-buttons, key pad and toggle switches, which from the basic man-machine interface, are types of manual input device. On the other hand, for detection of work piece, monitoring of moving mechanism, checking on pressure and or liquid level and many others, the PLC will have to tap the signal from the specific automatic sensing devices like proximity switch, limit switch, photoelectric sensor, and level sensor and so on. Types of input signal to the PLC would be of ON/OFF logic or analogue. These input signals are interfaced to PLC through various types of PLC input module.

01.3.a Push Buttons


Push buttons are widely used to give signals for control systems. Mainly push buttons are two types which are normally open and close buttons. These are applying to switch panels of control circuits. By using normally open type push button can be given start signals for systems. Similarly close button can be used to stop purposes.

NDES

EP/08/7303

Page | 5

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.3.b Limit switches


Limit switches are a type of sensor that detects presence and absence. Specifically, mechanical limit switches are switches that are mechanically activated, meaning that they have some sort of arm, lever, knob, plunger, etc., which is physically or mechanically activated by making contact with another object. As the object makes contact with the actuator of the switch, it eventually moves the actuator to its limit where the contacts change state. Other varieties of sensors/switches exist, including proximity sensors, light sensors, electric switches, among others. In its simplest form, a limit switch is a switch that can be mounted into remote locations so that it is actuated by an object other than a human operator. Some basic functions of limit switches are: y y y y y y y Detecting presence/absence Counting Detecting range of movement Detecting positioning & travel limit Breaking a live circuit when unsafe conditions arise Detecting speed and hundreds of other applications

01.3.c Proximity sensors

In 1831 Michael Faraday discovered electro-magnetic induction. Essentially, he found that moving a conductor through a magnetic field creates voltage that is directly proportional to the speed of the movement the faster the conductor moves, the higher the voltage. Today, inductive proximity sensors use Faraday s Law of Electromagnetic Induction to detect the nearness of conductive materials without actually coming into contact with them. The primary deficiency of these sensors, however, is that they only detect metal conductors and different metal types can affect the detection range.
NDES EP/08/7303 Page | 6

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

Proximity capacitive sensors, on the other hand, adhere to the same principle but can detect anything that is either conductive or has different dielectric properties than the sensor s electrodes surroundings. Proximity capacitive sensors have become increasingly popular as more user/machine interfaces are designed using touch panels to reliably respond to commands.

1. Inductive Proximity Switch


Inductive proximity switches are no-touch, non-interactive devices and sensitive to all metals. They consist of an oscillator, demodulator, level and switching amplifier. If a metal object enters the electromagnetic field of the oscillator coil, eddy currents are induced in this coil which changes the amplitude of oscillation. The demodulator converts the change in the amplitude to a dc signal which causes the trigger stage to trip and the semiconductor output stage to switch.

NDES

EP/08/7303

Page | 7

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

2. Capacitive Proximity Switch


Proximity capacitive sensing is a technology that enables touch detection by measuring capacitance, exhibiting a change in capacitance in response to a change in surrounding materials. Certain sensors gauge the change by generating an electric field (e-field) and measuring the attenuations suffered by this field. Unlike inductive sensors, a proximity capacitive sensor can detect anything that is either conductive or has different dielectric properties than the sensor s electrodes surroundings. They are excellent touchpad enablers because we, humans, being mostly water, have a high dielectric constant, and we contain ionic matter, which makes us good electric conductors.

01.3.d Read Switches


Reed switches are very similar to relays, except a permanent magnet is used instead of a wire coil. When the magnet is far away the switch is open, but when the magnet is brought near the switch is closed. These are very inexpensive and can be purchased for a few dollars.

NDES

EP/08/7303

Page | 8

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.3.e Temperature Transducers


1. Thermo Couples
When two wires with dissimilar electrical properties are joined at both ends and one junction is made hot and the other cold, a small electric current is produced proportional to the difference in the temperature. See beck discovered this effect. The hot junction forms the sensor end.

2. Platinum Resistance Pt100 Sensors

The resistance to the flow of electricity in metallic materials varies with temperature. This can be used to good effect in platinum resistance detectors. Platinum is particularly stable both electrically and mechanically and is also stable with respect to time, producing a relatively linear change in resistance versus temperature. Because the output resistance change to temperature is relatively small, it follows that lead lengths and resistances are therefore important features. In general when lead lengths are short, or can be considered as an acceptable additive content, two wire configurations is sufficient. Three wire is the most commonly used and unless otherwise specified is supplied as standard, the third wire is the compensator for lead length and providing that all three wire have equal resistance, compensates for any ZERO or SPAN errors. (Not true for all bridges).

NDES

EP/08/7303

Page | 9

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

3. Infrared (IR) The The most basic design consists of a lens to focus the infrared (IR) energy on to a detector, which converts the energy to an electrical signal that can be displayed in units of temperature after being compensated for ambient temperature variation. This configuration facilitates temperature measurement from a distance without contact with the object to be measured. As such, the infrared thermometer is useful for measuring temperature under circumstances where thermocouples or other probe type sensors cannot be used or do not produce accurate data for a variety of reasons. Some typical circumstances are where the object to be measured is moving; where the object is surrounded by an EM field, as in induction heating; where the object is contained in a vacuum or other controlled atmosphere; or in applications where a fast response is required.

01.3.f Pressure transducers


Dynamic pressure sensors are designed to measure pressure changes in liquids and gasses such as in shock tube studies, in-cylinder pressure measurements, field blast tests, pressure pump perturbations, and in other pneumatic and hydraulic processes. Their high rigidity and small size give them excellent high frequency response with accompanying rapid rise time capability. Acceleration compensation makes them virtually unresponsive to mechanical motion, i.e., shock and vibration.

NDES

EP/08/7303

Page | 10

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.3.g String Gauge torque/weight sensors


Strain gauge weighing cells comprise an elastically deformable body on which electrical resistive films (strain gauges) are mounted which change their resistance on deformation. Suitable construction ensures that this resistance change is proportional to the acting deforming force. Several strain gauges can be evaluated following the principle of the Wheatstone bridge circuit. Structure of a strain gauge

Application range of strain gauge cells Scales in the lower and medium nominal load range up to a few 100 kg. Lever less construction with only one (moment-independent) weighing cell results in extremely rugged bench, floor and shop scales. y Low platform scales in the tone range with several load cells y Hopper scales (container, silos) with several load cells y Scale construction with lever mechanism, strain gauge weighing cell at output of lever mechanism.

NDES

EP/08/7303

Page | 11

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.4 Programmable Logic Controller (PLC)


A Programmable Logic Controller, PLC, or Programmable Controller is a digital computer used for automation of industrial processes, such as control of machinery on factory assembly lines. Unlike general-purpose computers, the PLC is designed for multiple inputs and output arrangements, extended temperature ranges, immunity to electrical noise, and resistance to vibration and impact. Programs to control machine operation are typically stored in battery-backed or non-volatile memory. A PLC is an example of a real time system since output results must be produced in response to input conditions within a bounded time, otherwise unintended operation will result.

Module Type PLC

Compact type PLC

LOGO Type PLC

NDES

EP/08/7303

Page | 12

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

Advantages of Programmable Logic Controller System. PLC systems have considerable advantages over the old relay logic systems. They include: y Greater flexibility and reliability y Easy debugging as error detection programs are often available, enabling easier and speedier debugging y Low power consumption and space requirement as PLC is based on solid-state electronics rather than electro-mechanical technology y Litter maintenance due to no moving parts y No special programming skills required by maintenance personnel y Low cost y Dramatic performances increase over the relay logic systems, which can be seen from the table below. A programmable logic controller can be used to perform the following functions:

Control Type 1. Sequential Control

2. Sophisticated Control

3. Supervisory Control

Functions a) Conventional Relay Logic Replacer b) Timers / counters c) Auto/ Semi-Auto/Manual control of machines/Processes a) Arithmetic Operations (+ ,, v, z ) b) Information Handling c) Analogue Control (temperature., pressure) d) Stepper-motor Control e) Servo-motor Control a) Process Monitoring and Alarm b) Fault Diagnostics c) Interface with Computer (RS 232/ RS-422) d) Printer/ ASCII interfacing e) Local Area Network

NDES

EP/08/7303

Page | 13

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

Programmable Logic Controllers compared to other Microprocessor based devices Although the programmable logic controller is microprocessor based, it is different from other microprocessor based devices and is more widely used than the latter in machine control (rather than data processing) because of the following reasons:

 Modularity This enables expansion of the basic system when the requirements grow. It also allows for easier maintenance.

 Environmental considerations PLCs are designed to work in harsh factory environment with all the attendant temperature, dust, humidity and electromagnetic pollution present.

 Dedicated input/output units Inputs and outputs to PLCs can be easily connected without the need for interfacing for the common input and output devices.  Programmability Most PLCs can be programmed without prior knowledge of any computer language. A user familiar with relay logic can use a PLC with little training. Troubleshooting, too, is made easy with the help of internal diagnostics.

 Predictability PLCs are designed to fail predictably. Most will fail so that all outputs are turned off.

 Single-Source Support Most PLC manufacturers can supply a very complete range of input and output devices so that there is little or no need to source around for other suppliers.

NDES

EP/08/7303

Page | 14

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.4.a Hardware Configuration of a Programmable Logic Controller

Programmable logic controllers are microprocessor - based devices specifically designed to replace the relays and hard-wired logic. They come complete with interfacing solid - state relays eliminating interfacing problems. A programmable logic controller system can be divided into the following blocks as shown in Figure 01.4.1
Pr og r am m in g De vic e IB M P C or C om p at ible

Po w er S u pp ly

CP U

P ro gr am Me m or y C om p on en t D a ta Me m o ry

Inp ut/ O ut pu t M od ule s

Inp ut D ev ic es

O u tpu t D ev ic es

Figure 01.4.1: Components of a Programmable Logic Controller

NDES

EP/08/7303

Page | 15

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

 Power Supply Converts AC power to low voltage DC used to power the electronic logic in the CPU. It may also be used to power the Input and Output Modules.

 Central Processing Unit (CPU) This is the "brains" of the system. It consists of one or more microprocessors that perform the computations required to control the output devices according to the set of control instructions or "program" that it follows and the status of the input signals to the Input Module.

NDES

EP/08/7303

Page | 16

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

 Memory Unit This is divided roughly into two parts: The program memory contains the control instructions or user program, and the read only data memory which holds all data of operations and status of the controller such as whether the inputs/outputs are on/off and timer/counter data, etc. These values change as the program executes. In addition, the executive (also known as the system firmware) has a super capacitor that is essentially the base intelligence of the system which supervises the communication and housekeeping duties. It also holds the read/write data memory. Memory size is usually measured in the number of instruction words that can be stored, usually 1K, 4K or 8K. In modern PLCs, the size of the word is usually 16 bits.

 Input /Output Modules These provide the interface between the external control signals and the low voltage DC signals used by the CPU. They are optically or otherwise isolated. The input/output modules are designed in this way to minimize or eliminate the need for any intermediate circuitry between the PLC and the control devices.

NDES

EP/08/7303

Page | 17

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.4.b PLC Operation


The PLC operates internally in a way very similar to computers repetitively. The states of the input devices are continuously monitored and copied from input module into input RAM memory area. The CPU then executes the control program stored in the program memory area. Depending on the program and the states of inputs, the output states of the relevant output devices are then written into the output RAM memory area. At the end of each execution cycle, data in output RAM area are then copied to the output module.

NDES

EP/08/7303

Page | 18

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.5 Programming the Siemens SIMATIC S7-200 PLC

01.5.a Configuration of the SIEMENS SIMATIC S7-200 PLC


The Siemens SIMATIC S7 family comprises of three different series of PLC, S7-200, S7300 and S7-400, for different application levels. This training course is based on SIMATIC S7-200 series of PLC. It is a micro PLC with expansion modules to add additional functions to the CPU. The expansion modules consist of discrete and analogue I/O modules and other intelligent modules for speed and position control of stepper or servo motor and for communication and networking. Siemens provides S7-200 with various types of CPU models to suit different applications need. The basic CPUs are available with 10 to 40 I/O points, and can be expanded by adding up to 2 to 7 numbers of expansion I/O units. The S7-200 can be connected to an IBM PC or compatible, into which the programming software, STEP 7-Micro/WIN, can be, installed (Figure 01.5.2).

STEP 7-Micro/WIN Software

PC

SIEMENS S7-200

Link with Computer

Figure 01.5.2: Configuration of the SIMATIC S7-200 Programmable Logic Controller

NDES

EP/08/7303

Page | 19

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.5.b Input / Output and Internal Relay Addressing


We have seen that the PLC operates by monitoring input signals from external devices like push-buttons, limit switches, etc. Then, according to the program in its memory, the PLC reacts to the input by outputting signals to external loads such as relays, indicator lights, etc. In the program, programmable "internal relays" replace the relays of hard-wired circuits. Addresses are used to identify the various terminal points through which the PLC interacts with physical devices. Internal relays are similarly specified by addresses. These input, output and internal relays are usually available in groups of 8 or 16 or sometimes 32 relays. For the Siemens SIMATIC, data in a set of 8 relays is known collectively as a byte (B) and each relay equals one bit of the byte. SIMATIC also handles data in a set of 16 and 32, which are known as word (W) and double word (D) respectively.

y Data Memory Areas


The SIMATIC S7-200 can access data in the following memory areas: - Input Memory Area (I) is used to store status of the input devices from input modules. - Output Memory Area (Q) is used to store status of the output devices after each execution of the program logic. - Variable Memory Area (V) is used to store intermediate results of operation being performed by the program. - Bit Memory Area (M) is used as control relays to store the intermediate status of an operation or other control information. - Timer Memory Area (T) is used to store timer s current and preset values. - Counter Memory Area (C) is used to store counter s current and preset values. - Special Memory Area (SM) is used to control some special functions - Accumulators (AC) is used to pass parameters to and from subroutines and to store intermediate values used in a calculation. S7-200 provides 4 32-bit accumulators (AC0 to AC3). - Analog Inputs (AI) converts an analog value (such as pressure and speed) into a digital value. - Analog Outputs (AQ) converts a digital value into a current or voltage. - Local Memory Area (L) is used to store data or passing parameters to subroutines. L memory is similar to V memory; except the data in L memory are local variables and those in V memory are global variables. There are some other types of memory areas that are not used for this course. Thus, they will not mention in this course notes.

NDES

EP/08/7303

Page | 20

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

Addressing Conventions

Data in most memory area (V, I, Q, M and SM) can be accessed as bit, byte, word or double word using the byte.bit or byte-address format. Bit Addressing To access a bit in a memory area, the address specified should include the memory area identifier, the byte address, and its bit number. An example is shown in Fig. 01.5.3 I 2 . 5 Bit number (bit 5) Separator (to separate byte address from bit number) Byte address (byte 2) Memory area identifier (I for input memory area)

Bit No Byte 1 Byte 2 Byte 3

7 6 5 4 3 2 1 0

Figure 01.5.3: Bit Addressing Byte, Word and Double Word Addressing To access a byte, a word or a double word in a memory area, specify the memory area identifier, the data types and then the byte address. Figure 02.4.4shows examples of each data type of addressing mode. V B 100 Byte address Access as byte Memory area identifier MSB
7

LSB
VB100 00

VB100

NDES

EP/08/7303

Page | 21

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

V W 100 Byte address MSB


7

LSB
0 7 VB101 0

VB100

Access as word Memory area identifier V D 100 Byte address Access as double word Memory area identifier MSB
7

VW100

LSB
VB100 0 7 VB101 0 7 VB102
0 7

VB103

VD100 Figure 01.5.4: Byte, Word and Double Word Addressing Examples of input and output bit usage are shown in Figure 01.5.5.

Input

Output

Figure 01.5.5: Input and Output Bit Usage

NDES

EP/08/7303

Page | 22

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

y I/O Terminal and IR Bit Allocation


The I/O terminals on the SIMATIC S7-200 s CPU basic units and expansion I/O units are shown in the following Figure 01.5.6.

No. of I/O terminals on the basic CPU unit

CPU Unit Terminals 4 Inputs/ Inputs Output s 4 Outputs

Expansion I/O Unit Terminals 4 Analog in /1 8 Inputs Analog out 4 Analog 8 in /1 Outputs Analog out

10

6 points

4 points Q0.0 to Q0.3 6 points I1.0 to I1.3

(CPU221) I0.0 to I0.5 14 8 points

(CPU222) I0.0 to I0.7 14 points I0.0 to (CPU224) I0.7 I1.0 to I1.5 30

Q0.0 to Q1.0 to Q0.5 Q1.3 10 points

I2.0 to I2.7

AIW8 AIW0 AIW2 I3.0 to I3.7 AIW4 AIW6 AGW0 Q3.0 to Q3.7 I2.0 to Q0.0 to I2.3 Q0.7 Q2.0 to Q1.0 to Q2.3 Q1.1 AIW10 AIW12 AIW14 AGW4

Figure 01.5.6: I/O Unit Mounting Locations

NDES

EP/08/7303

Page | 23

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

y Other Data Memory Areas


Besides the I/O and IR (Work Bits) area, other different data areas in the S7-200 are given in the table in Figure 01.5.7.
Area Input Output Variable Memory Bit Memory Special Memory Timer Retentive ON delay 1 ms 10 ms 100 ms T0, T64 T1 to T4 and T65 to T68 T5 to T31and T69 to T95 I0.0 to I15.7 Q0.0 to Q15.7 VB0 to VB 2047 M0.0 to M31.7 SM0.0 to SM299.7 Channels

On/Off Timer

1 ms 10 ms 100 ms

T32, T96 T33 to T36 and T97 to T100 T37 to T63 and T101 to T256 C0 to C255 AC0 to AC3 0 to 255 0 to 63

Counter Accumulator Registers Jumps/Labels Call/Subroutine

Figure 01.5.7: Table of Data Memory Areas

The Special Memory Bit (SM) is used for system clocks, flags and status information. Some of the more commonly used SM bits are shown in Fig. 01.5.8.

NDES

EP/08/7303

Page | 24

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

Bit SM0.0 SM0.1 SM0.2 SM0.3 SM0.4 SM0.5 SM0.6 SM0.7

Function Always On flag First Scan flag (On for 1 scan only) Retentive Data Lost flag Power On Reset flag 30 s off / 30 s on clock pulse 0.5 s on / 0.5 s on clock pulse Off 1 scan / on 1 scan clock pulse (Step turns ON for 1 scan) Switch in RUN position

SM1.0 SM1.1 SM1.2 SM1.3 SM1.4 SM1.5 SM1.6 SM1.7

Result of operation = 0 Overflow or illegal value Negative result Division by 0 Table Full Table Empty BCD to binary conversion error ASCII to Hex conversion error

Figure 01.5.8 Some Common Special Memory (SM) Bits

NDES

EP/08/7303

Page | 25

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.5.c Programming Procedure


In general, the programming procedure of all types of PLCs is similar and follows the same procedure as in Figure 01.5.9.

Figure 02.4.9: Flow Chart of Programming Procedure


NDES EP/08/7303 Page | 26

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.6 Programming Languages


The PLC can be programmed using three different types of languages, namely the Ladder Diagram (LAD), Function Block Diagram (FBD) and Statement List (STL). LAD and FBD are graphical programming and STL is mnemonic Code programming. Different programming languages y Ladder Diagrams y Functional Block Diagram y Statement List y Structured Text List y Sequential Function Chart

01.6.a Ladder Diagram (LAD)


Ladder logic is a method of drawing electrical logic schematics (PLCs). It was originally invented to describe logic made from relays. A program in ladder logic, also called a ladder diagram, is similar to a schematic for a set of relay circuits. Ladder logic is widely used to program PLCs, where sequential control of a process or manufacturing operation is required. Ladder logic is useful for simple but critical control systems, or for reworking old hardwired relay circuits. Most manufacturers of programmable logic controllers also provide associated ladder logic programming systems. Typically, the ladder logic languages from two manufacturers will not be completely compatible; ladder logic is better thought of as a set of closely related programming languages rather than one language. Even different models of programmable controller within the same family may have different ladder notation Ladder logic can be thought of as a rule-based language. A "rung" in the ladder represents a rule. When implemented with relays and other electromechanical devices, the various rules "execute" simultaneously and immediately. When implemented in a programmable logic controller, the rules are typically executed sequentially by software, in a loop. By executing the loop fast enough, typically many times per second, the effect of simultaneous and immediate execution is obtained. In this way it is similar to other rule-based languages, like spreadsheets or SQL. However, proper use of programmable controllers requires understanding the limitations of the execution order of rungs.

NDES

EP/08/7303

Page | 27

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

Step7-Micro/WIN (For SIEMENS PLC)

NDES

EP/08/7303

Page | 28

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

Concepts of Ladder Programming Some rules have to observe using LAD programming: (1) The number of contacts for I/Os, timers, counters, etc is unlimited. You may assign as many contacts as required (subjected to the memory capacity of the PLC, of course!).

(2) The number of contacts to be connected in series or parallel is unlimited.

(3) An output coil cannot be directly connected to the left bus line; hence the first line is incorrect. To overcome this problem, connect a contact of an always ON output relay as the starting contact as shown in the second line.

(4) All output coils must be connected as the last element in the line. Line 1 is therefore incorrect and should be modified to line 2.

NDES

EP/08/7303

Page | 29

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

(5) An output coil number can only be assigned once. The first circuit is incorrect and should be modified as shown.

(6) A rung of the ladder diagram is keyed into the PC starting from the left and moving to the right. (7) Programming for counter and other modules having more than one input must be performed in a pre-determined order.

NDES

EP/08/7303

Page | 30

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.6.b Function Block Diagram (FBD)


Functional blocks work with Boolean Math . Boolean math lets us do some vary basic functions with the bits in our registers. These basic functions typically include AND, OR and X-OR functions. Each is described below.

OR
These functions based upon the truth table below. Here, we can see that the OR function is very much related to addition. We see this because the only time the Result is true (i.e. 1) is the when operator I1 OR I2 is true (i.e. 1). obviously, when they are both true the result is true. (If I1 OR I2 is true )

I1 I2

Q1

The output status of the OR element is only 1 if at least one input is 1, i.e. at least one of the contacts is closed.

AND
This function enables us to use the truth table below. Here, we can see that the AND function is very much related to multiple. We see this because the only time the result is true (i.e. 1) is when both operators I1 AND I2 are true (i. e. 1). The AND instruction is useful when your plc doesn t have a masking function Oh yeah, a masking function enables a bit in a register to be left alone when working on a bit level.

I1 I2 Q1

The output of the AND is only 1 if all inputs are 1, i.e. all contacts are closed.
NDES EP/08/7303 Page | 31

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

EX-OR
This function enables us to use the truth table below. Here we can see that the EXOR (XOR) function is not related to anything I can think of! An easy way to remember the results of this function is to think that I1 and I2 must be one or the other case. In other words they must be opposites of each other. When they are both the same (i.e. I1=I2 result is false i.e.0) This is sometimes useful when you want to compare bits in 2 registers and highlight which bits are different. It s also needed when we calculate some checksums. A checksum is commonly used as error checking in some communications protocols.

I1 I2

The output status of the XOR is 1 if the inputs are not equivalent.

NOT

I1

The output status is 1 if the input is 0. The NOT block inverts the input status. Advantage of the NOT block, for example: PLC does not require break contacts. You simply use a make contact and the NOT block to convert these into a break contact.

NDES

EP/08/7303

Page | 32

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

Function Block Diagram (E.G.: Siemens Logo Plc)

Example for Function Box Program in SIEMENS LOGO PLC View of a circuit diagram
Load E1 is switched ON and OFF by means of the switches (S1 OR S2 AND S3). Relay K1 Picks up when condition (S1 OR S2) AND S3 is met.

PLC Program

I1 = s1 , I2 = S2 , I3 = S3 , Q1 = K1Coil

NDES

EP/08/7303

Page | 33

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.6.c Statement List (STL)


The STL displays the program as a text-based language. The STL creates control program by entering the instruction mnemonics. This text based concept is very similar to assembly language programming. The PLC executes each instruction in the order dictated by the program, from top to bottom, and then restarts at the top. Figure 01.6.1 shows an example of the STL program.

LD A =

I0.0 I0.1 Q1.0

//Read one input //AND with another input //Write value to output

Figure 01.6.1: Sample of STL Program

NDES

EP/08/7303

Page | 34

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.7 Internal Operations & Interfacing of Programmable Logic Controllers


Other than replacing hard-wired relay logic, many intelligent modules in PLC can be incorporated in applications depending on the system requirements.

1. Sequence Control
This is the largest and most common application today and is closest to the traditional logic control. The following functions are frequently performed: y y y y Input/output control logic Timing and counting Interlocking Sequencing/stepping

2. Motion Control
PLC can also use to control the linear or rotary motion of servo, stepper and hydraulic drives.

3. Process Control
PLC is now widely used to control physical variables, such as temperature, pressure, velocity, flow, etc. with feedback of performance. This type of control makes use of analog-to-digital (A-to-D) and digital-to-analog (D-to-A) conversions and arithmetic manipulations.

4. Field Bus
This type of communication is used when the I/O devices are connected in a network, where the devices can be addressed individually. The device can be an actuator, a sensor, or an intelligent module like a PID controller. It is vital to adhere to some industrial field bus standard such as Inter-Bus S, ProfiBus, DeviceNet, CAN and etc. Presently these standards are converging and evolving in the industrial world.

5. Communication
This allows PLCs to exchange data with each other or with other intelligent devices in a communication network, e.g. TCPIP network.

6. Data Management
PLCs are used to collect, analyze and manipulate data for tracking performance or report generation.

NDES

EP/08/7303

Page | 35

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.7.a Internal Operation of Programmable Logic Controllers Input /Output Addressing

As seen in earlier discussion, the CPU of a PLC does not differentiate what device is connected to which input or output terminal. It will communicate with the outside world only by sensing input relays and setting output relays. As far as the CPU is concerned, it will communicate with or address the I/O by specifying certain numbers or addresses, e.g. input relay 00000 or output relay 01000 as in Figure 01.7.1.
OUTPUT MODULE

Input Relay Input Device Output Device

CPU

Opto-Isolator

Output Relay

Figure 01.7.1: Operation of input and output relays

NDES

EP/08/7303

Page | 36

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

Operation of the Input Units


The types of input and output units used can be shown schematically (much simplified) as in Figure 02.6.1. When the pushbutton connected to terminal 00000 of the input unit is pressed, the circuit to which the PB is connected becomes a closed circuit and the internal power source will cause the LED to light. When the LED lights, the phototransistor which can be considered as a switch is closed and the input relay is energised. This will cause switching in the contacts of the relay. This arrangement of the LED with a phototransistor is known as an opto-isolator and is used for isolating the internal circuits of the PLC from the external devices to reduce the chances of damage to the PLC from short circuit currents, etc.

Operation of the Output Units


From the same Figure 01.7.1, when the CPU causes output relay 01000 to be energised in the output unit, the contact 01000 will close. The circuit connected to terminal 01000 will be closed and any device connected to this circuit will be energised by the external power supply. Note that the relay here performs an isolating function.

Input /Output Processing

The process of reading the status of the input terminals and using this status in the logical operation of a PLC and driving of the output relays as a result of logical operations is known as input/output processing. The method used for I/O processing in most PLCs is known as mass input/output copying.

To allow for rapid program execution, input and output updating may be carried out at one particular point in the program. A specific RAM (random access memory) area within the total RAM may be allocated as a buffer store between the control logic and the I/O module(s). Each input and output terminal has an address in this I/O RAM (also called the I/O image table). During the I/O copying point of the cycle, the CPU scans all the inputs (i.e. input relays) in the I/O module and copies their status into the I/O RAM. This happens at the start/end of each program cycle. As the program is executed, the stored input data is read one at a time from the I/O RAM. Logic operations are performed on the input data and the resulting output signals are stored in the output addresses of the I/O RAM. Then at the end of each program cycle the I/O copying routine transfers all the output signals from the I/O RAM to the corresponding output points (i.e. output relays), driving the output devices connected
NDES EP/08/7303 Page | 37

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

to the output module (Figure 01.7.2). These outputs are latched and retain their status until they are updated by the next I/O copying routine. Most PLCs, like the Hitachi EM, Omron C200H and Omron CPM1A, incorporate the mass I/O copying technique to read inputs and set outputs. The process of writing from RAM to the output relays and reading input relay status to RAM is known as I/O refresh.

Star t

I/O copy Copy all inputs into RAM

Program execution Fetch, decode and execute all instructions in sequence

End I/O copy Copy all outputs from O/P RAM to output unit and input all inputs to I/P RAM Fixed length delay e.g.5 ms

Progra m

Time depends on length of total program e.g. 1K program = 5 ms

Figure 01.7.2: Mass I/O Copying

01.7.b Interfacing On-Off Sensors With Programmable Logic Controllers


In the earlier description of PLC operations the input devices were represented simply by normally open contacts which when closed, will complete a circuit which energises the input relay with power via the power supply. However, sensors other than simple electro-mechanical limit switches abound in different varieties. Many of them need to be powered up and the following section will give an example of the various ways these sensors can be used if the right input modules are selected.

Sensor Outputs
On-off sensors for interfacing with programmable controllers can be proximity sensors or mechanical switches such as push-buttons, limit switches. Proximity sensors, including capacitive, inductive or optical type have a variety of outputs, which can be classified as: a) AC or DC type operating at different voltages, b) relay output, or solid state output which can be a 2-wire, 3-wire or 4-wire type.

NDES

EP/08/7303

Page | 38

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

The 3-wire solid state outputs are the most popular, especially for connection to PLCs. The 4-wire type is similar to the 3-wire except that it has both NO and NC outputs. The 3-wire or 4-wire solid state outputs can be either the NPN type (current sinking) or the PNP type (current sourcing). The 2-wire solid state outputs can be connected to AC or DC power supply. Figure 01.7.3 summarizes the common types of sensors used for interfacing to PLCs.
Sensors for interface to PCs

Mechanical Switches or Dry Contacts

DC proximity sensors

AC/DC 2-wire Proximity sensors

24V DC
LOAD

relay output
1 2 3 4 24V 5 COM NC NO

solid state output NPN


(eg Festo sensors)
+24V

PNP
+24V

LOAD

+ source

sink (-) (-)

LOAD

Figure 01.7.3: Broad Classification of Sensors

PLC Input Units and Interface Circuits


The configuration of input units varies from PLC to PLC, some incorporating power supply such as the Hitachi EM and Omron S6 while others require external power supply, such as the Omron C200, Omron CPM1A or the National FP series. One should always refer to the manual for correct circuit connection. It is, however possible to broadly classify the input units into two categories: a) b) Source type (or common positive), and Sink type (or common negative).

NDES

EP/08/7303

Page | 39

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

Interfacing of dry contact switches or relay output proximity sensors generally is simple. However, one has to be careful when using solid state sensors. Apart from consideration of voltage and current compatibility, it is important that an NPN (current sinking) sensor be matched with a source type input unit, ie. Current is sourced from the input unit to be sunk by sensor. Likewise, a PNP sensor (current sourcing) must be used with a sink type input module. Some examples of the interface connections are given in Figure 01.7.4.

Figure 01.7.4(a): Source type input module interfaced with dry contact switches and NPN sensor

NDES

EP/08/7303

Page | 40

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

Figure 01.7.4 (b): Sink-type input module interfaced with dry contact switches and PNP sensor

01.7.c Interfacing On-Off Loads With Programmable Logic Controllers


Output units of PLCs are always "dry" types of contacts i.e. the power supply to drive the load e.g. solenoid, pilot light, alarm, etc being supplied by a power source not within the PLC. The output unit merely provides a "switch" (it is isolated from the internal circuitry of the PLC) to complete the circuit to which the load and the power supply is connected. The criteria for selecting the correct type of switch depend on: i) ii) iii) Load current Load type AC or DC Switching speed

NDES

EP/08/7303

Page | 41

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

PLC Output Units


There are basically three ways of providing this "switch" as shown in the following table:
Type of Output Electromechanical Relay Output Solid State Relay Output (Triac) Transistorised Output (NPN/PNP) Load type AC/DC AC DC Load current 2A typ 1A typ 1A typ Response Time 10 ms typ 1 ms typ 0.3 ms typ

Some manufacturers may also offer CMOS/TTL compatible outputs which can drive CMOS/TTL devices directly. Figure 01.7.5 shows the terminal connections for the various types of output modules.

Transistor Output (Sink Type)

Transistor Output (Source Type)

Relay Output

Triac Type

Figure 01.7.5: Output Modules

NDES

EP/08/7303

Page | 42

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

01.8 HMI Devices in Industrial Automation


The user interface, in the industrial design field of human machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the machine which aids the operator in making operational decisions. Examples of this broad concept of user interfaces include the interactive aspects of computer operating systems, hand tools, heavy machinery operator controls, and process controls. The design considerations applicable when creating user interfaces are related to or involve such disciplines as ergonomics and psychology. A user interface is the system by which people (users) interact with a machine. The user interface includes hardware (physical) and software (logical) components. User interfaces exist for various systems, and provide a means of: y Input, allowing the users to manipulate a system y Output, allowing the system to indicate the effects of the users' manipulation Generally, the goal of human-machine interaction engineering is to produce a user interface which makes it easy, efficient, and enjoyable to operate a machine in the way which produces the desired result. This generally means that the operator needs to provide minimal input to achieve the desired output, and also that the machine minimizes undesired outputs to the human. Ever since the increased use of personal computers and the relative decline in societal awareness of heavy machinery, the term user interface has taken on overtones of the graphical user interface, while industrial control panel and machinery control design discussions more commonly refer to human-machine interfaces.

NDES

EP/08/7303

Page | 43

GIT

LOADSTAR (PVT) LTD

01 Industrial Automation

NDES

EP/08/7303

Page | 44

You might also like