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.



Page | 1



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.

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



01 Industrial Automation

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.



Page | 3



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.



Page | 4

limit switch.a Push Buttons Push buttons are widely used to give signals for control systems. the PLC will have to tap the signal from the specific automatic sensing devices like proximity switch. are types of manual input device. NDES EP/08/7303 Page | 5 . 01. which from the basic man-machine interface. Types of input signal to the PLC would be of ON/OFF logic or analogue. photoelectric sensor. By using normally open type push button can be given start signals for systems.3 Input Devices. monitoring of moving mechanism. checking on pressure and or liquid level and many others. 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. On the other hand. These input signals are interfaced to PLC through various types of PLC input module. and level sensor and so on. key pad and toggle switches.3. for detection of work piece. Similarly close button can be used to stop purposes. Mainly push buttons are two types which are normally open and close buttons. Push-buttons.GIT LOADSTAR (PVT) LTD 01 Industrial Automation 01. These are applying to switch panels of control circuits.

c Proximity sensors In 1831 Michael Faraday discovered electro-magnetic induction. Other varieties of sensors/switches exist. 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.b Limit switches Limit switches are a type of sensor that detects presence and absence. 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. Today. it eventually moves the actuator to its limit where the contacts change state. knob. lever. In its simplest form. plunger. is that they only detect metal conductors and different metal types can affect the detection range. including proximity sensors. meaning that they have some sort of arm. among others. light sensors. mechanical limit switches are switches that are mechanically activated. however. As the object makes contact with the actuator of the switch. Essentially. NDES EP/08/7303 Page | 6 . etc. The primary deficiency of these sensors. 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. electric switches. which is physically or mechanically activated by making contact with another object.GIT LOADSTAR (PVT) LTD 01 Industrial Automation 01. the higher the voltage.3. inductive proximity sensors use Faraday s Law of Electromagnetic Induction to detect the nearness of conductive materials without actually coming into contact with them.. Specifically.3.

If a metal object enters the electromagnetic field of the oscillator coil. demodulator. Proximity capacitive sensors have become increasingly popular as more user/machine interfaces are designed using touch panels to reliably respond to commands. adhere to the same principle but can detect anything that is either conductive or has different dielectric properties than the sensor s electrodes surroundings. level and switching amplifier. on the other hand. 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. eddy currents are induced in this coil which changes the amplitude of oscillation. NDES EP/08/7303 Page | 7 .GIT LOADSTAR (PVT) LTD 01 Industrial Automation Proximity capacitive sensors. They consist of an oscillator. non-interactive devices and sensitive to all metals. Inductive Proximity Switch Inductive proximity switches are no-touch. 1.

3.d Read Switches Reed switches are very similar to relays. and we contain ionic matter. a proximity capacitive sensor can detect anything that is either conductive or has different dielectric properties than the sensor s electrodes surroundings. These are very inexpensive and can be purchased for a few dollars. Unlike inductive sensors. When the magnet is far away the switch is open. but when the magnet is brought near the switch is closed. humans. except a permanent magnet is used instead of a wire coil. NDES EP/08/7303 Page | 8 . Certain sensors gauge the change by generating an electric field (e-field) and measuring the attenuations suffered by this field. exhibiting a change in capacitance in response to a change in surrounding materials. which makes us good electric conductors. being mostly water. They are excellent touchpad enablers because we.GIT LOADSTAR (PVT) LTD 01 Industrial Automation 2. 01. Capacitive Proximity Switch Proximity capacitive sensing is a technology that enables touch detection by measuring capacitance. have a high dielectric constant.

