Professional Documents
Culture Documents
01 Industrial Automation
NDES
EP/08/7303
Page | 1
GIT
01 Industrial Automation
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
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
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
01 Industrial Automation
NDES
EP/08/7303
Page | 5
GIT
01 Industrial Automation
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
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.
NDES
EP/08/7303
Page | 7
GIT
01 Industrial Automation
NDES
EP/08/7303
Page | 8
GIT
01 Industrial Automation
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
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.
NDES
EP/08/7303
Page | 10
GIT
01 Industrial Automation
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
01 Industrial Automation
NDES
EP/08/7303
Page | 12
GIT
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:
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
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
01 Industrial Automation
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 D ev ic es
O u tpu t D ev ic es
NDES
EP/08/7303
Page | 15
GIT
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
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
01 Industrial Automation
NDES
EP/08/7303
Page | 18
GIT
01 Industrial Automation
PC
SIEMENS S7-200
NDES
EP/08/7303
Page | 19
GIT
01 Industrial Automation
NDES
EP/08/7303
Page | 20
GIT
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)
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
01 Industrial Automation
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
NDES
EP/08/7303
Page | 22
GIT
01 Industrial Automation
Expansion I/O Unit Terminals 4 Analog in /1 8 Inputs Analog out 4 Analog 8 in /1 Outputs Analog out
10
6 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
NDES
EP/08/7303
Page | 23
GIT
01 Industrial Automation
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
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
01 Industrial Automation
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
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
NDES
EP/08/7303
Page | 25
GIT
01 Industrial Automation
GIT
01 Industrial Automation
NDES
EP/08/7303
Page | 27
GIT
01 Industrial Automation
NDES
EP/08/7303
Page | 28
GIT
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!).
(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
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
01 Industrial Automation
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
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
01 Industrial Automation
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
01 Industrial Automation
LD A =
//Read one input //AND with another input //Write value to output
NDES
EP/08/7303
Page | 34
GIT
01 Industrial Automation
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
01 Industrial Automation
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
CPU
Opto-Isolator
Output Relay
NDES
EP/08/7303
Page | 36
GIT
01 Industrial Automation
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
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
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
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
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
DC proximity sensors
24V DC
LOAD
relay output
1 2 3 4 24V 5 COM NC NO
PNP
+24V
LOAD
+ source
LOAD
NDES
EP/08/7303
Page | 39
GIT
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
01 Industrial Automation
Figure 01.7.4 (b): Sink-type input module interfaced with dry contact switches and PNP sensor
NDES
EP/08/7303
Page | 41
GIT
01 Industrial Automation
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.
Relay Output
Triac Type
NDES
EP/08/7303
Page | 42
GIT
01 Industrial Automation
NDES
EP/08/7303
Page | 43
GIT
01 Industrial Automation
NDES
EP/08/7303
Page | 44