Programmable Logic Controller
Programmable Logic Controller
Programmable Logic Controller
e-TEXTBOOK
on
PROGRAMMABLE LOGIC CONTROLLER
for
V Semester DEEE
Convener for EEE Discipline:
Er.R.Anbukarasi ME.,
Principal,
Tamilnadu Polytechnic College,
Madurai, 625011.
Validated by:
THIRU. M.VARATHARAJAN,
ASSISTANT PROFESSOR / EEE
THIAGARAJAR COLLEGE OF ENGINEERING,
MADURAI.
RATIONALE
Various control operations are to be performed automatically and sequentially on the
electrical machines to suit the industrial requirements. Programmable controllers are mainly
employed to control the process in industries. In order to impart knowledge on programmable
Logic Controller this theory subject is introduced.
OBJECTIVES
Unit :1
After completing this chapter, students should able to:
Explain the meaning of automation and List the types of automation
Define PLC and Explain why their use is valuable
Explain what PLC can do
Compare fixed and modular PLC
Explain the advantages of PLC
Explain the functions of various elements of power supply unit
Unit :2
After completing this chapter, students should able to:
Know the difference between digital and analog input and output signals
Observe how digital field device information gets into a PLC
Observe how analog field device information gets into a PLC
Understand I/O addresses and how they are used in a PLC
Unit :3
After completing this chapter, students should able to:
Describe PLC timer instruction and differentiate between a non-retentive and retentive timer
Program the control of outputs using the timer instruction
List and describe the functions of PLC counter instructions
Create PLC programs involving program control instructions, math instructions.
Unit :4
After completing this chapter, students should able to:
Explain the functionality of different levels of industrial network
Explain the concept of network topology and network protocols
DETAILED SYLLABUS
33072 - PROGRAMMABLE LOGIC CONTROLLER (M - SCHEME)
Types of programming methods – Types of programming devices – Logic Functions – AND Logic –
OR Logic – NOT Logic - Relay type instructions –Timer Instructions – ON Delay and OFF Delay
Timer – Retentive Timer Instruction – Cascading Timers – Counter Instruction – UP Counter –
DOWN Counter – UP/DOWN Counter – Cascading Counters – Program Control Instructions – Data
Manipulation Instruction – Data Compare Instructions – Math Instructions - Sequencer Instructions -
PID Instruction – PWM Function – Simple programs using above instructions.
Develop ladder logic for: Bottle filling system – Automatic car parking system - EB to Generator
Changeover system – Batch process – Elevator system - Automatic Star-Delta Starter – Traffic light
control.
Levels of industrial network – Network Topology – Network Protocol – OSI Reference Model -
Networking with TCP / IP Protocol - I/O Bus networks – Block diagram of I/O Bus networks –
Types of I/O Bus networks - Protocol standards – Advantages of I/O Bus networks - Gateway –
Token passing – Data Highway – Serial Communication – Device Net – Control Net – EtherNet –
Modbus – Fieldbus – Profibus - Subnetting – Subnet mask - File transfer protocol.
Computers in Process control – Types of processes - Structure of control system – ON/OFF Control
– Closed loop control - PID Control – Motion Control – Block diagram of Direct Digital Control -
Supervisory Control and Data Acquisition (SCADA) – Block diagram of SCADA – Features of
SCADA – Functions of SCADA - SCADA software - Data Loggers – Tags – Alarms - landlines for
SCADA – use of modems in SCADA..
REFERENCE BOOKS:
OBJECTIVES:
1.0 Introduction:
The word “Automation” was first used at the Ford motor company in the late 1940. One
definition of automation was proposed in 1947 as “the automatic handling of work pieces into,
between, and out of machines.
The word ‘Automation’ is derived from Greek words “Auto” (self) and “Matos” (moving).
Automation therefore is the mechanism for systems that “move by itself”.
The objective of automation is to cause the work system to be automatic that is self-acting,
self-regulating and self-reliant.
1.1 Automation:
Automation is a set of technologies that results in operation of machines and systems without
significant human intervention and achieves performance superior to manual operation.
1. Manufacturing automation:
a. Fixed Automation
b. Programmable Automation
c. Flexible Automation
2. Non-Manufacturing automation:
a. Office Automation
b. Home Automation
c. Building Automation
Fixed automation refers to the use of special purpose equipment to automate a fixed sequence
of processing or assembly operations. This system involves automation and integration of various
fixed sequences of operation. It is also known as hard automation. It is used to produce product such
as gears, nuts and bolts etc., High specialized equipment, called special purpose machine tools are
utilized to produce a product very efficiently and at high production rates.
Advantages: Disadvantages:
i) Bottling plants
Advantages: Disadvantages:
i) Flexibility to deal with variation and changes i) New products requires long set up time
in product
Applications:
ii) Low unit cost for large batches
i) CNC Lathe
iii) High production rate
In flexible automation system, different products can be produced on the same equipment in
any order or mix. It is also called as Flexible Manufacturing System (FMS). The ability of the
system to produce various combination and schedule of products makes this system highly flexible
Advantages: Disadvantages:
ii) Flexibility to deal with products design ii) High unit cost compared to fixed and
variations programmable automation
i) Industrial Robots
This include office automation and integrated data processing mechanism, automatic
elevators, transportation ticket selling equipments etc.,
Office automation refers to the varied computer machinery and software used to digitally
create, collect, store, manipulate, and relay office information needed for accomplishing basic tasks.
The information may be of many processes and formats-payroll preparation, transportation,
reservation, scheduling, banking, security transaction and cost price analysis etc., Increased
productivity per office worker is the indeed a major advantages of office automation. Information
required for business management is rapidly managed, integrated and sent long distance through
office automation.
Home automation refers to the automatic and electronic control of household features,
activity, and appliances. Home automation systems are composed of hardware, communication and
electronic interfaces that work to integrate electrical devices with one another. The three main
elements of a home security system are sensors, controllers and actuators. Sensors can monitor
changes in daylight, temperature or motion detection; home automation systems can then adjust
settings to the preferred levels of a user. Controllers refer to the devices—personal computers,
tablets or smartphones—used to send and receive messages about the status of automated features in
users’ homes. Actuators may be light switches, motors or motorized valves that control a mechanism
or function of a home automation system.
1.3Advantages of automation:
Increase in productivity
Reduction in production cost
Minimization of human fatigue.
Less floor area required
Reduced maintenance requirement
Better working conditions for workers
Effective control over production process
Improvement in production quality
Reduction in accidents
Uniform components are produced.
More safety
1.3.1Disadvantages of automation:
The programmable Logic Controller is an assembly of solid state digital logic elements
designed to make logical decision and provide control. PLCs are used for the control and operation
of manufacturing process equipment and machinery. The PLC is an industrially hardened computer
designed to perform control functions in industrial environment. This means that unlike your
personnel computer, the PLC must be capable of operating in high temperature with poor power
conditions in dusty, dirty, corrosive atmospheres and withstand shock and vibration. In addition,
PLCs are designed to be programmed by individuals who are familiar with motor control circuits.
There, most PLC program in a language that resembles ladder diagrams, which makes learning PLCs
very easy for most electricians. In addition to switching functions, PLCs can also perform counting,
calculations, comparison, processing of analog signals and more.
In the late 1960s the American motor car manufacturer General Motors was interested in the
application of computers to replace the relay sequencing used in the control of car plants.
The Hydramatic Division of the General Motors Corporation specified the design criteria for
the first programmable controller in 1968. Their primary goal was to eliminate the high costs
associated with inflexible, relay controlled systems.
The first PLC was invented in 1969 by Richard Dick E. Morley, who was the founder of the
MODICON Corporation.
The specifications required a solid-state system with computer flexibility able to:
i) Survive in an industrial environment
ii) Be easily programmed and maintained by plant engineers and technicians
iii) Be reusable
iii)Power supply:
Power supply is necessary to convert 120V or 240V a.c into the low voltage d.c (+5V & -5V)
required for processor and internal power required for the I/O modules. This power supply
unit does not supply power for the actual input or output devices. This can be built into the
PLC or be an external unit. Common voltage levels required by the PLC are 24Vdc, 120Vac,
220Vac etc.,
Output Modules:
It receives the signal from the CPU.
It converts the controller signals into external signals used to control the machine or
process.
It switches ON or OFF the outputs.
It provides isolation between CPU and output stage.
The status of output signals are stored in the output image table.
3. Programming device:
The programming unit allows the engineer or technician to enter and edit the program to be
executed. The programming device must be connected through cable to the controller when entering
or monitoring the control program.
The CPU accepts input signal from sensors like push buttons, limit switches, analog sensors,
selector switches, and thumbwheel switches.
Stores the status of input in the memory area called input image table.
PLC scan is a sequential process in which the PLC processor performs specific duties on a cyclic
basis. During its operation, the CPU completes three processes:
i) Reads the input data from the field devices via the input interfaces
ii) Executes the control program stored in the memory system
iii) Writes the output devices via the output interfaces.
This process of sequentially reading the inputs, executing the program in memory, and
updating the outputs is known as scanning. Figure 1.3 illustrates a graphic representation of a scan.
Figure 1.4 illustrates this memory organization, known as a memory map. The memory system
is composed of two major sections:
1. System memory
2. Application memory
1. System Memory:
The executive and scratch pad areas are hidden from the user and can be considered a single
area of memory that, for our purpose, is called system memory.
1. Number of I/Os
2. Size of control program
3. Data collecting requirements
4. Supervisory functions required
5. Future Expansion
1. Discrete 2. Analog
1.14.1Discrete :
PLC can only understand a signal that is ON or OFF. Binary 1 indicates that a signal is
present, or the switch is ON. Binary 0 indicates that the signal is not present or the switch is OFF.
The logic concept exists only in two
predetermined states. In logic input (digital)
systems, these two-state conditions can be
thought of as signals that are present or not
present, activated or not activated, high or
low, on or off, etc.
Here, binary 1 represents the presence
of a signal, while binary 0 represents the
absence of the signal. In digital systems, these
two states are actually represented by two
distinct voltage levels, +V and 0V. One
voltage is more positive than the other. Often,
binary 1 (or logic 1) is referred to as TRUE, Figure 1.5 Logic Input
ON, or HIGH, while binary 0 (or logic 0) is
referred to as FALSE, OFF, or LOW.
1.14.2 Analog:
An analog input is an input signal that has a continuous signal. Analog input modules, are
used in applications where the field device’s signal is continuous. Typical analog inputs may vary
from 4 to 20mA or 0-10 volts d.c. Analog signals are used to represent changing values such as
speed, temperature, weight and level. This analog signal is converted into binary data that can be
stored in the data table and used by the PLC when it solves the PLC program.
A discrete output can either turns a device ON or OFF such as lights, LEDs, small motors,
and relays. Some examples are motors that need just be ON or OFF, Lighting, solenoid valves, door
locks. Digital output modules are available for DC output, AC output or a mix.
Analog output (AO) are for variable level or range of output between OFF or stopped and
ON or full speed as for an electric motor for instance. Examples of analog outputs are a VFD
(Variable Frequency Drive), a valve position actuator, and a industrial variable power supply.
The output signal can be divided into 32,767 increments and represented in a 16 bit word. To
achieve precision in controlling the valve, the 0 to 10 volt signal will be split into 32,767 steps. Since
the output module automatically converts the 16 bit output word to the proper analog value.
Example of analog output could be a valve in a tank filling application. The positioning of
the valve can be represented by a voltage level of zero volts when the valve is closed and upto +10V
dc when the valve is completely open. Any voltage between 0V dc and 10V dc would represent how
far open the valve would be compared to its fully open state. The analog output module transforms a
digital bit value from the processor's output status table to an analog output voltage or current
level. Inside the analog output module a digital to analog converter (D/A converter) is the solid state
device that makes the conversion.
Usually, PLC power supplies require input from an AC power source; however, some PLCs
will accept a DC power source.
I/O Module need : 120 VAC or 220 VAC or 24 VDC
CPU need : +5V and -5V
Step down transformer: The 230 volt a.c voltage is connected to the primary of the transformer.
Then the transformer step down the a.c voltage, to the level required for the desired d.c output.
Converter /rectifier:An electronic circuit used for converting a.c voltage into unidirectional voltage
is called as converter/rectifier. It changes the bidirectional a.c into a pulsating, unidirectional dc
waveform. Internally a transformer step-down the voltage to an appropriate level. Then bridge
rectifier produce pulsating dc output.
Filter:
The filter consists of internal circuitry, including capacitors and resistors or inductors. This
circuit is used to reduce the ripple content in the pulsating d.c and tries to make it smoother.
Regulator:
Disadvantages:
i) Limited number of inputs and outputs
ii) Not suited for future expansion
iii) If part of the unit fails, need to replace entire unit.
1. SIEMENS
2. Allen Bradley
3. Omron
4. GE Fanuc
5. MODICON
6. Keyence
7. Mitsubishi
8. Toshiba
9. Honeywell
10. Festo Corp.
MODEL QUESTIONS
OBJECTIVES:
i) Power section:
A DC input module interfaces with field input devices that provide a DC output voltage. The
difference between a DC input interface and an AC/DC input interface is that the DC input does not
contain a bridge circuit, since it does not convert an AC signal to a DC signal. The input voltage
range of a DC input module varies between 5 and 30 VDC.
i) Power Section:
The bridge rectifier circuit of the power section converts the incoming AC signal to a DC-
level signal. It then passes the signal through a filter circuit, which protects the signal against
bouncing and electrical noise on the input power line. Threshold circuit detects if the incoming
signal has reached or exceeded a predetermined value for a predetermined time.
i) Logic Section:
During normal operation, the processor sends an output’s status, according to the logic
program, to the module’s logic circuit. If the output is to be energized, the logic section of the
module will latch, or maintain, a 1. This sends an ON signal through the isolation circuit, which in
turn, switches the voltage to the field device through the power section of the module. The LED in
the logic circuit is used to indicate the presence of a logic 1 signal in the logic section.
i) Logic Section:
During normal operation, the processor sends an output’s status, according to the logic
program, to the module’s logic circuit. If the output is to be energized, the logic section of the
module will latch, or maintain, a 1. This sends an ON signal through the isolation circuit, which in
turn, switches the voltage to the field device through the power section of the module. The LED in
the logic circuit is used to indicate the presence of a logic 1 signal in the logic section.
The analog output modules converts processed digital values from the CPU into equivalent
analog signals, typically in the range of 0 -10V or 4 -20mA, to operate analog output devices using
digital to analog converter.This analog output value is proportional to the digital numerical value
received by the module.
Analog output modules are selected to send out either a varying current or voltage signal. An
analog output could send a 4 to 20mA signal to a variable speed drive. The drive will control the
speed of a motor in proportion to the analog signal received from analog output module.
Example of analog output field devices: Analog valves, Actuators, Chart recorders, Electric
motor drives, analog meters and pressure transducers.
i) ASCII I/O MODULE ASCII I/O modules allow the interfacing of bar code readers,
meters, printers and data terminals to a PLC.
ii) RS-232C Interface It is used to connect a PLC to telephone lines using a modem.
Module By using this facility operator can modify or edit program
from remote place.
4 Remote I/O Subscanner It is used to scan the status of I/O and relieves the burden of
the CPU.
5 RTD Module A RTD input module interfaces a PLC to RTD temperature-
sensing elements and other types of resistance input devices
such as potentiometers.
6 Stepper Motor Control It provides a digital output pulse train for stepper motor
Module application.
7 Thermocouple/Millivolt It converts inputs from various thermocouple or millivolt
Module devices into values that can be input and stored into PLC data
tables.
8 TTL Module It allows the transmitting and receiving of TTL signals for
communication with the PLC processor.
# Term Description
1 Nominal Input Voltage It specifies the magnitude (e.g., 5 V, 24 V, 230 V) and type
(AC or DC) of user-supplied voltage that a module is
designed to accept.
8 Leakage Current This value specifies the amount of current still conducting
through an output circuit even after the output has been
turned off.
# Term Description
1 Channels per module Circuits on analog I/O modules are often referred to as
channels. These modules normally have
4, 8, or 16 channels.
2 Input current/voltage range These are the voltage or current signal ranges that an analog
input module is designed to accept.
3 Output current/voltage It defines the current or voltage signal ranges that a particular
range analog output module is designed to output under program
control.
4 Input protection Analog input circuits are usually protected against
accidentally connecting a voltage that exceeds the specified
input voltage range.
5 Resolution The resolution of an analog I/O module specifies how
accurately an analog value can be represented digitally.
6 Input impedance and For analog I/Os, these values must be matched to the external
capacitance device connected to the module.
2.6 Sensor:
Sensors are devices used to provide information on the presence or absence of an object.
Sensors are connected to the input of a PLC. A pushbutton is one example of a sensor that is
connected to the PLC input. An electrical signal is sent from the pushbutton to the PLC indicating
the condition (open/closed) of the pushbutton contacts.
When a magnet is brought close to the switch, the strips become magnetized and attract each
other. As the permanent magnet is moved further away, the contact tab ends are demagnetised and
return to their original positions. The magnetic reed switch is also inertia free. Because of the sealed,
they are unaffected by dust, humidity, and fumes. When the switch contact is operated by an
electromagnet, it is known as reed relay. Such a switch is widely used with burglar alarms.
An oscillator
An adjustment potentiometer
Capacitive proximity sensors are similar in size, shape, and concept to inductive proximity
sensors. However, unlike inductive sensors which use induced magnetic fields to sense objects,
capacitive proximity generate an electrostatic field and reacts to changes in capacitance caused when
a target enters the electrostatic field.
When the target is outside the electrostatic field, the oscillator is inactive. As the target
approaches, a capacitive coupling develops between the target and the capacitive probe. When the
capacitance reaches a specified threshold, the oscillator is activated, triggering the output circuit to
switch states between ON and OFF.
The ability of the sensor to detect the target is determined by the target’s size, dielectric
constant and distance from the sensor. The larger the target’s size, the stronger the capacitive
coupling between the probe and the target. Materials with higher dielectric constants are easier to
detect than those with lower values. The shorter the distance between target and probe, the stronger
the capacitive coupling between the probe and the target.
i) Thru-beam Sensor
ii) Retro reflective sensor
iii) Diffuse mode sensor
2.10.1 Thru-beam Sensor:
Digital output modules take TTL-level signals from a measurement system to control an
SSR’s output. A bleeder resistor assures that the load will turn off when the SSR’s output achieves a
high-impedance state.
1. Mitsubishi PLC:
a. Input Address: X400, X401, X402 etc Where, X - Input
b. Output address: Y430, Y431, Y432 etc., Y - Output
2. Siemens PLC:
Input: I0.0, I0.1, I0.2 etc., Where, I - Input
Output: Q0.0, Q0.1, Q0.2 etc., Q - Output
Example:
Example:
Input: I:0/0, I:0/1, I:0/2
Output: O:0/0, O:0/1, O:0/2
1 With neat sketch explain the operation of A.C discrete input module.
2 With neat sketch explain the operation of D.C discrete input module.
3 With neat sketch explain about sinking and sourcing input module.
4 Explain the working of limit switch and reed switch with neat sketch.
5 Briefly explain about different types of photo electric sensor.
6 With neat sketch explain the operation of inductive type proximity sensor.
7 With neat sketch explain about sinking and sourcing output module.
8 With neat sketch explain the operation of A.C discrete output module.
9 With neat sketch explain the operation of D.C discrete output module.
10 With neat sketch explain the operation of relay type output module.
11 With neat sketch explain the operation of transistor type output module.
12 With neat sketch explain the operation of TRIAC type output module.
13 Briefly explain about surge suppression in PLC output.
14 With suitable example explain about analog output.
OBJECTIVES:
After studying this chapter, the student will be able to:
Explain the different types of PLC programming methods.
Develop ladder logic using relay type instruction, Timer and counter instructions.
Develop ladder logic diagram for Bottle filling system, Automatic car parking system,
EB to Generator Changeover system, Batch process, Elevator system, Automatic Star-
Delta Starter and Traffic light control etc.,
The IEC (International Electrotechnical Commission) has created a standard (ICE 1131-3)
for five programming languages for PLC. These five languages are known as:
It is a graphical language for depicting signal and data flows through functional blocks. A
FBD program is constructed using function blocks that are connected together to define the data
exchange. This programming language is a graphic language that uses a library functions in
combination with custom functions to create programs. The inputs and outputs of function
blocks can be inverted.
Ladder programming has evolved from the wiring diagrams that are used in the car
industry for describing the relay control schemes. This method is easy to understand by people
who are familiar with simple electronic or electrical circuits. Also it is well accepted by
electrician an d plant technician. Faults can be quickly traced is the advantage of this method.
The ladder symbols and facilities vary between different PLC products. It has limited facilities
for building complex sequences.
Ladder diagram are very similar to ladder schematics. A ladder diagram is a symbolic
representation of an electrical circuit.
A very commonly used method of programming PLCs is based on the use of ladder
diagrams. Writing a program is then equivalent to drawing a switching circuit. The ladder
diagram consists of two vertical lines representing the power rails. Circuits are connected as
horizontal lines, i.e. the rungs of the ladder, between these two verticals.
i) The vertical lines of the diagram represent the power rails between which circuits are
connected.
ii) Horizontal lines represent rung of a ladder.
iii) Input devices are connected towards left rail.
iv) Output devices are connected towards right rail.
v) A ladder diagram is read from left to right and from top to bottom. The top rung is read
from left to right. Then the second rung down is read from left to right and so on.
vi) Each rung must start with an input or inputs and must end with at least one output.
The inputs and outputs are all identified by their addresses, the notation used depending on the
PLC manufacturer.
M SCHEME_33072 COURSE MATERIAL 47
Comparison:
Programming device:
A Programming device is needed to enter, modify, monitor and troubleshoot the PLC
program.
Once the program has been entered and the PLC is running, the programming device may
be disconnected.
A hand held programmers are smaller, cheaper and more portable. This unit contain
multicolored, multifunction keys, and LCD or LED display window. The keys are used entering
and editing the instruction, navigation keys for moving around the program. It has minimum
display capability. It is well suited for parameter changes in the user program.
2. Low cost
4. Compact size
Figure 4.11 Handheld Instrument
5. Works with industrial environment
It is designed for programming and monitoring the PLC. They are not capable of
performing other computer functions. It consists of a keyboard, Video Display Terminal (VDT)
and necessary electronic circuits and memory unit. Most dedicated programmer keyboards have
electrical symbol keys for NO, NC, Timers etc., VDT is used to give visual display of the
program.
Disadvantages of PC programmer:
3.3.1 Logic:
An AND gate is a device with two or more inputs and one output.
The AND gate output is 1 only if all inputs are 1.
In Practical application, when push button PB1 and PB2 are operated, the alarm gives sound.
The AND gate operates like a series circuit that produces an output voltage when a voltage
appears at each of its inputs.
An OR gate can have any number of inputs but only one output.
The OR gate output is 1 if one or more inputs are 1.
In Practical application, when either PB1 or PB2 is operated, the alarm gives sound.
The OR gate is essentially a parallel circuit that produces an output voltage when a voltage
appears at any input.
Relay instructions form the category of programming instructions that deals with the
simple energizing and de-energizing of inputs and outputs. Contacts and coils fall into this
category.
Instruction Used to
XIC – Examine if closed Examine a bit for an ON condition
XIO – Examine if open Examine a bit for an OFF condition
OTE – Output Enable Turn ON or OFF a bit
OTL – Output Latch Latch a bit ON
OTU – Output Unlatch Unlatch a bit OFF
ONS – One shot Detect an OFF to ON transition
OSR –One Shot Rising Detect an OFF to ON transition
OSF – One Shot Falling Detect an ON to OFF transition
A one-shot rising instruction is not a coil instruction, but rather, a contact instruction.
This instruction is used to energize an output coil for only one scan.
It is usually the last contact in a rung, located just before the output coil.
This instruction’s reference address bit can be located in either the binary file (file 3) or
the integer file (file 7).
Its address cannot be shared by another contact or coil, and it cannot correspond to a real
input or output device.
Also, the MicroLogix allows only one one-shot rising instruction per rung.
ONS or the one shot instruction is an instruction used to trigger a signal for one scan of the
plc. PLCs generally scan their ladder programs many times per second and can execute things
over and over again quite quickly. However with a one shot you can execute something for one
scan.
Preset: (PRE)
The preset word is the set point of the timer.
The preset word has a range of 0 through 32767 and is stored in binary form.
The preset will not store a negative number.
Accumulated: (ACC)
The accumulated value word is the value that increments as the timer is timing.
The accumulated value will stop incrementing when its value reaches the preset
value.
Time base:
Timer instruction also requires that you enter a time base which is either 1.0s or 0.01 s or
0.001s.
Actual time delay = Preset Value x Time base
Ex: Preset value = 50, Time base = 0.01s,
Actual Time delay = Preset value x time base = 50 x 0.01s = 5 sec.
As the timer times, the accumulated value increases until it equals the preset value. At
that point, the timer timing bit (TT) will become a 0, and the done bit (DN) will become a
1, meaning that the done output (DN) will turn on.
This done output (DN) is the timer’s delay action contact.
The length of the time delay can be adjusted by changing the preset value.
Sequence of operation:
1. When the input I:0.0/0 is closed, it will cause the timer’s enable output (EN) to turn ON.
2. At the same time the timer starts counting and counts until the accumulated value equals the
preset value.
3. For example the preset time for this timer is 4 seconds.
M SCHEME_33072 COURSE MATERIAL 56
4. When the accumulated value reaches 4 seconds, the done bit (DN) goes from false to true
and timer timing bit (TT) goes from true to false and causing the output coil O:0/0 to turn
on.
5. When input I:0.0/0 goes false, the timer instruction goes false and also resets, at which time
the control bits are all reset and the accumulated value resets to 0.
The timer OFF delay instruction is also a block-format instruction that is represented by
the symbol shown in Figure below.
This block has two outputs:
• an enable output coil (EN)
• a done output coil (DN)
A timer OFF delay instruction de-energizes its done output (DN) after the timer block’s
input turns off and a specified delay has occurred.
Thus, the timer OFF delay instruction is also called a timer OFF-delay de-energize
instruction.
Sequence of Operation:
The done output (DN) will be off when the program is first started and the timer’s input
is off.
When the input logic turns on, both the block’s enable output (EN) and done output (DN)
will turn on. However, the timer will not start timing because it is waiting for an OFF
signal instead of an ON signal
When the block’s input turns off, the enable output will turn off and the timer will start
timing. The done output will stay on because it is waiting for the timer to time out before
it will turn off.
M SCHEME_33072 COURSE MATERIAL 57
Once the accumulated value equals the preset value, the timer will stop timing and the
done output (DN) will turn off, implementing the OFF-delay de-energize function.
This done output (DN) is the timer’s delay action contact.
The length of the time delay can be adjusted by changing the preset value.
A retentive timer instruction operates much like a timer ON-delay instruction. A retentive
timer, however, can stop timing and then start timing again without its accumulated value
resetting to 0.
When the input logic turns on, the enable output will turn on, and the timer will start
timing.
If the input logic turns off, the enable output will turn off, and the timer will stop timing.
The accumulated value, however, will not reset to 0.
When the timer starts timing again, it will pick up where it left off.
When the accumulated value finally reaches the preset value, the done output will turn
on.
Once a retentive timer has timed out, its done output will remain on even if its input logic
and enable output turn off.
A reset instruction must be used to turn the done output off and reset the timer’s
accumulated value.
The RES instruction has the same address as the timer it is to reset.
The programming of two or more timers together is called cascading. The timer can be
interconnected or cascaded to satisfy any required control logic.
i) Motor starter coil M1 is energized when the momentary start pushbutton PB2 is actuated.
ii) As a result, motor 1 starts, contact M1 closes to seal in PB2, and timer coil T4:1 is
energized to begin the first time-delay period.
iii) After the preset time period of 20 s, T4:1/DN contact closes to energize motor starter coil
M2.
iv) As a result, motor 2 starts and timer coil T4:2 is energized to begin the second time-delay
period.
v) After the preset time period of 20 s, T4:2/DN contact closes to energize motor starter coil
M3, and so motor 3 starts.
vi) Hence actual time delay to start Motor 3 = Time dlay of T4:1 + Time delay of T4:2
Control word:
Count-down Enable bit: The count down enable bit is used with the count down
counter and is true whenever the count down instruction is true.
Done bit (DN) : The done bit is true whenever the accumulated value is equal to
or greater than the preset value of the counter.
Overflow bit (OV) : The overflow bit is true whenever the counter counts past its
maximum value which is 32,767.
Underflow bitt (UV) : The underflow bit will go true when the counter counts
below -32768.
3.7.1 UP Counter
Up-counters perform a counting function when the associated input element transitions
from an OFF to ON state. Up-counters begin at some preset value and increment upward. Up-
counters are retentive and require an associated reset element to clear the counted values.
Example:
The solenoid (SOL) should turn on after the limit switch (LS1) has turned on three times. The
circuit operates as follows:
When the limit switch turns on for the first time, the count up output will be energized,
and the accumulated value will increase to 1.
When the limit switch turns off then on again, the accumulated value will increase to 2.
When the switch makes its third OFF-to-ON transition, the accumulated value will
increase to 3 and the done output will turn on because the accumulated value is equal to
the preset value.
When the done output turns on, the solenoid output in the second rung will be energized.
In a counter circuit, the counter will continue to count even after the accumulated value
has reached the preset value.
The done output will remain on as long as the accumulated count is greater than or equal
to the preset count.
The only way to reset the accumulated value and turn off the done output is to use a reset
instruction.
A count down instruction decreases its accumulated value by one every time the block’s
input makes an OFF-to-ON transition.
When the accumulated value becomes less than the preset value, the count down
instruction de-energizes its output.
When the counter’s accumulated value is greater than or equal to its preset value, the
counter’s output will be on.
A count down instruction also has two outputs:
a count down output : which indicates that the counter is energized
a done output : which signals that the target count value has been reached.
Example:
In this circuit, the count down block’s done output will already be on because the
accumulated value is greater than the preset value.
When the block’s input I0.0/0 is turns from OFF to ON, the accumulated value will
decrease to 3.
When the block’s input makes this OFF-to-ON transition again, the accumulated
value will decrease to 2.
When the input makes one more OFF-to-ON transition, the accumulated value will
drop to less than the preset value and the done output will turn off, deenergizing the
done output C5:2/DN and output O:0/0.
The CTD instruction requires the RES instruction to reset its accumulated value and
status bits.
In the up/down counter shown in Figure below, both counters share the same address and the
same preset and accumulated values.
As a result, the up counter increases the accumulated value every time a certain event occurs,
while the down counter decreases the same accumulated value if another event occurs.
Depending on the applications, it may be necessary to count events that exceed the
maximum number allowable per counter instruction. One way of accomplishing this count is by
interconnecting or cascading two counters.
The program control instructions allow for greater flexibility and greater efficiency in the
program scan.
LBL Label
Specifies label location. The label is a target for the jump.
It is the first instruction in the rung and it is always true.
Return from
RET
Subroutine It is an output instruction that marks the end of the
subroutine file. It exits current subroutine and returns to
previous condition.
SBR Subroutine
It is first instruction on the first rung in the subroutine
file. It identifies the subroutine program.
SUS Suspend
Data manipulation involves transfer of data and operation on data with math functions,
data conversion, data comparison and logical operations. Data manipulation can be placed in two
categories: 1. Data transfer 2. Data comparison
1. Data transfer instruction: It simply involves the transfer of the contents from one word
or register to another.
MOV Move
MVM Masked
Move
AND And
OR Or
XOR Exclusive
Or
NOT Not
Data transfer instructions are all output instruction whereas data compare instructions are input
instruction. It compare the data stored in two or more words or registers and take decision based
on the program instructions.
CPT Compute Evaluates an expression and sores the result in the destination
ADD Add
SUB Subtract
MUL Multiply
Calculate the square root of the source and places the integer result
in the destination.
NEQ Negate Changes the sign of the source and places it in the destination.
Programmed sequencers can perform the same specific on or off patterns of outputs that are
continuously repeated with a drum switch, but with much more flexibility. For example, the
on/off operation of 16 discrete outputs can be controlled, using a sequencer instruction, with only
one ladder rung.
The PID instruction is an output instruction that controls physical properties such as
temperature, pressure, liquid level, or flow rate using process loops.
Process Variable:
PV is an element address that stores the process input value. This address can be the
location of the analog input word where the value of the input A/D is stored. This value could
also be an integer value if you choose to pre-scale your input value to the range 0 to 16383.
Control Variable:
CV is an element address that stores the output of the PID instruction. The output value
ranges from 0 to 16383, with 16383 being the 100% on value. This is normally an integer value,
so that you can scale the PID output range to the particular analog range your application
requires.
Setup Screen:
Double click Setup Screen on the instruction to bring up a display that prompts you for
other parameters you must enter to fully program the PID instruction.
PWM is the acronym for “Pulse Width Modulation”. Pulse width modulation is a very
powerful function that is commonly used to control the positioning of servo valves. It is also
used for laser pulse control, motion control, light intensity controls and other other applications.
The single pulse feature of the function is applicable to any single pulse output need.
A pulse width modulated output signal is one that has a period and an output “on time”,
or duty cycle, within that period.
The next figure show a standard PWM on the top, and a single pulse PWM output on the
bottom. A single pulse PWM output is active for its defined “on time” within the PWM period. It
does not repeat. If you want to output another pulse, your program must execute another “Start
PWM pulse” block.
To perform this two timers are used to Turn ON and OFF an output according to
the length of a pulse.
Timer preset value should vary such that when preset of one timer is increased,
preset value of other timer should decrease in order to maintain Turn ON and OFF time of
output.
Select input bits such that we can directly enter digits and place it into Preset
value of a timer.
This can be done by using a digital input device which generates 0-9 numerical
digits.
Output of this Digital device is always in BCD form and Timers preset values
store data in Hexadecimal, so whichever data are sent to preset register of a time, it has to be
converted into Hexadecimal form.
Output of this conversion is directly moved to preset register of timer which can
be performed by MOV instruction.
There are different types of programming languages for PLCs. Perhaps the most common is the
ladder programming. The ladder diagrams are commonly used schemes to represent the control
logic of industrial systems. Is called "ladder" diagram because they resemble a ladder, with two
vertical rails (supply) and "rungs" (horizontal lines), in which there are control circuits that define
the logic through functions. In this way the main ladder language features are:
DESCRIPTION:
Starts directly the motor through M coil by means
of contacts ‘M’ connected with motor.
Assume that control circuit as mentioned in hard
wire circuit.
As like the hard wire control STOP button is
normally close one so we choose NC for STOP
while enter in ladder. Likewise for START
chooses make contact for this one.
For the output M coil we could choose normal
output energizer in ladder entry and make LATCH
circuit contact as a feedback loop which is of for
START operation.
73
Figure: PLC Ladder Diagram for DOL Starter (Allen Bradley PLC)
Sequence of operation:
i) Rung 0: When the Start push button is pressed, the NO instruction I:0/1 is set to
HIGH. The Rung 0 is TRUE and allows to energise Main coil which is
connected to output instruction O:0/0. The NO contact of output instruction
O:0/0 is set to high and provides sealing effect. The motor is started with full
line voltage and continues to run.
ii) Rung 0: When the stop push button is pressed, the NC instruction I:0/0 is set to LOW.
Now Rung 0 is FALSE and deenergise Main coil and stop the motor.
74
List of Input and outputs
I:0/0 -STOP(NC) ; I:0/1 - START(NO) ; I:0/3 - SENSOR(LIMIT SWITCH )
O:0/0 - SOLENOID VALVE ; O:0/1 - CONVEYOR MOTOR ;O:0/2 –OUT FEED MOTOR
T4:0 – FOR FILLING TIME; T4:1 – DELAY AFTER FILLING TO MOVE.
Sequence of operation:
When the start button is pressed the bit address B3:0/0 will get energized and out feed
motor starts run by means of energisation of O:0/2.
For the energisation of output B3:0/0 it make the conveyor motor to start till the limit
switch senses (I:0/3).
If the limit switch senses conveyor motor O: 0/1 output get deenergized and make the
energization of solenoid value for some time period (T4:0) to fill.
After filling the process waits for some delay (T4:1) and starts the conveyor to move and
repeat the operation till the stop button pressed
75
3.17 Automatic car parking system:
Description
A parking plot has total capacity of Cars. Numbers of empty spots are displayed on the
display outside the Parking Plot and which spots are available is to be indicated by
LEDs. Implement this in PLC using Ladder Diagram programming language.
Problem Solution
Counter is used to count the number of empty spots.
Proximity Sensors or IR Sensors are used to detect the presence of car.
Here in this system IR Sensor can be well installed to make this system cost efficient
since Proximity Sensors are costly than IR Sensors.
Value of counter is displayed on the display which is mounted outside the parking plot.
This counter value is converted into decimal.
Display arrangement:
76
Sequence of operation:
Counter Up CTU and Counter Down CTD are used to determine the Exit and Entry of
cars respectively.
Value 5 is already stored in the accumulator since only 5 number of spots are there in this
Parking Plot.
So whenever car enters or exits from the Parking area, the value in the counter is
incremented and decremented accordingly.
77
Accumulator holds decimal values, this value thus sent to the display through BCD
converter which converts Decimal digits into equivalent Binary Coded Decimal signals.
Display receives whatever the value Accumulator holds, in terms of BCD.
I:1/5 and I:1/6 are two inputs from other two IR Sensors to detect the exit and entry of
cars accordingly.
Here again, CTU and CTD both have the same address in order to vary accumulator value
of both counters according to Exit and Entry of cars.
XIO (Normally Closed) contact is used here for IR Sensor outputs so that LED is ON
when the spot is empty.
78
Sequence of operation:
i) Rung 0: When the Start push button is pressed, the NO instruction I:0/1 is set to
HIGH. The Rung 0 is TRUE and allows to set internal memory B3:0/0 to
HIGH. The NO contact internal memory B3:0/0 to high in rung 0, rung 1 and
2. No contact B3:0/0 in rung provides sealing effect.
ii) Rung 1: i) Three sensors can be used to sense the availability of phases. If ‘R’, ‘Y’
and ‘B’ phases are available, the corresponding NO contact I:0/2, I:0/3
and I:0/4 will set to high. Now EB coil which is connected with output
instruction O:0/0 and OFF delay Timer instruction T4:0 are energized.
Now EB supply lines will be connected to the load circuit.
ii) If any one of the three phases are not-available, the corresponding NO
contact will set to LOW. Now EB coil which is connected with output
instruction O:0/0 and OFF delay Timer instruction T4:0 are de-energized.
Now EB supply lines will be disconnected to the load circuit. Timer T4:0
will operate its NC contact T4:0/DN in rung 2 after preset time delay.
iii) Rung 2: i) Because of presence of ‘R’, ‘Y’ and ‘B’ phases, the corresponding NC
contact I:0/2, I:0/3 and I:0/4 will set to low. Without time delay Timer
T4:0 will open its NC contact T4:0/DN immediately and the EB interlock
contact O:0/0 also opened to make rung 2 as FALSE. Now GEN coil
which is connected with output instruction O:0/1 and OFF delay Timer
T4:1 are set to LOW.
ii) If any one of the three phases are not-available, the corresponding NC
contact will set to HIGH. EB interlock contact O:0/0 is closed and after
preset time delay NC contact T4:0/DN will come to closed condition to
make rung 1 as TRUE. Now GEN coil which is connected with output
instruction O:0/1 and OFF delay Timer T4:1 are set to HIGH. Without
time delay Timer T4:1 will open its NC contact T4:1/DN immediately and
the GEN interlock contact O:0/1 also opened to make rung 1 as FALSE.
iv) Rung 0: When the stop push button is pressed, the NC instruction I:0/0 is set to LOW.
Now Rung 0 is FALSE and deenergise remaining coils in remaining rungs.
79
3.19 BATCH PROCESS:
80
Sequence of Operation:
When the start push button is pressed, input valve V1 opens, allowing water to come in
the tank.
In case water goes above high level L1, the input valve closes.
The motor conveyor turns ON allowing weighted quantity of dry material to pour in to the
hopper. When the weight sensor is ON, the conveyor motor turns OFF.
The hopper valve turns open allowing the weighted dry material to add to the liquid.
The stirrer motor and heater turn ON to stir the liquid. The heater turns ON to maintain
the temperature between TL and TH for a period of 10 minutes. Both motor, stirrer and
heater turns OFF.
The output valve Vout turns ON, to empty the mixture down to level Le (LOW). When the
mixer level goes below the low level L2 output valve Voutcloses.
Close hopper valve. Once the hopper valve closespress preset/stop push button.
A- Actuators (Motors(Up/Down) ).
81
Sequence of Operation:
When the start push button is pressed, the platform is driven to the down position.
When the stop push button is pressed, the platform is halted at whatever the position it
occupies at that time.
When the up push button is pressed, the platform if it is not in a down motion, is driven to
the up position.
When the down push button is pressed, the platform if it is not in a up motion, is driven to
the down position.
82
3.21 Automatic Star Delta Starter:
Sequence of operation:
i) Rung 0: When the Start push button is pressed, the NO instruction I:0/1 is set to
HIGH. The Rung 0 is TRUE and allows to energise Star coil which is
connected to output instruction O:0/0. The NO contact of output instruction
O:0/0 is set to high and provides sealing effect.
ii) Rung 1: The NO contact of star coil output instruction O:0/0 is set to high and allows
to energise Main coil which is connected to output instruction O:0/1 and ON
delay Timer instruction T4:0. Now the motor is started with star connection.
iii) Rung 2: Timer T4:0 will closed its NO contact T4:0/DN after the preset time delay.
Now the motor is disconnected from star connection. (Neither star nor delta).
iv) Rung 3: After the preset time delay, T4:0/DN is closed and allows to energise ON
delay Timer T4:1.
v) Rung 4: After the preset time delay of T4:1, it closes its NO contact T4:1/DN and
allows to energise Delta coil which connected to output instruction O:0/2.
Timer T4:1 is used to provide pause time between star to delta transition.
Now the Motor continues to run with delta connection.
vi) Rung 5: When the stop push button is pressed, the NC instruction I:0/0 is set to LOW.
Now Rung 0 is FALSE and deenergise star coil, main coil and delta coils.
83
Figure : PLC Ladder Diagram for Star-Delta Starter (Allen Bradley PLC)
84
While using ordinary method to Master Start and Stop, when stop is pressed, the process
is just paused and is not entirely reset, hence resetting of Position in SQO instruction and
Outputs using the same Stop PB can be done manually.
85
Sequence of operation:
ii) Rung 1: File; #N7:0 and File length is 10, hence output sequence is varied
from N7:0 to N7:10 with each input.
Destination is set to O:2 hence with each transition, N7:0 to N7:10 are
moved to O:2 with masking.
O:2/0 to O:2/5 are used as the output address to Traffic Lights and
hence Mask has value 003Fh which means data flow of N7:0/0…N7:10/0
to N7:0/5…N7:10/5 is passed and the remaining N7:0/6…N7:10/6 to
N7:0/15…N7:10/15 are blocked.
Control parameters are assigned to register R6:0.
iii) Rung 2: Time base is set to 4secs, hence after every 4secs, output sequence is
changed to its next register pattern outputs which is then transferred to
O:2 and O:2/0 to O:2/5 are energized accordingly.
As we can see, from N7:1 to N7:4 have the same bit pattern. So, these
bits are set to 1 for 4 cycles that is 16secs. These bits are used for South-
North Green light and East-West Red light.
Similarly the entire sequence is followed.
iv) Rung 3: When Stop I:1/1 is pressed, Position is reset to 0 and all the outputs are de-
energized.
86
UNIT – III PLC ROGRAMMING
MODEL QUESTIONS
Two Mark Questions:
87
13. Develop simple ladder logic using TON instruction.
14. Develop simple ladder logic using TOF instruction.
15. Develop simple ladder logic using CTU instruction.
16. Develop simple ladder logic using CTD instruction.
17. What is a RTO instructions?
18. Why do we need counter instructions?
19. Explain various parameters associated with counter instruction.
88
UNIT- 4 NETWORKING
OBJECTIVES:
After completing this chapter, students should able to:
Field level:
The lowest level of the automation hierarchy is the field level which includes the field
devices such as actuators and sensors. The task of the devices in the field level is to transfer data
between the manufactured product and the technical process. The data may be either binary and
analog. Nowadays, the field bus is often used for information transfer in the field level.
Cell level:
At the cell level, the information flow mainly consists of the loading of programs,
parameters and data. In processes with short machine idle times and readjustments, this is done
during the production process. In small controllers it may be necessary to load subroutines during
89
one manufacturing cycle. This determines the timing requirements. For the cell level operations,
machine synchronizations and event handlings may require short response times on the bus. In
order to achieve the communication requirements in this level, local area networks have been
used as the communication network.
Area level:
The area level consists of cells combined into groups. Cells are designed with an
application-oriented functionality. By the area level controllers or process operators, the
controlling and intervening functions are made such as the setting of production targets, machine
start up and shutdown, and emergency activities.
Plant level:
The plant level is the top level of a plant or an industrial automation system. The plant
level controller gathers the management information from the area levels, and manages the whole
automation system.
The term network topology refers to the shape of how the computers and other network
components are connected to each other.
The topology of a local area network is the geometry of the network, or how individual
nodes are connected to it. The basic network topologies used today are star, common bus, and
ring.
90
In a star topology, a central control device or hub is connected to several nodes. This
configuration allows for bidirectional communication between the central control device and each
node. All transmission must be sent to the hub which then sends them to the correct node. The
first PLC networks consisted of a multiport host computer with each port connected to the
programming port of a PLC. Figure shows this arrangement, known as star topology. The
network controller can be either a computer, a PLC, or another intelligent host.
The main advantage of this topology is that it can be implemented with a simple point to-
point protocol—that is, each node can transmit whenever necessary.
The common bus topology has a main trunk line to which individual PLC nodes are
connected in a multidrop fashion. A coaxial cable with proper terminators is typically the
communication medium for the trunkline. In contrast to the star topology, communication in a
91
common bus network can occur between any two nodes without passing information through a
network controller. An inherent problem of this scheme, however, is determining which node
may transmit at which time, to avoid data collision.
The common bus topology has a main trunk line to which individual PLC nodes are
connected in a multidrop fashion. A coaxial cable with proper terminators is typically the
communication medium for the trunkline. In contrast to the star topology, communication in a
common bus network can occur between any two nodes without passing information through a
network controller. An inherent problem of this scheme, however, is determining which node
may transmit at which time, to avoid data collision.
Common bus topologies are very useful in distributed control applications, since each
station has equal independent control capability and can exchange information at any given time.
Also, this topology requires little reconfiguration to add or remove stations from the network.
The main disadvantage of this topology is that all of the nodes depend on a common bus trunk
line. A break in this trunk line can affect many nodes.
Ring topology, is not used in industrial environments because failure of any node will
crash the network, unless the failed node is bypassed. Thus, it is a good candidate for fiber-optic
networks, since fiber-optic transmission media allows fast communication speed and long
distance connectivity.
92
Figure 4.5: Ring Topology
93
Structure of simplified OSI model:
1) Physical Layer:
The physical layer is concerned with transmitting raw bits over a Communication
channel. The design issues have to do with making sure that when one side sends a 1 bit, it is
received by the other side as a 1 bit, not as a 0 bit.
The physical layer defines the electrical and physical specifications of the data connection. It
defines the relationship between a device and a physical transmission medium (for example,
an electrical cable, an optical fiber cable, or a radio frequency link). This includes the layout
of pins, voltages, line impedance, cable specifications, signal timing and similar characteristics
for connected devices and frequency (5 GHz or 2.4 GHz etc.) for wireless devices. It is
responsible for transmission and reception of unstructured raw data in a physical medium. Bit
rate control is done at the physical layer. It may define transmission mode as simplex, half
duplex, and full duplex. It defines the network topology as bus, mesh, or ring being some of the
most common.
94
2) Data Link Layer
It is responsible for transmitting a group of bits between adjacent nodes. The group of bits
so formed is called frame or packet. This layer adds header and trailer information to the data
unit. If the service is reliable, the receiver confirms correct receipt of each frame by sending back
an acknowledgement frame.
IEEE 802 divides the data link layer into two sub layers:
Medium access control (MAC) layer – responsible for controlling how devices in a
network gain access to a medium and permission to transmit data.
Logical link control (LLC) layer – responsible for identifying and encapsulating network
layer protocols, and controls error checking and frame synchronization.
The MAC and LLC layers of IEEE 802 networks such as 802.3 Ethernet, 802.11 Wi-Fi,
and 802.15.4 ZigBee operate at the data link layer.
The Point-to-Point Protocol (PPP) is a data link layer protocol that can operate over
several different physical layers, such as synchronous and asynchronous serial lines.
3) Network Layer:
This is responsible for addressing messages and data so they are sent to the correct
destination, and for translating logical addresses and names (like a machine name FLAME) into
physical addresses. This layer is also responsible for finding a path through the network to the
destination computer.
4) Transport Layer:
Ensures that data is delivered error free, in sequence and with no loss, duplications or corruption.
This layer also repackages data by assembling long messages into lots of smaller messages for
sending, and repackaging the smaller messages into the original larger message at the receiving
end.
5) Session Layer:
Allows two applications to establish, use and disconnect a connection between them called a
session. Provides for name recognition and additional functions like security, which are needed to
allow applications to communicate over the network
6) Presentation Layer:
Presentation layer is concerned with the syntax and semantics of the information
transmitted. In order to make it possible for computers with different data representations to
communicate, the data structures to be exchanged can be defined.
95
7) Application Layer:
It is the highest layer in the OSI model. Login, password checking, file transfer, etc., are some
of the functions of the application layer. The application layer contains a variety of protocols that
are commonly needed by users. One widely-used application protocol is HTTP (Hyper Text
Transfer Protocol), which is the basis for the World Wide Web.
The Internet protocol suite is the conceptual model and set of communications
protocols used on the Internet and similar computer networks. It is commonly known
as TCP/IP because the foundational protocols in the suite are the Transmission Control
Protocol (TCP) and the Internet Protocol (IP). It is occasionally known as the Department of
Defense (DoD) model, because the development of the networking method was funded by
the United States Department of Defense through DARPA.
The Internet protocol suite provides end-to-end data communication specifying how data should
be packetized, addressed, transmitted, routed, and received. This functionality is organized into
four abstraction layers which classify all related protocols according to the scope of networking
involved. From lowest to highest, the layers are the link layer, containing communication
methods for data that remains within a single network segment (link); the internet layer,
providing internetworking between independent networks; the transport layer handling host-to-
host communication; and the application layer, which provides process-to-process data exchange
for applications.
TCP/IP protocol suite is a collection of protocols used for the internet services. The
TCP/IP suite contains networking protocols used for setting up the internet.
Application Layer
Transport layer
Internet layer
Host to Network layer
Figure 4.7: TCP/IP REFERENCE MODEL
i) Application Layer:
Application layer consists of all higher level protocols such as virtual terminal
(TELNET), file transfer (FTP) and electronic mail. The virtual terminal protocol allows a user on
one machine to log on to a remote machine. Domain Name Service (DNS) is used for mapping
host names onto their network addresses.
96
ii) Transport Layer
Host-to-Host or Transport layer provides end-to-end data transfer service. This layer may
include reliability mechanism. It hides the details or underlying network or networks from the
application layer. It provides support to TCP or UDP protocol.
The transport layer includes the following two transport level protocols:
1. Datagram Congestion Control Protocol (DCCP)
2. Stream Control Transmission Protocol (SCTP).
97
classes A to C, since classes D and E are reserved and discussion of them is beyond the scope of
this document.
4.6 Introduction to I/O Bus Networks:
98
4.7 Types of I/O Bus Networks:
99
compatible with Profibus, Fieldbus, or another type of protocol communication scheme. Figure
below illustrates a block diagram of available network and protocol standards.
One of these de facto standards for the byte-wide device bus network is DeviceNet, originally
from PLC manufacturer Allen-Bradley and now provided by an independent spin-off association
called the Open DeviceNet Vendor Association. Another is SDS (Smart Distributed System)
from Honeywell. Both of these device bus protocol standards are based on the control area
network bus (CANbus), developed for the automobile industry, which uses the commercially
available CAN chip in its protocol. InterBus-S from Phoenix Contact is another emerging de
facto standard for byte-wide device bus network.
The de facto standards for low-end, bit-wide device bus networks include
Seriplex, developed by Square D, and ASI (Actuator Sensor Interface), a standard developed by a
consortium of European companies. Again, this is why I/O bus network and field device
manufacturers will specify compatibility with a particular protocol (e.g., ASI, Seriplex, InterBus-
S, SDS, or DeviceNet) even though no official protocol standard exists.
100
Process bus–compatible field devices can pass a digital value proportional to a
real-world value to the PLC, thus eliminating the need to linearize or scale the process
data.
The reduction in the amount of wiring in a plant alone can provide incredible
cost savings for manufacturing and process applications.
4.10 Gateway:
Gateways make communication possible between different architectures and protocols.
They repackage and convert data going from one network to another network so that the one can
understand the other’s application data. Gateways can change the format of a message so that it
will conform to the application program at the receiving end of the transfer. If network access
translation is their only function, the interfaces are known as bridges. If the interface also adjusts
data formats or performs data transmission control, then it is called a gateway.
101
DeviceNet is an open device-level network. It is relatively low speed but efficient at
handling the short messages to and from I/O modules. As PLCs have become more powerful,
they are being required to control an increasing number of I/O field devices. Therefore, at times it
may not be practical to separately wire each sensor and actuator directly into I/O modules.
Conventional systems have racks of inputs and outputs with each I/O device wired back to the
controller. The DeviceNet protocol dramatically reduces costs by integrating all I/O devices on a
4-wire trunk network with data and power conductors in the same cable. This direct connectivity
reduces costly and time-consuming wiring.
4.15 Control Net:
ControlNet is positioned one level above DeviceNet. It uses the Common Industrial
Protocol (CIP) to combine the functionality of an I/O network and a peer-to-peer network
providing high-speed performance for both functions. This open high-speed network is highly
deterministic and repeatable. Electronic device data sheets (EDS-Files) are required for each
ControlNet device. During the setup phase the ControlNet scanner must configure each device
according to the EDS-Files.
4.16 EtherNet:
EtherNet/IP (Ethernet Industrial Protocol) is an open communications protocol based on the
Common Industrial Protocol (CIP) layer used in both DeviceNet and ControlNet. It allows users
to link information seamlessly between devices running the EtherNet/IP protocol without custom
hardware.
4.17 Modbus:
Modbus is a serial communication protocol originally developed by Modicon for use with
its PLCs. Basically, it is a method used for transmitting information over serial lines between
electronic devices. The device requesting the information is called the Modbus Master and the
devices supplying information are Modbus Slaves. Modbus is an open protocol, meaning that it’s
free for manufacturers to build into their equipment without having to pay royalties. It has
become a standard communications protocol in industry, and is one of the most commonly
available means of connecting industrial electronic devices.
4.18 Fieldbus:
Fieldbus is an open, serial, two-way communications system that interconnects
measurement and control equipment such as sensors, actuators, and controllers. At the base level
in the hierarchy of plant networks, it serves as a network for field devices used in process control
applications.
4.19 Profibus:
102
PROFIBUS-DP (where DP stands for Decentralized Periphery) is an open, international
fieldbus communication standard that supports both analog and discrete signals. It is functionally
comparable to DeviceNet. The physical media are defined via the RS-485 or fiber optic
transmission technologies. PROFIBUS-DP communicates at speeds up to 12 Mbps over distances
up to 1200 meters.
4.10 Subnetting:
Subnetting is a technique that lets network administrators use the 32 bits available in an
IP address more efficiently by creating networks that aren’t limited to the scales provided by
Class A, B, and C IP addresses. With subnetting, you can create networks with more realistic host
limits. Subnetting provides a more flexible way to designate which portion of an IP address
represents the network ID and which portion represents the host ID. With standard IP address
classes, only three possible network ID sizes exist: 8 bits for Class A, 16 bits for Class B, and 24
bits for Class C. Subnetting lets you select an arbitrary number of bits to use for the network ID.
Two reasons compel people to use subnetting. The first is to allocate the limited IP
address space more efficiently. If the Internet was limited to Class A, B, or C addresses, every
network would be allocated 254, 65 thousand, or 16 million IP addresses for host devices.
Although many networks with more than 254 devices exist, few (if any) exist with 65 thousand,
let alone 16 million. Unfortunately, any network with more than 254 devices would need a Class
B allocation and probably waste tens of thousands of IP addresses.
The second reason for subnetting is that even if a single organization has thousands of
network devices, operating all those devices with the same network ID would slow the network
down to a crawl. The way TCP/IP works dictates that all the computers with the same network ID
must be on the same physical network. The physical network comprises a single broadcast
domain, which means that a single network medium must carry all the traffic for the network. For
performance reasons, networks are usually segmented into broadcast domains that are smaller
than even Class C addresses provide.
Example
In order to subnet a network, extend the natural mask with some of the bits from the host
ID portion of the address in order to create a subnetwork ID. For example, given a Class C
network of 204.17.5.0 which has a natural mask of 255.255.255.0, you can create subnets in this
manner:
204.17.5.0 - 11001100.00010001.00000101.00000000
255.255.255.224 - 11111111.11111111.11111111.11100000
--------------------------|sub|----
By extending the mask to be 255.255.255.224, you have taken three bits (indicated by "sub")
from the original host portion of the address and used them to make subnets. With these three
103
bits, it is possible to create eight subnets. With the remaining five host ID bits, each subnet can
have up to 32 host addresses, 30 of which can actually be assigned to a device since host ids of
all zeros or all ones are not allowed (it is very important to remember this). So, with this in mind,
these subnets have been created.
204.17.5.0 255.255.255.224 host address range 1 to 30
204.17.5.32 255.255.255.224 host address range 33 to 62
204.17.5.64 255.255.255.224 host address range 65 to 94
204.17.5.96 255.255.255.224 host address range 97 to 126
204.17.5.128 255.255.255.224 host address range 129 to 158
204.17.5.160 255.255.255.224 host address range 161 to 190
204.17.5.192 255.255.255.224 host address range 193 to 222
204.17.5.224 255.255.255.224 host address range 225 to 254
104
4.22 File Transfer protocol:
File transfer protocol is the standard mechanism provided by the internet for copying a
file from one host to another. FTP is a TCP/IP client-server application for copying files from
one host to another. The problem occurred during file transfer is solved by FTP.
FTP uses the service of TCP. It needs two TCP connections. Port 21 is used for the control
connection and port 20 is used for the data connection.
The control connection is made between the data transfer process. The control connection is
maintained during the entire interactive FTP session. The data connection is opened and then
closed for each file transferred. It opens each time commands that involve transferring files are
used, and it closes when the file is transferred. In other words, when a user starts an FTP session,
the control connection opens. While the control connection is open, the data connection can be
opened and closed multiple times if several files are transferred.
105
UNIT-4 NETWORKING
Model questions
Part A (2 mark)
1. What is the function of process bus network.
2. Mention the levels of industrial networking.
3. What is plant level?
4. Define network topology.
5. What is the main advantage of star topology.
6. What is protocol?
7. What is physical layer?
8. What is data link layer?
9. What is gateway?
10. Mention the components of FTP?
11. List any two advantages of networking
12. What is the main advantage of star topology.
13.
Part B
1. Explain about star, ring topologies.
2. Explain about physical and presentation layer.
3. Explain about controlnet,profibus.
4. Explain modbus, field bus.
5. Explain about subnetting.
6. What is the function of transport layer in OSI model?
Part C
1. Explain with structure of simplified OSI model.
2. Explain with block diagram of I/O bus networks.
3. Explain the different types of network topologies.
4. Explain with block diagram of FTP.
5. Explain TCP/IP protocol with reference model.
106
UNIT- 5DATA ACQUISITION SYSTEM
OBJECTIVES:
After completing this chapter, students should able to:
Process control is the automated control of a process. Such systems typically deal with
analog signals from sensors. The ability of a PLC to perform math functions and utilize analog
signals makes it ideally suited for this type of control. Manufacturing is based on a series of
processes being applied to raw materials. Typical applications of process control systems include
chemical-processing industries, petrochemical production, oil refining, basic metals industries
(iron and steel, aluminum), and food processing.
Process industries
i) Continuous process
ii) Batch processing
iii) Hybrid
Discrete manufacturing
Continuous process:
A continuous process is one in which raw materials enter one end of the system and the
finished product comes out the other end of the system; the process itself runs continuously.
Batch processing:
In batch processing, there is no flow of product material from one section of the process to
another. Instead, a set amount of each of the inputs to the process is received in a batch, and then
some operation is performed on the batch to produce a product. Products produced using the
batch process include food, beverages, pharmaceutical products, paint, and fertilizer.
107
Hybrid :
Applications having elements of batch and continuous process control are often
called hybrid applications
Discrete manufacturing:
Process control system can be defined as the functions and operations necessary to change
a material either physically or chemically. Process control normally refers to the manufacturing
or processing of products in industry. A block diagram representation of an industrial process
control is shown in figure.
Transducer / Sensor:
i) Provide inputs from the process and from the external environment
ii) Convert physical information such as pressure, temperature, flow rate and position into
electrical signals.
iii) It output can be used to monitor and control a process.
HMI:
108
i) Allows inputs from a human to set up the starting conditions or alter the control of a
process.
ii) Allows human inputs through various types of switches, controls and keypads.
iii) Operates using supplied input information that may include emergency shut down or
changing the speed, the type of process to be run, the number of pieces to be made or
the recipe for a batch mixer.
Signal Conditioning:
Actuators:
i) Convert system output electrical signals into physical action.
ii) Examples: Flow control valves, pumps, positing drives, VFD, clutches, brakes, solenoids,
stepper motor and power relays.
Output devices
i. Indicate the state of the process variables through external actuators such as meters, CRT
monitors, printers, alarms and pilot lights.
ii. It can send outputs directly from the controller to a computer for storage of data and
analysis of results.
Controller:
I. Controller is the brain of the control system that takes decision to maintain the
process variables at its desired value (set point).
II. It generates output signals which operate actuators to carry out the decision.
Multiplexer:
i. Multiplexer has large number of inputs and only one output.
ii. If the multiplexer is connected at input of ADC then it is called as analog
multiplexing and if it is connected at output of ADC it is called as digital
multiplexing.
In an ON-OFF control action the output has only two states, fully ON or fully OFF. The
time temperature response of an ON-OFF controller in a heating application is shown in the
figure. In this control, the output turns ON when the temperature falls below the set point and
turns OFF when the temperature reaches the set point.
109
Remedy: Oscillation can be reduced by in amplitude buy increasing the sensitivity of the
controller.
The closed loop system is one of the control system in which the feedback taken from the
output and then this feedback is feed is applied to the comparator for the comparing with the set
point and the error is then applying to the further circuit. The operation and block diagram of the
closed loop system is shown in the figure.
Set point:It is the input that determines the desired operating point for the process.
Comparator: It is used to obtain the difference between actual output with set point. The set
point signal is applied at the positive terminal and output signal is applied at negative terminal.
Error amplifier:It amplify the error signal and give to the controller because the error signal is
very weak in amplitude, it may not directly operate the controller. So the weak signal is amplified
by error amplifier.
Controller: It produces the output signal for the process based on the input error signal.
110
Final control element :It controls the output of the controller stage and input of the process
state.
Sensor Feedback: It provides input from the process to the set point or comparator which
compare the set point and feedback signal.
PID control is a feedback control method that combines proportional, integral, and
derivative actions. The proportional controller reduces the offset. But offset will not become zero.
The integral action automatically corrects offset. The derivative action responds quickly to large
external disturbances. The PID controller is the most widely used type of process controller.
When combined into a single control loop the proportional, integral and derivative modes
complement each other to reduce the system error to zero faster than any other controller. Figure
shows the block diagram of a PID control loop, the operation of which can be summarized as
follows:
During setup, the set-point, proportional band, reset (integral), rate (derivative), and output
limits are specified.
All these can be changed during operation to tune the process.
The integral term improves accuracy, and the derivative reduces overshoot for transient
upsets.
The output can be used to control valve positions, temperature, flow metering equipment,
and so on.
The response of a PID loop is the rate at which it compensates for error by adjusting the
output. The PID loop is adjusted or tuned by changing the proportional gain, the integral gain,
111
and/or the derivative gain. A PID loop is normally tested by making an abrupt change to the set
point and observing the controller’s response rate. Adjustments can then be made as follows:
112
receives the signal provided by the motion module and translates this signal into motor drive
commands.
The following diagram illustrates the essential components of a motion control system.
Figure The motion controller is the heart of the motion control system.
There are two types of drives: a standard inverter drive for controlling speed and torque only; and
a servo drive for controlling speed and torque, as well as positioning machine components used
in applications that require complex motion.
A microprocessor based controller performing the monitoring, control loop processing and
direct control of the mechanical system in response to system input. DDC is the automated
control of a process by a digital device.
113
Fig: Block Diagram of DDC
A basic DDC system is shown in figure. In this system a large number of transducer are
connected and each transducer being connected to one input of a multiplier. Multiplexer has large
number of inputs and only one output. Here the multiplexer is connected at input of ADC then it
is called as analog multiplexing. The data from output of ADC is transmitted to CPU through
data bus.
When CPU has analyzed the data from one or more transducer and has compared them
with the appropriate set points in the computer program, it sends signals along the data bus to the
values controlling the system as follows. The digital signal produced by the CPU is converted
into an analog signal by a DAC and the analog signal is transmitted to the appropriate control
valve through a demultiplexer. As this is being performed, data are displayed on the operator
visual display unit and if necessary, he can remotely change the set points associated with various
sections of the process.
114
5.9.1 Block diagram of SCADA:
115
3. Communication Equipment:
In the SCADA system network but there must be uninterrupted, bidirectional
communication between the MTU and the RTU for a Data Acquisition system to function
properly. Private wire lines, buried cable, telephone, telemetry hardware like wireless radios and
modems, microwave dishes, satellites, or other atmospheric means, DSL (Digital Subscriber
Line), Integrated Service Digital Network (ISDN), cable, fiber optics, WiFi, or other broadband
services.
4. SCADA Software:
A typical SCADA system provides a Human Machine Interface (HMI) allowing
the operator to visualize all the functions as the system is operating. The operator can also use the
HMI to change set points, view critical condition alerts and warnings, and analyze or present data
trends. Common HMI software packages include Cimplicity (GE-Fanuc), RSView (Rockwell
Automation)
116
SCADA works software contains both application development software and run time software.
Using this software user can develop application program and also run this application. SCADA
runtime contains only runtime program. Using this software user can run the application
program, but cannot develop application program.
1 Siemens WinCC
2 AllenBradly RSView 32
3 GeFanuc Cimplicity
4 Wonderware InTouch
Data loggers are electronic devices which automatically monitor and record
environmental parameters over time, allowing conditions to be measured, documented, analysed
and validated. The data logger contains a sensor to receive the information and a computer chip
to store it. Then the information stored in the data logger is transferred to a computer for analysis.
Data logging facility is also available with SCADA software.
5.14 Tags:
A Tag is a logical name for a variable in a device or in logical memory. Tags that receive
data from an external source such as a PLC is referred as device tags. Tags that receive their data
internally from SCADA software are referred to as memory tags. Tags are stored in the tag
database and their names are then used in other parts.
117
Tag Types:
Industrial processes are often supervised by an SCADA. It monitors analog and digital signals
from the plant and checks on limits for the values. There is need to have the record of alarm and
alarms acknowledgement information. An alarm occurs when something goes wrong. It can
signal that a device or process has ceased operating within acceptable, predefined limits or can
indicate breakdown, wear or a process malfunction. An alarm should only be activated when the
process limit violated. Set up a systems of alarms in the tag database editor by linking alarms to
value table, they are compared to the limits you assigned, when you configured the alarm. If a tag
value exceeds the configured limits, an alarm of a present severity is triggered.
118
Requirements of good alarm system:
An optical fiber cable, also known as fiber optic cable, is an assembly similar to
an electrical cable, but containing one or more optical fibers that are used to carry light. The
optical fiber elements are typically individually coated with plastic layers and contained in a
protective tube suitable for the environment where the cable will be deployed. Different types of
119
cable are used for different applications, for example long distance telecommunication, or
providing a high-speed data connection between different parts of a building.
Optical fibers are very strong, but the strength is drastically reduced by unavoidable
microscopic surface flaws inherent in the manufacturing process. The initial fiber strength, as
well as its change with time, must be considered relative to the stress imposed on the fiber during
handling, cabling, and installation for a given set of environmental conditions.
There are three basic scenarios that can lead to strength degradation and failure by
inducing flaw growth: dynamic fatigue, static fatigues, and zero-stress aging.
Often in SCADA systems the RTU (remote terminal unit (PLC, DCS or IED)) is located
at a remote location. This distance can vary from tens of meters to thousands of kilometers. One
of the most cost-effective ways of communicating with the RTU over long distances can be by
dialup telephone connection. With this system the devices needed are a PC, two dialup modems
and the RTU (assuming that the RTU has a built in COM port). The modems are put in the auto-
answer mode and the RTU can dial into the PC or the PC can dial the RTU. The software to do
this is readily available from RTU manufacturers. The modems can be bought off the shelf at the
local computer store.
Line modems are used to connect RTUs to a network over a pair of wires. These systems are
usually fairly short (up to 1 kilometer) and use FSK (frequency shift keying)to communicate.
Line modems are used to communicate to RTUs when RS-232 or RS-485 communication
systems are not practical. The bit rates used in this type of system are usually slow, 1200 to 9600
bps.
120
Unit V
Model Questions
Part A
Part B
Part C
1. Draw the structure of control system and explain about the components of process
control system.
2. Explain the PID control with neat sketch.
3. Explain with block diagram of DDC.
4. Explain the use of landlines and modems in SCADA
5. With neat block diagram explain the operation of SCADA.
6. With neat block diagram briefly explain about proportional integral process
7. Describe the hardware and software involved in SCADA system
121