it follows that lead lengths and resistances are therefore important features. Three wire is the most commonly used and unless otherwise specified is supplied as standard. or can be considered as an acceptable additive content. producing a relatively linear change in resistance versus temperature. NDES EP/08/7303 Page | 9 . the third wire is the compensator for lead length and providing that all three wire have equal resistance. two wire configurations is sufficient. Platinum Resistance Pt100 Sensors The resistance to the flow of electricity in metallic materials varies with temperature. compensates for any ZERO or SPAN errors.e Temperature Transducers 1. a small electric current is produced proportional to the difference in the temperature. See beck discovered this effect. In general when lead lengths are short. The hot junction forms the sensor end. (Not true for all bridges).GIT LOADSTAR (PVT) LTD 01 Industrial Automation 01. This can be used to good effect in platinum resistance detectors. Because the output resistance change to temperature is relatively small. 2. Thermo Couples When two wires with dissimilar electrical properties are joined at both ends and one junction is made hot and the other cold.3. Platinum is particularly stable both electrically and mechanically and is also stable with respect to time.

i. in-cylinder pressure measurements. Infrared (IR) The The most basic design consists of a lens to focus the infrared (IR) energy on to a detector. shock and vibration. 01. As such. NDES EP/08/7303 Page | 10 . where the object is contained in a vacuum or other controlled atmosphere. where the object is surrounded by an EM field. as in induction heating.f Pressure transducers Dynamic pressure sensors are designed to measure pressure changes in liquids and gasses such as in shock tube studies. or in applications where a fast response is required. Their high rigidity and small size give them excellent high frequency response with accompanying rapid rise time capability. field blast tests..e.3. pressure pump perturbations. Some typical circumstances are where the object to be measured is moving.GIT LOADSTAR (PVT) LTD 01 Industrial Automation 3. This configuration facilitates temperature measurement from a distance without contact with the object to be measured. 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. which converts the energy to an electrical signal that can be displayed in units of temperature after being compensated for ambient temperature variation. Acceleration compensation makes them virtually unresponsive to mechanical motion. and in other pneumatic and hydraulic processes.

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. Several strain gauges can be evaluated following the principle of the Wheatstone bridge circuit. floor and shop scales. strain gauge weighing cell at output of lever mechanism. NDES EP/08/7303 Page | 11 . y Low platform scales in the tone range with several load cells y Hopper scales (container.GIT LOADSTAR (PVT) LTD 01 Industrial Automation 01. Lever less construction with only one (moment-independent) weighing cell results in extremely rugged bench.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.3. Suitable construction ensures that this resistance change is proportional to the acting deforming force. silos) with several load cells y Scale construction with lever mechanism.

4 Programmable Logic Controller (PLC) A Programmable Logic Controller. extended temperature ranges. PLC. or Programmable Controller is a digital computer used for automation of industrial processes.GIT LOADSTAR (PVT) LTD 01 Industrial Automation 01. and resistance to vibration and impact. the PLC is designed for multiple inputs and output arrangements. Programs to control machine operation are typically stored in battery-backed or non-volatile memory. otherwise unintended operation will result. such as control of machinery on factory assembly lines. 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. Unlike general-purpose computers. Module Type PLC Compact type PLC LOGO Type PLC NDES EP/08/7303 Page | 12 . immunity to electrical noise.

They include: y Greater flexibility and reliability y Easy debugging as error detection programs are often available. A programmable logic controller can be used to perform the following functions: Control Type 1. PLC systems have considerable advantages over the old relay logic systems. v. Sequential Control 2. which can be seen from the table below. Sophisticated Control 3. 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 Advantages of Programmable Logic Controller System. z ) b) Information Handling c) Analogue Control (temperature.. 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. Supervisory Control Functions a) Conventional Relay Logic Replacer b) Timers / counters c) Auto/ Semi-Auto/Manual control of machines/Processes a) Arithmetic Operations (+ ..

 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. A user familiar with relay logic can use a PLC with little training.  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.  Predictability PLCs are designed to fail predictably. humidity and electromagnetic pollution present. It also allows for easier maintenance. dust.  Programmability Most PLCs can be programmed without prior knowledge of any computer language. Most will fail so that all outputs are turned off. Troubleshooting. too. NDES EP/08/7303 Page | 14 .GIT LOADSTAR (PVT) LTD 01 Industrial Automation Programmable Logic Controllers compared to other Microprocessor based devices Although the programmable logic controller is microprocessor based. is made easy with the help of internal diagnostics.  Environmental considerations PLCs are designed to work in harsh factory environment with all the attendant temperature. 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.

state relays eliminating interfacing problems.1: Components of a Programmable Logic Controller NDES EP/08/7303 Page | 15 .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.GIT LOADSTAR (PVT) LTD 01 Industrial Automation 01.4.4.a Hardware Configuration of a Programmable Logic Controller Programmable logic controllers are microprocessor .4. A programmable logic controller system can be divided into the following blocks as shown in Figure 01.based devices specifically designed to replace the relays and hard-wired logic. They come complete with interfacing solid .

NDES EP/08/7303 Page | 16 .  Central Processing Unit (CPU) This is the "brains" of the system.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. 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.

In modern PLCs. In addition.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. These values change as the program executes. It also holds the read/write data memory. Memory size is usually measured in the number of instruction words that can be stored. 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. 4K or 8K. etc.  Input /Output Modules These provide the interface between the external control signals and the low voltage DC signals used by the CPU. the size of the word is usually 16 bits. 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. They are optically or otherwise isolated. usually 1K. 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. NDES EP/08/7303 Page | 17 .

Depending on the program and the states of inputs. data in output RAM area are then copied to the output module. the output states of the relevant output devices are then written into the output RAM memory area.4.GIT LOADSTAR (PVT) LTD 01 Industrial Automation 01. The CPU then executes the control program stored in the program memory area. At the end of each execution cycle.b PLC Operation The PLC operates internally in a way very similar to computers repetitively. NDES EP/08/7303 Page | 18 . The states of the input devices are continuously monitored and copied from input module into input RAM memory area.

5 Programming the Siemens SIMATIC S7-200 PLC 01. The basic CPUs are available with 10 to 40 I/O points.GIT LOADSTAR (PVT) LTD 01 Industrial Automation 01. 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. S7300 and S7-400. can be.2: Configuration of the SIMATIC S7-200 Programmable Logic Controller NDES EP/08/7303 Page | 19 . S7-200. into which the programming software. This training course is based on SIMATIC S7-200 series of PLC.5.5. STEP 7-Micro/WIN. The S7-200 can be connected to an IBM PC or compatible. STEP 7-Micro/WIN Software PC SIEMENS S7-200 Link with Computer Figure 01. for different application levels.5.a Configuration of the SIEMENS SIMATIC S7-200 PLC The Siemens SIMATIC S7 family comprises of three different series of PLC.2). installed (Figure 01. Siemens provides S7-200 with various types of CPU models to suit different applications need. and can be expanded by adding up to 2 to 7 numbers of expansion I/O units.

L memory is similar to V memory.Bit Memory Area (M) is used as control relays to store the intermediate status of an operation or other control information. etc. data in a set of 8 relays is known collectively as a byte (B) and each relay equals one bit of the byte. . Internal relays are similarly specified by addresses.Analog Outputs (AQ) converts a digital value into a current or voltage. For the Siemens SIMATIC. S7-200 provides 4 32-bit accumulators (AC0 to AC3).GIT LOADSTAR (PVT) LTD 01 Industrial Automation 01. . . which are known as word (W) and double word (D) respectively. limit switches. Thus.5.Local Memory Area (L) is used to store data or passing parameters to subroutines.Input Memory Area (I) is used to store status of the input devices from input modules. . Then. the PLC reacts to the input by outputting signals to external loads such as relays.Counter Memory Area (C) is used to store counter s current and preset values. etc. . In the program.Output Memory Area (Q) is used to store status of the output devices after each execution of the program logic. .Special Memory Area (SM) is used to control some special functions . except the data in L memory are local variables and those in V memory are global variables. indicator lights.Variable Memory Area (V) is used to store intermediate results of operation being performed by the program. . There are some other types of memory areas that are not used for this course.b Input / Output and Internal Relay Addressing We have seen that the PLC operates by monitoring input signals from external devices like push-buttons. NDES EP/08/7303 Page | 20 . Addresses are used to identify the various terminal points through which the PLC interacts with physical devices.Accumulators (AC) is used to pass parameters to and from subroutines and to store intermediate values used in a calculation. y Data Memory Areas The SIMATIC S7-200 can access data in the following memory areas: . programmable "internal relays" replace the relays of hard-wired circuits. . output and internal relays are usually available in groups of 8 or 16 or sometimes 32 relays. they will not mention in this course notes.Timer Memory Area (T) is used to store timer s current and preset values. according to the program in its memory. SIMATIC also handles data in a set of 16 and 32. . These input.Analog Inputs (AI) converts an analog value (such as pressure and speed) into a digital value.

the data types and then the byte address. the byte address. Bit Addressing To access a bit in a memory area.4.4shows examples of each data type of addressing mode. An example is shown in Fig. and its bit number. M and SM) can be accessed as bit.3 I 2 .GIT LOADSTAR (PVT) LTD 01 Industrial Automation y Addressing Conventions Data in most memory area (V. a word or a double word in a memory area. Figure 02. Word and Double Word Addressing To access a byte. specify the memory area identifier.3: Bit Addressing Byte.5.5. word or double word using the byte. Q. 01. I. byte. 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.bit or byte-address format. V B 100 Byte address Access as byte Memory area identifier MSB 7 LSB VB100 00 VB100 NDES EP/08/7303 Page | 21 . the address specified should include the memory area identifier.

5.5: Input and Output Bit Usage NDES EP/08/7303 Page | 22 . Word and Double Word Addressing Examples of input and output bit usage are shown in Figure 01.5.5. Input Output Figure 01.4: Byte.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 0 VD100 Figure 01.5.

0 to (CPU224) I0.5 Q1.3 Q1.0 to I0.3 10 points I2.7 I2.1 AIW10 AIW12 AIW14 AGW4 Figure 01.0 to Q0.7 14 points I0.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.0 to Q0.0 to Q2.7 - - - AIW8 AIW0 AIW2 I3.7 I1.5 14 8 points (CPU222) I0.5 30 Q0.0 to I1.0 to I1.6: I/O Unit Mounting Locations NDES EP/08/7303 Page | 23 .0 to I0.0 to I2.0 to Q1. 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.3 6 points I1. No.0 to Q0.3 (CPU221) I0.7 AIW4 AIW6 AGW0 Q3.7 Q2.6.0 to Q1.5.0 to I3.0 to I2.5.0 to Q3.3 Q0.

7 VB0 to VB 2047 M0.8.0 to I15.0 to SM299. 01.GIT LOADSTAR (PVT) LTD 01 Industrial Automation y Other Data Memory Areas Besides the I/O and IR (Work Bits) area. Area Input Output Variable Memory Bit Memory Special Memory Timer Retentive ON delay 1 ms 10 ms 100 ms T0. Some of the more commonly used SM bits are shown in Fig.0 to M31.7 SM0. flags and status information.5.0 to Q15.7. T64 T1 to T4 and T65 to T68 T5 to T31and T69 to T95 I0. other different data areas in the S7-200 are given in the table in Figure 01.7 Channels On/Off Timer 1 ms 10 ms 100 ms T32.7: Table of Data Memory Areas The Special Memory Bit (SM) is used for system clocks.5.7 Q0. NDES EP/08/7303 Page | 24 .5. 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.4 SM0.5 SM1.1 SM1.GIT LOADSTAR (PVT) LTD 01 Industrial Automation Bit SM0.5 SM0.2 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.3 SM0.1 SM0.5 s on clock pulse Off 1 scan / on 1 scan clock pulse (Step turns ON for 1 scan) Switch in RUN position SM1.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.2 SM0.0 SM0.0 SM1.6 SM1.3 SM1.5 s on / 0.6 SM0.4 SM1.8 Some Common Special Memory (SM) Bits NDES EP/08/7303 Page | 25 .

9.5.5.GIT LOADSTAR (PVT) LTD 01 Industrial Automation 01.c Programming Procedure In general. the programming procedure of all types of PLCs is similar and follows the same procedure as in Figure 01.9: Flow Chart of Programming Procedure NDES EP/08/7303 Page | 26 . Figure 02.4.

in a loop. Ladder logic is useful for simple but critical control systems. A program in ladder logic. However.6 Programming Languages The PLC can be programmed using three different types of languages. Ladder logic is widely used to program PLCs. the effect of simultaneous and immediate execution is obtained. Most manufacturers of programmable logic controllers also provide associated ladder logic programming systems. ladder logic is better thought of as a set of closely related programming languages rather than one language. It was originally invented to describe logic made from relays. namely the Ladder Diagram (LAD). typically many times per second. When implemented with relays and other electromechanical devices. 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. the various rules "execute" simultaneously and immediately. By executing the loop fast enough. Function Block Diagram (FBD) and Statement List (STL). the ladder logic languages from two manufacturers will not be completely compatible. is similar to a schematic for a set of relay circuits. When implemented in a programmable logic controller. Typically.6. A "rung" in the ladder represents a rule. also called a ladder diagram. NDES EP/08/7303 Page | 27 .GIT LOADSTAR (PVT) LTD 01 Industrial Automation 01. where sequential control of a process or manufacturing operation is required. In this way it is similar to other rule-based languages. LAD and FBD are graphical programming and STL is mnemonic Code programming. like spreadsheets or SQL. or for reworking old hardwired relay circuits. the rules are typically executed sequentially by software. proper use of programmable controllers requires understanding the limitations of the execution order of rungs. Different programming languages y Ladder Diagrams y Functional Block Diagram y Statement List y Structured Text List y Sequential Function Chart 01.a Ladder Diagram (LAD) Ladder logic is a method of drawing electrical logic schematics (PLCs).

GIT LOADSTAR (PVT) LTD 01 Industrial Automation Step7-Micro/WIN (For SIEMENS PLC) NDES EP/08/7303 Page | 28 .

(2) The number of contacts to be connected in series or parallel is unlimited. of course!). (3) An output coil cannot be directly connected to the left bus line. counters. timers.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. To overcome this problem. NDES EP/08/7303 Page | 29 . (4) All output coils must be connected as the last element in the line. You may assign as many contacts as required (subjected to the memory capacity of the PLC. hence the first line is incorrect. connect a contact of an always ON output relay as the starting contact as shown in the second line. etc is unlimited. Line 1 is therefore incorrect and should be modified to line 2.

(6) A rung of the ladder diagram is keyed into the PC starting from the left and moving to the right. NDES EP/08/7303 Page | 30 . (7) Programming for counter and other modules having more than one input must be performed in a pre-determined order.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.

NDES EP/08/7303 Page | 31 . AND This function enables us to use the truth table below. all contacts are closed.e. Boolean math lets us do some vary basic functions with the bits in our registers. when they are both true the result is true. These basic functions typically include AND.e. i. Each is described below. Here. at least one of the contacts is closed. 1) is the when operator I1 OR I2 is true (i. we can see that the OR function is very much related to addition. I1 I2 Q1 The output of the AND is only 1 if all inputs are 1. obviously. Here.e. (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. 1) is when both operators I1 AND I2 are true (i. 1). i. e. The AND instruction is useful when your plc doesn t have a masking function Oh yeah.b Function Block Diagram (FBD) Functional blocks work with Boolean Math . We see this because the only time the Result is true (i. 1).e. a masking function enables a bit in a register to be left alone when working on a bit level. OR These functions based upon the truth table below. we can see that the AND function is very much related to multiple.e. OR and X-OR functions.GIT LOADSTAR (PVT) LTD 01 Industrial Automation 01. We see this because the only time the result is true (i.6.

NDES EP/08/7303 Page | 32 . 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. Advantage of the NOT block. I1 I2 The output status of the XOR is 1 if the inputs are not equivalent. In other words they must be opposites of each other. I1=I2 result is false i.GIT LOADSTAR (PVT) LTD 01 Industrial Automation EX-OR This function enables us to use the truth table below. When they are both the same (i. for example: PLC does not require break contacts.0) This is sometimes useful when you want to compare bits in 2 registers and highlight which bits are different. A checksum is commonly used as error checking in some communications protocols. You simply use a make contact and the NOT block to convert these into a break contact.e. NOT I1 1 The output status is 1 if the input is 0. The NOT block inverts the input status.e. It s also needed when we calculate some checksums.

I3 = S3 .GIT LOADSTAR (PVT) LTD 01 Industrial Automation Function Block Diagram (E. Relay K1 Picks up when condition (S1 OR S2) AND S3 is met.: 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). PLC Program I1 = s1 . I2 = S2 .G. Q1 = K1Coil NDES EP/08/7303 Page | 33 .

0 //Read one input //AND with another input //Write value to output Figure 01. The STL creates control program by entering the instruction mnemonics.0 I0.6.6. LD A = I0. from top to bottom.GIT LOADSTAR (PVT) LTD 01 Industrial Automation 01.6. This text based concept is very similar to assembly language programming. and then restarts at the top.c Statement List (STL) The STL displays the program as a text-based language.1 shows an example of the STL program.1 Q1.1: Sample of STL Program NDES EP/08/7303 Page | 34 . The PLC executes each instruction in the order dictated by the program. Figure 01.

Sequence Control This is the largest and most common application today and is closest to the traditional logic control. This type of control makes use of analog-to-digital (A-to-D) and digital-to-analog (D-to-A) conversions and arithmetic manipulations. with feedback of performance. analyze and manipulate data for tracking performance or report generation. e. Process Control PLC is now widely used to control physical variables. pressure. ProfiBus.g. 3. It is vital to adhere to some industrial field bus standard such as Inter-Bus S. or an intelligent module like a PID controller. The following functions are frequently performed: y y y y Input/output control logic Timing and counting Interlocking Sequencing/stepping 2. The device can be an actuator. 4. CAN and etc. Communication This allows PLCs to exchange data with each other or with other intelligent devices in a communication network. 1. Presently these standards are converging and evolving in the industrial world. a sensor. such as temperature. TCPIP network. 6. flow. Motion Control PLC can also use to control the linear or rotary motion of servo. Data Management PLCs are used to collect. Field Bus This type of communication is used when the I/O devices are connected in a network. stepper and hydraulic drives. many intelligent modules in PLC can be incorporated in applications depending on the system requirements. etc.7 Internal Operations & Interfacing of Programmable Logic Controllers Other than replacing hard-wired relay logic.GIT LOADSTAR (PVT) LTD 01 Industrial Automation 01. NDES EP/08/7303 Page | 35 . where the devices can be addressed individually. 5. velocity. DeviceNet.

it will communicate with or address the I/O by specifying certain numbers or addresses. the CPU of a PLC does not differentiate what device is connected to which input or output terminal.7. As far as the CPU is concerned. OUTPUT MODULE Input Relay Input Device Output Device CPU Opto-Isolator Output Relay Figure 01. input relay 00000 or output relay 01000 as in Figure 01.7.g.a Internal Operation of Programmable Logic Controllers Input /Output Addressing As seen in earlier discussion. e.GIT LOADSTAR (PVT) LTD 01 Industrial Automation 01.1: Operation of input and output relays NDES EP/08/7303 Page | 36 .1.7. It will communicate with the outside world only by sensing input relays and setting output relays.

e. During the I/O copying point of the cycle. the contact 01000 will close. input relays) in the I/O module and copies their status into the I/O RAM.e.6. etc. when the CPU causes output relay 01000 to be energised in the output unit. This will cause switching in the contacts of the relay. 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 circuit connected to terminal 01000 will be closed and any device connected to this circuit will be energised by the external power supply.7. 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). driving the output devices connected NDES EP/08/7303 Page | 37 . the stored input data is read one at a time from the I/O RAM.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. The method used for I/O processing in most PLCs is known as mass input/output copying. When the LED lights. the circuit to which the PB is connected becomes a closed circuit and the internal power source will cause the LED to light. 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. Note that the relay here performs an isolating function. This happens at the start/end of each program cycle. As the program is executed. the CPU scans all the inputs (i. Logic operations are performed on the input data and the resulting output signals are stored in the output addresses of the I/O RAM.1. Operation of the Output Units From the same Figure 01. Each input and output terminal has an address in this I/O RAM (also called the I/O image table). output relays). input and output updating may be carried out at one particular point in the program. When the pushbutton connected to terminal 00000 of the input unit is pressed. the phototransistor which can be considered as a switch is closed and the input relay is energised.1. 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. To allow for rapid program execution.

Omron C200H and Omron CPM1A. will complete a circuit which energises the input relay with power via the power supply. limit switches. which can be classified as: a) AC or DC type operating at different voltages.2: Mass I/O Copying 01.g. Most PLCs. like the Hitachi EM. However. incorporate the mass I/O copying technique to read inputs and set outputs. inductive or optical type have a variety of outputs. including capacitive.GIT LOADSTAR (PVT) LTD 01 Industrial Automation to the output module (Figure 01.2). The process of writing from RAM to the output relays and reading input relay status to RAM is known as I/O refresh. b) relay output. 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.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. Sensor Outputs On-off sensors for interfacing with programmable controllers can be proximity sensors or mechanical switches such as push-buttons. NDES EP/08/7303 Page | 38 . sensors other than simple electro-mechanical limit switches abound in different varieties.5 ms Progra m Time depends on length of total program e.7. 3-wire or 4-wire type. or solid state output which can be a 2-wire. Proximity sensors. Star t I/O copy Copy all inputs into RAM Program execution Fetch.7. 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. These outputs are latched and retain their status until they are updated by the next I/O copying routine.7.g. 1K program = 5 ms Figure 01.

however possible to broadly classify the input units into two categories: a) b) Source type (or common positive). NDES EP/08/7303 Page | 39 . The 4-wire type is similar to the 3-wire except that it has both NO and NC outputs.7. Figure 01.3 summarizes the common types of sensors used for interfacing to PLCs. such as the Omron C200.3: Broad Classification of Sensors PLC Input Units and Interface Circuits The configuration of input units varies from PLC to PLC.GIT LOADSTAR (PVT) LTD 01 Industrial Automation The 3-wire solid state outputs are the most popular.7. One should always refer to the manual for correct circuit connection. 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. some incorporating power supply such as the Hitachi EM and Omron S6 while others require external power supply. 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. especially for connection to PLCs. It is. and Sink type (or common negative). Omron CPM1A or the National FP series.

one has to be careful when using solid state sensors. Current is sourced from the input unit to be sunk by sensor.7. a PNP sensor (current sourcing) must be used with a sink type input module.7.4. Apart from consideration of voltage and current compatibility. Some examples of the interface connections are given in Figure 01. However.GIT LOADSTAR (PVT) LTD 01 Industrial Automation Interfacing of dry contact switches or relay output proximity sensors generally is simple. it is important that an NPN (current sinking) sensor be matched with a source type input unit.4(a): Source type input module interfaced with dry contact switches and NPN sensor NDES EP/08/7303 Page | 40 . ie. Likewise. Figure 01.

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. alarm.c Interfacing On-Off Loads With Programmable Logic Controllers Output units of PLCs are always "dry" types of contacts i.e.7. pilot light. solenoid. 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 . etc being supplied by a power source not within the PLC.GIT LOADSTAR (PVT) LTD 01 Industrial Automation Figure 01.7. the power supply to drive the load e.4 (b): Sink-type input module interfaced with dry contact switches and PNP sensor 01.g.

3 ms typ Some manufacturers may also offer CMOS/TTL compatible outputs which can drive CMOS/TTL devices directly.7.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. Figure 01.7. Transistor Output (Sink Type) Transistor Output (Source Type) Relay Output Triac Type Figure 01.5: Output Modules NDES EP/08/7303 Page | 42 .5 shows the terminal connections for the various types of output modules.

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

GIT LOADSTAR (PVT) LTD 01 Industrial Automation NDES EP/08/7303 Page | 44 .

Sign up to vote on this title
UsefulNot useful