PLC

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 49

AMITY UNIVERSITY

Rajasthan
PLC AND SCADA
SUBMITTED TO
Ms. Pushpa Gotwal
SUBMITTED BY
Priya Hada
B.tech(ECE)7
th
sem
October 9, 2014
CERTIFICATE
This is to certify that PRIYA HADA, student of B.Tech. in Electronics and
Communication Engineering has carried out the work presented in Training en-
titled PLC and SCADA as a part of fourth Year programme of B.Tech. in
Electronics and Communication Engineering from Amity School of Engineer-
ing and Technology, Amity University Rajasthan, under my supervision.
STUDENT
Priya Hada
ASET(AUR)
i
ACKNOWLEDGMENTS
It has come out to be a sort of great pleasure and experience for me to work
on the Plc and SCADA, from Prime Vision Automation.I wish to express my
indebtedness to those who helped us i.e. the faculty of our Institute Ms. Pushpa
Gotwal, ASET during the preparation of the manual script of this text. This
would not have been made successful without his help and precious sugges-
tions.
Priya Hada
ii
Contents
ACKNOWLEDGMENTS i
CERTIFICATE ii
1 INTRODUCTION 1
1.1 AUTOMATION . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 SCADA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Features of PLCs . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.5 History of PLCs . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.6 Hard Wired Relay Comparison . . . . . . . . . . . . . . . . . . 6
2 PROGRAMMABLE LOGIC CONTROLLER 9
2.1 INPUT MODULE . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2 OUTPUT MODULE . . . . . . . . . . . . . . . . . . . . . . . 12
2.3 Wiring In a PLC . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3.1 Generation of Input Signal . . . . . . . . . . . . . . . . 15
2.4 PLC compared with other control systems . . . . . . . . . . . . 16
3 Ladder Logic 18
3.1 Denition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.2 Comparison to Relay Logic . . . . . . . . . . . . . . . . . . . . 18
3.3 Ladder Logic Programming . . . . . . . . . . . . . . . . . . . . 22
3.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . 22
3.4 EXAMPLES OF LADDER PROGRAMMING . . . . . . . . . 28
4 SCADA 31
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.2 Types of SCADA . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.3 Features of SCADA . . . . . . . . . . . . . . . . . . . . . . . . 31
4.4 Manufacture of SCADA . . . . . . . . . . . . . . . . . . . . . 32
iii
4.5 What does SCADA MEAN? . . . . . . . . . . . . . . . . . . . 32
4.6 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.6.1 Hardware Architecture . . . . . . . . . . . . . . . . . . 33
4.6.2 Generic Software Architecture . . . . . . . . . . . . . . 33
4.7 Communications . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.7.1 Internal Communication . . . . . . . . . . . . . . . . . 33
4.7.2 Access to Devices . . . . . . . . . . . . . . . . . . . . 33
4.8 Interfacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.8.1 Application Interfaces / Openness . . . . . . . . . . . . 34
4.8.2 Database . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.8.3 Scalability . . . . . . . . . . . . . . . . . . . . . . . . 35
4.8.4 Redundancy . . . . . . . . . . . . . . . . . . . . . . . . 35
4.8.5 Functionality . . . . . . . . . . . . . . . . . . . . . . . 35
4.8.6 Trending . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.8.7 Alarm Handling . . . . . . . . . . . . . . . . . . . . . 36
4.8.8 Logging/Archiving . . . . . . . . . . . . . . . . . . . . 36
4.8.9 Report Generation . . . . . . . . . . . . . . . . . . . . 37
4.8.10 Automation . . . . . . . . . . . . . . . . . . . . . . . 37
5 Application Development 38
5.1 Conguration . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.2 Development Tools . . . . . . . . . . . . . . . . . . . . . . . . 38
5.3 Object Handling . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.4 Evolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.5 Engineering . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.6 Potential benets of SCADA . . . . . . . . . . . . . . . . . . . 40
5.7 Where SCADA is used ? . . . . . . . . . . . . . . . . . . . . . 41
6 CONCLUSION 42
REFERENCES 43
iv
List of Figures
1 Complete Automation System Components . . . . . . . . . . . 1
2 Complete Automation System Components . . . . . . . . . . . 4
3 Typical Small Scale Control Panel . . . . . . . . . . . . . . . . 7
4 Typical Small Scale Control Panel . . . . . . . . . . . . . . . . 7
5 Diagram of Counter . . . . . . . . . . . . . . . . . . . . . . . . 11
6 diagram of Timer . . . . . . . . . . . . . . . . . . . . . . . . . 12
7 Complete Automation System Components . . . . . . . . . . . 12
8 Complete Automation System Components . . . . . . . . . . . 13
9 Complete Automation System Components . . . . . . . . . . . 13
10 Complete Automation System Components . . . . . . . . . . . 15
11 Complete Automation System Components . . . . . . . . . . . 15
12 Basic Ladder Logic Program . . . . . . . . . . . . . . . . . . . 18
13 Electromechanical Relay . . . . . . . . . . . . . . . . . . . . . 19
14 Basic Relay logic Circuit . . . . . . . . . . . . . . . . . . . . . 19
15 Relay Logic Circuit with Jog function and Status Indicators . . . 20
16 Complex Ladder Diagram . . . . . . . . . . . . . . . . . . . . 21
17 Basic Ladder Logic Program . . . . . . . . . . . . . . . . . . . 22
18 Basic Program to show input and output . . . . . . . . . . . . . 23
19 Normally Open Contact . . . . . . . . . . . . . . . . . . . . . . 24
20 Normally Open Coil . . . . . . . . . . . . . . . . . . . . . . . 24
21 Normally Closed Contact . . . . . . . . . . . . . . . . . . . . . 25
22 Normally Closed coil . . . . . . . . . . . . . . . . . . . . . . . 25
23 Basic And Gate using Ladder Logic . . . . . . . . . . . . . . . 25
24 Basic And Gate using Ladder Logic . . . . . . . . . . . . . . . 25
25 Start/Stop of Motor by PLC . . . . . . . . . . . . . . . . . . . . 28
26 Starting of Motor . . . . . . . . . . . . . . . . . . . . . . . . . 29
27 Continous Running of motor When Start Button is Released . . 29
28 To Stop the Motor . . . . . . . . . . . . . . . . . . . . . . . . . 30
v
1 INTRODUCTION
1.1 AUTOMATION
Automation or industrial automation is the use of control systems such as com-
puters, controllers to control industrial machinery and processes, to optimize
productivity in the production of goods and delivery of services. Automation
is a step beyond mechanization. Whereas mechanization provides human op-
erators with machinery to assist them with the muscular requirements of work,
automation greatly decreases the need for human sensory and mental require-
ments.
Automation Impacts:
1. It increases productivity and reduce cost.
2. It gives emphasis on exibility and convertibility of manufacturing pro-
cess. Hence gives manufacturers the ability to easily switch from manu-
facturing Product A to manufacturing product B without completely re-
built the existing system/product lines.
3. Automation is now often applied primarily to increase quality in the man-
ufacturing process, where automation can increase quality substantially.
4. Increase the consistency of output.
5. Replacing humans in tasks done in dangerous environments.
Figure 1: Complete Automation System Components
1
1.2 PLC
A Programmable Logic Controller, PLC, or Programmable Controller is a dig-
ital computer used for automation of industrial processes, such as control of
machinery on factory assembly lines. Unlike general-purpose computers, the
PLC is designed for multiple inputs and output arrangements, extended tem-
perature ranges, immunity to electrical noise, and resistance to vibration and
impact. Programs to control machine operation are typically stored in battery-
backed or non-volatile memory. A PLC is an example of a real time system
since output results must be produced in response to input conditions within a
bounded time, otherwise unintended operation will result. PLC are registered
trademarks of the Allen-Bradley Company.
PLCs have become the most predominant control elements for the discrete
event control of a mechatronics system. Simplication of engineering and pre-
cise control of manufacturing process can result in signicant cost savings. The
most cost-effective way which can pay big dividends in the long run is exible
automation; a planned approach towards integrated control systems. It requires
a conscious effort on the part of plant managers and engineers to identify areas
where automation can result in better deployment and/or utilization of human
resources and savings in man-hours or down time. Controls automation need
not be high ended and extremely sophisticated; it is the phased, step-by-step
effort to automate, employing control systems tailored to ones specic require-
ments that achieves the most attractive results. This is where programmable
logic controls have been a breakthrough in the eld of automation and control
techniques. This report looks at the role PLCs play in these techniques.
A constant demand for better and more efcient manufacturing and pro-
cess machinery has led to the requirement for higher quality and reliability
in control techniques. With the availability of intelligent, compact solid state
electronic devices, it has been possible to provide control systems that can re-
duce maintenance, down time and improve productivity to a great extend. By
installing an efcient and user friendly electronics systems for manufacturing
machinery or processors, one can obtain a precise and reliable means for pro-
ducing quality products. One of the latest techniques in solid state controls that
offers exible and efcient operation to the user is programmable controllers.
The basic idea behind these programmable controllers was to provide means
to eliminate high cost associated with inexible, conventional relay controlled
systems. Programmable controllers offer a system with computer exibility that
is suited to withstand the harsh industrial environment, has simplicity of oper-
ation/readability, can reduce machine down time and provide expandability for
future and is able to be maintained by plant technicians.
2
1.3 SCADA
SCADA is widely used in industry for Supervisory Control and Data Acqui-
sition of industrial processes, SCADA systems are now also penetrating the
experimental physics laboratories for the controls of ancillary systems such as
cooling, ventilation, power distribution, etc. More recently they were also ap-
plied for the controls of smaller size particle detectors such as the L3 moon
detector and the NA48 experiment, to name just two examples at CERN.
SCADA systems have made substantial progress over the recent years in
terms of functionality, scalability, performance and openness such that they are
an alternative to in house development even for very demanding and complex
control systems as those of physics experiments.
1.4 Features of PLCs
1. A PROGRAMMABLE LOGIC CONTROLLER (PLC) is an industrial
computer control system that continuously monitors the state of input de-
vices and makes decisions based upon a custom program to control the
state of output devices.
2. It is designed for multiple inputs and output arrangements, extended tem-
perature ranges, immunity to electrical noise, and resistance to vibration
and impact.
3. Almost any production process can greatly enhanced using this type of
control system, the biggest benet in using a PLC is the ability to change
and replicate the operation or process while collecting and communicat-
ing vital information.
4. Another advantage of a PLC is that it is modular i.e. you can mix and
match the types of input and output devices to best suit your application.
With each module having sixteen points of either input or output, this PLChas
the ability to monitor and control dozens of devices. Fit into a control cabinet, a
PLC takes up little room, especially considering the equivalent space that would
be needed by electromechanical relays to perform the same functions.
The main difference from other computers is that PLC are armored for se-
vere condition (dust, moisture, heat, cold, etc) and has the facility for extensive
input/output (I/O) arrangements. These connect the PLC to sensors and actua-
tors. PLCs read limit switches, analog process variables (such as temperature
and pressure), and the positions of complex positioning systems. Some even
3
use machine vision. On the actuator side, PLCs operate electric motors, pneu-
matic or hydraulic cylinders, magnetic relays or solenoids, or analog outputs.
The input/output arrangements may be built into a simple PLC, or the PLC may
have external I/O modules attached to a computer network that plugs into the
PLC.
Many of the earliest PLCs expressed all decision making logic in simple
ladder logic which appeared similar to electrical schematic diagrams. This pro-
gram notation was chosen to reduce training demands for the existing techni-
cians. Early PLCs used a form of instruction list programming, based on a
stack-based logic solver. The functionality of the PLC has evolved over the
years to include sequential relay control, motion control, process control, dis-
tributed control systems and networking. The data handling, storage, process-
ing power and communication capabilities of some modern PLCs are approxi-
mately equivalent to desktop computer.
Figure 2: Complete Automation System Components
1.5 History of PLCs
PLCs were rst introduced in the 1960s. The primary reason for designing such
a device was eliminating the large cost involved in replacing the complicated
relay based machine control systems. Bedford Associates (Bedford, MA) pro-
posed something called a Modular Digital Controller (MODICON) to a major
US car manufacturer. The MODICON 084 brought the worlds rst PLC into
commercial production.
4
When production requirements changed so did the control system. This
becomes very expensive when the change is frequent. Since relays are mechan-
ical devices they also have a limited lifetime because of the multitude of mov-
ing parts. This also required strict adhesion to maintenance schedules. Trou-
bleshooting was also quite tedious when so many relays are involved. Now
picture a machine control panel that included many, possibly hundreds or thou-
sands, of individual relays. The size could be mind boggling not to mention the
complicated initial wiring of so many individual devices. These relays would be
individually wired together in a manner that would yield the desired outcome.
The problems for maintenance and installation were horrendous.
These new controllers also had to be easily programmed by maintenance
and plant engineers. The lifetime had to be long and programming changes
easily performed. They also had to survive the harsh industrial environment.
The answers were to use a programming technique most people were already
familiar with and replace mechanical parts with solid-state ones which have no
moving parts.
Communications abilities began to appear in approximately 1973. The rst
such system was Modicons Modbus. The PLC could now talk to other PLCs
and they could be far away from the actual machine they were controlling. They
could also now be used to send and receive varying voltages to allow them to
use analog signals, meaning that they were nowapplicable to many more control
systems in the world. Unfortunately, the lack of standardization coupled with
continually changing technology has made PLC communications a nightmare
of incompatible protocols and physical networks.
The 1980s saw an attempt to standardize communications with General Mo-
tors manufacturing automation protocol (MAP). It was also a time for reducing
the size of the PLC and making them software programmable through sym-
bolic programming on personal computers instead of dedicated programming
terminals or handheld programmers.
The 1990s saw a gradual reduction in the introduction of new protocols, and
the modernization of the physical layers of some of the more popular protocols
that survived the 1980s. PLCs can now be programmable in function block
diagrams, instruction lists, C and structured text all at the same time. PCs are
also being used to replace PLCs in some applications. The original company
who commissioned the MODICON 084 has now switched to a PC based control
system.
1. The rst PLCs were designed and developed by Modicon as a relay re-
placer for GM and Landis.
2. The primary reason for designing such a device was eliminating the large
5
cost involved in replacing the complicated relay based machine control
systems for major U.S. car manufacturers.
3. These controllers eliminated the need of rewiring and adding additional
hardware for every new conguration of logic.
4. The rst PLC, model 084, was invented by Dick Morley in 1969.
5. The rst commercial successful PLC, the 184, was introduced in 1973
and was designed by Michel Greenberg.
Communications abilities began to appear in approximately 1973. The rst
such system was Modicons Modbus. The PLC could now talk to other PLCs
and they could be far away from the actual machine they were controlling.
1.6 Hard Wired Relay Comparison
At the outset of industrial revolution, especially during sixties and seventies,
relays were used to operate automated machines, and these were interconnected
using wires inside the control panel. In some cases a control panel covered an
entire wall. To discover an error in the systemmuch time was needed, especially
with more complex process control systems. On top of everything, a lifetime of
relay contacts was limited, so some relays had to be replaced. If replacement
was required, machine had to be stopped and production as well. Also, it could
happen that there was not enough room for necessary changes. A control panel
was used only for one particular process, and it wasnt easy to adapt to the re-
quirements of a new system. As far as maintenance, electricians had to be very
skillful in nding errors. In short, conventional control panels proved to be very
inexible. Typical example of conventional control panel is given in the follow-
ing picture. In Figure 1 you can see a large number of electrical wires, relays,
timers and other elements of automation typical for that period. The pictured
control panel is not one of the more complicated ones, so you can imagine what
complex ones looked like.
The most frequently mentioned disadvantages of a classic control panel are:
1. Large amount of work required connecting wires
2. Difculty with changes or replacements
3. Difculty in nding errors; requiring skillful/experienced work force
4. When a problem occurs, hold-up time is indenite, usually long
6
Figure 3: Typical Small Scale Control Panel
With invention of programmable controllers, much has changed in how a pro-
cess control system is designed. Many advantages appeared. Typical example
of control panel with a PLC controller is given in the following picture.
Figure 4: Typical Small Scale Control Panel
Advantages of control panel that is based on a PLC controller can be pre-
sented in few basic points:
7
1. Compared to a conventional process control system, number of wires
needed for connections is reduced by approximately 80
2. Diagnostic functions of a PLC controller allow for fast and easy error
detection.
3. Change in operating sequence or application of a PLC controller to a dif-
ferent operating process can easily be accomplished by replacing a pro-
gram through a console or using PC software (not requiring changes in
wiring, unless addition of some input or output device is required).
4. Needs fewer spare parts
5. It is much cheaper compared to a conventional system, especially in cases
where a large number of Input/Output instruments are needed and when
operational functions are complex
6. Reliability of a PLC is greater than that of an electro-mechanical relay or
a timer, because of less moving parts
7. They are compact and occupy less space
8. Use of PLC results in appreciable savings in Hardware and wiring cost
8
2 PROGRAMMABLE LOGIC CONTROLLER
Denition:
A Programmable controller is a solid state user programmable control sys-
tem with functions to control logic, sequencing, timing, arithmetic data manip-
ulation and counting capabilities. It can be viewed as an industrial computer
that has a central processor unit, memory, input output interface and a pro-
gramming device. The central processing unit provides the intelligence of the
controller. It accepts data, status information from various sensing devices like
limit switches, proximity switches, executes the user control program stored in
the memory and gives appropriate output commands to devices such as solenoid
valves, switches etc.
Input output interface is the communication link between eld devices and
the controllers. Through these interfaces the processor can sense and measure
physical quantities regarding a machine or process, such as, proximity, position,
motion, level, temperature, pressure, etc. Based on status sensed, the CPU
issues command to output devices such as valves, motors, alarms, etc. The
programmer unit provides the man machine interface. It is used to enter the
application program, which often uses a simple user-friendly logic. What is
inside a PLC? The PLC, being a microprocessor based device, has a similar
internal structure to many embedded controllers and compute rs. They consist
of the CPU, Memory and I/O devices. These components are integral to the
PLC controller. Additionally the PLC h as a connection for the Programming
and Monitoring Unit or to connect t o other PLCs in the eld.
Components:
The PLC mainly consists of a CPU, memory areas, and appropriate circuits
to receive input/output data. We can actually consider the PLC to be a box full
of hundreds or thousands of separate relays, counters, timers and data storage
locations. They dont physically exist but rather they are simulated and can
be considered software counters, timers, etc. Each component of a PLC has a
specic function:
1. The CPU is the brain of a PLC system. It consists of the microprocessor,
memory integrated circuits and circuits necessary to store and retrieve
information from memory. It also includes also includes communication
ports to the peripherals, other PLCs or programming terminals. The job
of the processor is to monitor status or state of input devices, scan and
solve the logic of a user program, and control on or off state of output
devices.
2. RAM or Random Access Memory is a volatile memory that would lose
9
its information if power were removed , hence some processor units are
provided with battery backup. Normally CMOS (Complementary Metal
Oxide Semiconductor) type RAM is used.
3. ROM is a non volatile type of memory. This means it stores it is data
even if no power is available. This type of memory information can only
be read, it is placed there for the internal use and operation of processor
units.
4. EEPROME or Electrically Erasable Programmable Read Only Memory
is usually an add on memory module that is used to backup the main
program in CMOS RAM of the processor. In many cases, the processor
can be programmed to load the EEPROMS program to RAM, if RAM is
lost or corrupted.
5. Input Relays (contacts) - These are connected to the outside world. They
physically exist and receive signals from switches, sensors, etc. Typically
they are not relays but rather they are transistors.
6. Internal Utility Relays - These do not receive signals from the outside
world nor do they physically exist. They are simulated relays and are
what enables a PLC to eliminate external relays. There are also some
special relays that are dedicated to performing only one task. Some are
always on while some are always off. Some are on only once during
power-on and are typically used for initializing data that was stored.
7. Counters - These are simulated counters and they can be programmed to
count pulses. Typically these counters can count up, down or both up and
down. Since they are simulated they are limited in their counting speed.
Some manufacturers also include high-speed counters that are hardware
based. We can think of these as physically existing.
8. Timers - These come in many varieties and increments. The most com-
mon type is an on-delay type. Others include off-delay and both retentive
and non-retentive types. Increments vary from 1 millisecond through 1
second.
9. Output Relays (coils) - These are connected to the outside world. They
physically exist and send on/off signals to solenoids, lights, etc. They can
be transistors, relays, or triacs depending upon the model chosen.
10. Data Storage - Typically there are registers assigned to simply store data.
They are usually used as temporary storage for math or data manipulation.
They can also typically be used to store data when power is removed from
10
the PLC. Upon power-up they will still have the same contents as before
power was removed
A counter is a simple device intended to do one simple thing - count. Using
them can sometimes be a challenge however because every manufacturer seems
to use them a different way. There are several different types of counters. There
are up-counters called CTU CNT, or CTR that only count up, such as 1, 2, and
3. There are also down counters called CTD that only count down, such as 9,
8, 7, etc. In addition to these two, there are up-down counters, typically called
UDC (up-down counter). These count up and/or down (1,2,3,4,3,2,3,4,5,...)
Figure 5: Diagram of Counter
A timer is an instruction that waits a set amount of time before doing some-
thing. As usual in industry, different types of timers are available with different
manufacturers. The most common type of timer is an On-Delay Timer. This
type of timer simply delays turning on its respective output. In other words,
after our sensor (input) turns on we wait x number of seconds before activating
a solenoid valve (output). This is the most common timer. It is often called
TON (timer on-delay), TIM (timer) or TMR (timer). Another type of timer is
an Off-Delay Timer. This type of timer is the opposite of the on-delay timer
listed above. This timer delays turning off its respective output. After a sensor
(input) sees a target we turn on a solenoid (output). When the sensor no longer
sees the target we hold the solenoid on for x number of seconds before turning
it off. It is called a TOF (timer off-delay) and is less common than the on-delay
type listed above. Very few manufacturers include this type of timer, although
it can be quite useful. The last type of timer is a Retentive or Accumulating
timer. This type of timer needs 2 inputs. One input starts the timing event (i.e.
the clock starts ticking) and the other resets it. The on/off delay timers above
would be reset if the input sensor wasnt on/off for the complete timer duration.
This timer however holds or retains the current elapsed time when the sensor
turns off in mid-stream. For example, we want to know how long a sensor is
on for during a 1 hour period. If we use one of the above timers they will keep
resetting when the sensor turns off/on. This timer however, will give us a to-
11
tal or accumulated time. It is often called an RTO (retentive timer) or TMRA
(accumulating timer).
Figure 6: diagram of Timer
2.1 INPUT MODULE
Input Module: Input modules interface directly to devices such as switches and
temperature sensors. Input modules convert many different types of electrical
signals such as 120VAC, 24VDC, or 4-20mA, to signals which the controller
can understand since all electrical systems are inherently noisy, electrical isola-
tion is provided between input and processor. The component most often used
for this purpose is optocoupler .Input signal from the eld devices are usually 4
to 20 ma or 0-10 V.
Figure 7: Complete Automation System Components
2.2 OUTPUT MODULE
Output module : It interface directly to devices such as motor starters and lights
Output modules take digital signals from the PLC and convert them to electrical
signals such as 24VDC and 4 mA that eld devices can understand. D to A
conversion is carried out in there modules. Usually Silicon Controlled Rectier
12
Figure 8: Complete Automation System Components
(SCR), triac, or dry contact relays are used for this purpose. Normally the output
signal is 0-10 V or 4-20 ma.
Figure 9: Complete Automation System Components
PLC Operation: PLC operates by continually scanning the program and
acting upon the instructions , one at a time, to switch on or off the various
outputs. In order to do this PLC rst scans all the inputs and stores their states
in memory. Then it carries out program scan and decides which outputs should
be high according to the program logic.
Then nally it updates these values to the output table, making the required
outputs go high. At his point PLC checks its own operating system and if ev-
erything is ok, it goes back to scanning inputs all over again.
PLC SCAN CYCLE: A PLC works by continually scanning a program.
We can think of this scan cycle as consisting of 3 important steps. There are
typically more than 3 but we can focus on the important parts and not worry
about the others. Typically the others are checking the system and updating the
13
current internal counter and timer values. The rst type of scanning, as shown in
the diagram below, is not as common as the type that will be discussed second.
The rst step is to check the input status. This step is therefore generally
referred to as the Check Input Status stage. First the PLC takes a look at each
input to determine if it is on or off. In other words, is the sensor connected to
the rst input on? How about the second input? How about the third? This goes
on and on through the entire program. It records this data into its memory to be
used during the next step.
Next the PLC executes your program one instruction at a time, called the
Execute Program stage. For example, if your program said that if the rst input
was on then it should turn on the rst output. Since it already knows which
inputs are on/off from the previous step it will be able to decide whether the
rst output should be turned on based on the state of the rst input. It will store
the execution results for use later during the next step.
Finally the PLC updates the status of the outputs. It updates the outputs
based on which inputs were on during the rst step and the results of executing
your program during the second step. Based on the example in step 2 it would
now turn on the rst output because the rst input was on and your program
said to turn on the rst output when this condition is true.
A new style of scanning has been implemented in the more recent years,
called rung scanning. This type basically scans each ladder rung individually in
the entire ladder logic program, updating the outputs on that rung after scanning
through the inputs. This changes the type of programming that will be used as
well. If an output is in a rung above the inputs it depends on, you will not get
the output updated until the next scan, as the program will keep scanning down
until the last rung, then start over. This style is very advantageous in certain
situations. If you want your outputs updated at the soonest possible moment,
this is the style of scanning that you want to use.
SCAN TIME
Time taken by plc to execute these three steps (Checking Input status, Exe-
cuting Program, Updating Output Status) is denoted by its scan time.
COMMUNICATION
There are several methods to communicate between a PLC and a Program-
mer or even between two PLCs. PLCs have built in communications ports, usu-
ally 9 pin RS 232, RS-485, TTY but optionally EIA-485 or Ethernet Modbus,
BACnector DF1 os usually included as one of the communications protocols.
Other options include various eldbuses such as Device Net or Probus. Most
modern PLCs can communicate over a network to some other system , such
as a computer running a SCADA ( Supervisory Control And Data Acquistion )
14
Figure 10: Complete Automation System Components
system or web browser.
2.3 Wiring In a PLC
2.3.1 Generation of Input Signal
Inside the PLC housing, connected between each input terminal and the Com-
mon terminal, is an opto-isolator device (Light-Emitting Diode) that provides
an electrically isolated high Logic signal to the computers circuitry (a photo-
transistor interprets the LEDs light) when there is 120 VAC power applied be-
tween the respective input terminal and the Common terminal. An indicating
LED on the front panel of the PLC gives visual indication of an energized
input.
Figure 11: Complete Automation System Components
15
Output signals are generated by the PLCs computer circuitry activating a
switching device (transistor, TRIAC, or even an electromechanical relay), con-
necting the Source terminal to any of the Y- labeled output terminals. The
Source terminal, correspondingly, is usually connected to the L1 side of the
120 VAC power source. As with each input, an indicating LED on the front
panel of the PLC gives visual indication of an energized output
In this way, the PLC is able to interface with real-world devices such as
switches and solenoids. The actual logic of the control system is established
inside the PLC by means of a computer program. This program dictates which
output gets energized under which input conditions. Although the program it-
self appears to be a ladder logic diagram, with switch and relay symbols, there
are no actual switch contacts or relay coils operating inside the PLC to create
the logical relationships between input and output. These are imaginary con-
tacts and coils, if you will. The program is entered and viewed via a personal
computer connected to the PLCs programming port.
2.4 PLC compared with other control systems
PLCs are well-adapted to a certain range of automation tasks. These are typ-
ically industrial processes in manufacturing where the cost of developing and
maintaining the automation system is high relative to the total cost of the au-
tomation, and where changes to the system would be expected during its oper-
ational life. PLCs contain input and output devices compatible with industrial
pilot devices and controls; little electrical design is required, and the design
problem centers on expressing the desired sequence of operations in ladder
logic (or function chart) notation. PLC applications are typically highly cus-
tomized systems so the cost of a packaged PLC is low compared to the cost of
a specic custom-built controller design. For high volume or very simple xed
automation tasks, different techniques are used.
A microcontroller-based design would be appropriate where hundreds or
thousands of units will be produced and so the development cost (design of
power supplies and input/output hardware) can be spread over many sales, and
where the end-user would not need to alter the control. Automotive applications
are an example; millions of units are built each year, and very few end-users al-
ter the programming of these controllers. However, some specialty vehicles
such as transit busses economically use PLCs instead of custom-designed con-
trols, because the volumes are low and the development cost would be uneco-
nomic.
PLCs may include logic for single-variable feedback analog control loop,
a proportional, integral, derivative or PID controller. A PID loop could be
16
used to control the temperature of a manufacturing process, for example. His-
torically PLCs were usually congured with only a few analog control loops;
where processes required hundreds or thousands of loops, a distributed control
system (DCS) would instead be used. However, as PLCs have become more
powerful, the boundary between DCS and PLC applications has become less
clear.
17
3 Ladder Logic
3.1 Denition
Ladder logic is one form of drawing electrical logic schematics, and is a graph-
ical language very popular for programming Programmable Logic Controllers.
Ladder logic was originally invented to describe logic made from relays. The
name is based on the observation that programs in this language resemble lad-
ders, with two vertical rails and a series of horizontal rungs between them.
Figure 5 below is a very basic example of ladder logic used in a programmable
logic controls program.
Figure 12: Basic Ladder Logic Program
3.2 Comparison to Relay Logic
The program used in a controls schematic, called a ladder diagram, is similar to
a schematic for a set of relay circuits. An argument that aided the initial adop-
tion of ladder logic was that a wide variety of engineers and technicians would
be able to understand and use it without much additional training, because of
the resemblance to familiar hardware systems. This argument has become less
relevant lately given that most ladder logic programmers have a software back-
ground in more conventional programming languages, and in practice imple-
mentations of ladder logic have characteristics such as sequential execution that
18
make the analogy to hardware somewhat imperfect. Electricians and data ca-
bling or control technicians still argue that this is the best graphical interface as
they generally do not have any computer science or digital systems background,
and are therefore taught with this interface in sequence with relay logic. Relay
Figure 13: Electromechanical Relay
logic is the precursor to ladder logic, and is a method of controlling industrial
electronic circuits by using relays and contacts. Figure 6 above shows an aver-
age mechanical relay used in older relay logic systems. The schematic diagrams
for relay logic circuits are often called line diagrams, because the inputs and out-
puts are essentially drawn in a series of lines, with the lines representing actual
wires run in the circuit. A relay logic circuit is an electrical network consist-
ing of lines, in which each input/output group must have electrical continuity
with all components in that group of devices to enable the output device. The
Relay logic diagrams represent the physical interconnection of devices, while
the relay logic circuit forms an electrical schematic diagram for the control of
input and output devices. This is why electricians and control technicians can
easily understand and interpret relay logic and ladder logic diagrams. Figure 7
below shows a basic relay logic circuit. Notice how it differs from the ladder
logic circuit in Figure 5 in that the virtual inputs and outputs in the ladder logic
circuit have replaced the actual relays and coils in the relay logic circuit.
Figure 14: Basic Relay logic Circuit
19
Figure 7 is a small, basic relay logic circuit. You can see how in relay logic
circuits the push buttons are represented with graphical drawings of a normally
closed push button for the stop button, and a normally open push button for the
start button. The coil that is marked M is a motor coil, and is a physical piece
of equipment in the same location as the motor, which is represented by a circle
with the letter M in the middle. The over current or overload device is repre-
sented by a normally closed coil symbol with O.L. over it. There would only be
seven wires to connect in this circuit, so this would not be very difcult to wire,
but when more inputs and outputs are added, the difculty grows exponentially.
Figure 8 shows an expanded relay circuit of Figure 7 in that a double pole single
throw push button is added into the diagram to be used as a jog function. As
the diagram shows, a jog switch is used to run the output (motor). Only one
component is added, but three wires need to be installed in the circuit for the
component to be utilized in the intended manner.
Figure 9 below adds four more components to the system. Two of them are
just coils from the motor apparatus that are used as inputs and the other two are
a red and green light to be utilized as output/motor status indicators for the user.
Figure 15: Relay Logic Circuit with Jog function and Status Indicators
This circuit adds 6 additional wires to the original circuit in Figure 7. If
both of the additions from Figure 8 and 9 were added to the original circuit,
this would add 5 components and 9 additional wires. This illustrates how using
a programmable logic controller is advantageous in that adding any number
of relays takes much less effort. It doesnt seem like a large amount of work
to connect just 9 additional wires, but in a real world situation, the motor in
question may be on top of a grain silo, and the start/stop station may be a few
hundred feet away in a control booth. Pulling all these control wires would
take hours instead of a few minutes sitting in front of a programming terminal.
Programmable logic controllers coupled with ladder logic can make some of the
most labor intensive tasks become easy, enjoyable projects.
20
Figure 16: Complex Ladder Diagram
Ladder logic is the most widely used program for programmable logic con-
trollers where sequential control of a process or manufacturing operation is re-
quired. Ladder logic is useful for simple but critical control systems, or for
reworking old hardwired relay circuits. As programmable logic controllers be-
came more sophisticated it has also been used in very complex automation sys-
tems. Figure 10 above shows a much more complicated ladder logic diagram
than the one shown in Figure 5. It is relatable to the relay circuits in Figures
7, 8, and 9 as well in that some of the outputs are motors and status lights. In
addition there are holding/latching contacts included, but they are not a piece
of hardware. In fact, they are just the address of the respective output being
referenced, which will be discussed in greater detail later. This is still not a very
large program. Ladder logic programs can easily grow to more than 500 rungs
to nish some functions.
21
3.3 Ladder Logic Programming
3.3.1 Introduction
Ladder logic or ladder diagrams are the most common programming language
used to program a PLC. Ladder logic was one of the rst programming ap-
proaches used in PLCs because it borrowed heavily from the relay diagrams
that plant electricians already knew. The symbols used in relay ladder logic
consist of a power rail to the left, a second power rail to the right, and individual
circuits that connect the left power rail to the right. The logic of each circuit (or
rung) is solved from left to right. A common mistake made by most people is
trying to think of the diagram as having to have current across the rung for the
output to function. This has given many people trouble because of the fact that
some inputs are not inputs, which will be true when there isnt current through
this sensor. These concepts will be discussed more later. The symbols of these
diagrams look like a ladder - with two side rails and circuits that resemble rungs
on a ladder.
Figure 17: Basic Ladder Logic Program
While Ladder Logic is the most commonly used PLC programming lan-
guage, but it is not the only one. Following table lists some of the Languages
that are used to program a PLC.
1. Ladder Diagram()LD.
2. Functional block Diagram (FBD)
3. Structured Text (ST)
4. Instruction List (IL)
5. Sequential Functional Chart (SFC)
Ladder logic is a method of drawing electrical logic schematics. It is now a
graphical language very popular for programming Programmable Logic Con-
trollers (PLCs). It was originally invented to describe logic made from relays.
22
The name is based on the observation that programs in this language resemble
ladders, with two vertical rails and a series of horizontal rungs between
them. It is a graphical programming language, initially programmed with sim-
ple contacts that simulates the opening and closing of relays. Ladder Logic pro-
gramming has been expanded to include functions such as Counters, Timers,
shift Registers and math operations.
A program in ladder logic, also called a ladder diagram, is similar to a
schematic for a set of relay circuits. An argument that aided the initial adoption
of ladder logic was that a wide variety of engineers and technicians would be
able to understand and use it without much additional training, because of the
resemblance to familiar hardware systems. (This argument has become less rel-
evant given that most ladder logic programmers have a software background in
more conventional programming languages, and in practice implementations of
ladder logic have characteristics such as sequential execution and support for
control ow features that make the analogy to hardware somewhat imprecise.)
Ladder logic is widely used to program PLCs, where sequential control of a
process or manufacturing operation is required. Ladder logic is useful for sim-
ple but critical control systems, or for reworking old hardwired relay circuits.
As programmable logic controllers became more sophisticated it has also been
used in very complex automation systems.
Ladder logic can be thought of as a rule-based language, rather than a pro-
cedural language. A rung in the ladder represents a rule. When implemented
with relays and other electromechanical devices, the various rules execute si-
multaneously and immediately. When implemented in a programmable logic
controller, the rules are typically executed sequentially by software, in a loop.
By executing the loop fast enough, typically many times per second, the effect
of simultaneous and immediate execution is obtained. In this way it is similar to
other rule-based languages, like spreadsheets or SQL. However, proper use of
programmable controllers requires understanding the limitations of the execu-
tion order of rungs. Figure 11 shows a simplied ladder logic circuit with one
input and one output. The logic of the rung above is such:
Figure 18: Basic Program to show input and output
1. If Input1 is ON (or true) - power (logic) completes the circuit from the
23
left rail to the right rail - and Output1 turns ON (or true).
2. If Input1 is OFF (or false) - then the circuit is not completed and logic
does not ow to the right - and Output 1 is OFF (or false).
There are many logic symbols available in Ladder Logic - including timers,
counters, math, and data moves such that any logical condition or control loop
can be represented in ladder logic. With just a handful of basic symbols such as
a normally open contact, normally closed contact, normally open coil, normally
closed coil, timer and counter most logical conditions can be represented.
Normally Open Contact
Figure 19: Normally Open Contact
This can be used to represent any input to the control logic such as a switch
or sensor, a contact from an output, or an internal output. When solved the
referenced input is examined for a true (logical 1) condition. If it is true, the
contact will close and allow logic to ow from left to right. If the status is
FALSE (logical 0), the contact is open and logic will NOT ow from left to
right.
Normally Open Coil
This can be used to represent any discrete output from the control logic.
When solved if the logic to the left of the coil is TRUE, the referenced output
is TRUE (logical 1).
Figure 20: Normally Open Coil
Normally Closed Contact
When solved the referenced input is examined for an OFF condition. If the
status is OFF (logical 0) power (logic) will ow from left to right. If the status
is ON, power will not ow.
Normally Closed Coil
24
Figure 21: Normally Closed Contact
Figure 22: Normally Closed coil
When solved if the coil is a logical 0, power will be turned on to the
device. If the device is logical 1, power will be OFF. Normally Open Contact
Basic ANDand ORGates The AND is a basic fundamental logic condition
that is easy to directly represent in Ladder Logic. Figure 8 shows a simplied
AND gate on a ladder rung.
Figure 23: Basic And Gate using Ladder Logic
Figure 24: Basic And Gate using Ladder Logic
In order for Light1 to turn TRUE, Switch1 must be TRUE, AND Switch2
must be TRUE. If Switch1 is FALSE, logic (not power) ows from the left rail,
but stops at Switch1. Light1 will be TRUE regardless of the state of Switch2. If
Switch1 is TRUE, logic makes it to Switch2. If Switch2 is TRUE, power cannot
ow any further to the right, and Light1 is FALSE. If Switch1 is TRUE, AND
Switch2 is TRUE - logic ows to Light1 solving its state to TRUE. The OR is
a logical condition that is easy to represent in Ladder Logic. Figure 13 shows
25
a simple OR gate. Notice the differences in logic between the OR and AND
gates.
If Switch1 is TRUE, logic ows to Light1 turning it to TRUE. If Switch2
is TRUE, logic ows through the Switch2 contact, and up the rail to Light1
turning it to TRUE. If Switch1 AND Switch 2 are TRUE Light1 is TRUE. The
only way Light1 is FALSE is if Switch1 AND Switch2 are FALSE. In other
words, Light1 is TRUE if Switch1 OR Switch2 is TRUE.
Basic Timers and Counters
Many times programs will call for action to be taken in a control program
based on more than the states of discrete inputs and outputs. Sometimes, pro-
cesses will need to turn on after a delay, or count the number of times a switch
is hit. To do these simple tasks, Timers and Counters are utilized.
A timer is simply a control block that takes an input and changes an output
based on time. There are two basic types of timers. There are other advanced
timers, but they wont be discussed in this report. An On-Delay Timer takes
an input, waits a specic amount of time, allows logic to ow after the delay.
An Off-Delay Timer allows logic to ow to an output and keeps that output
true until the set amount of time has passed, then turns it false, hence off-delay.
Figure 14 above shows an On-Delay Timer with a 10 second delay before it
passes the logic through it.
A counter simply counts the number of events that occur on an input. There
are two basic types of counters called up counters and down counters. As its
name implies, whenever a triggering event occurs, an up counter increments the
counter, while a down counter decrements the counter whenever a triggering
event occurs. Figure 15 shows the typical graphical representation of an Up
Counter.
Building a PLC/Ladder Logic Program :
Building a small ladder logic program to run on a PLC network is quite easy.
For the beginner, it is easier to see the ladder diagram in the form of relay logic.
Figure 16 below shows a basic start/stop station for a motor in relay logic.
Just as in Figure 16 above, relay logic shows all components in the system.
This is because relay logic is the same as the wiring diagrams that the electri-
cians use, so all the wiring needs to be shown for the logic to work. Because of
this, some components may not need to be included in the plc ladder logic dia-
gram. Figure 17 above shows the same circuit as in Figure 16 with the overload
removed. The overload is needed in relay logic because you have to have an
overload device on any circuit; therefore it needs to be in the wiring diagram.
This way, if you push too much current to the motor, the overload device will
interrupt the circuit. Overloads are included internally in most any device any-
26
more, but you will still see this in diagrams. There is still an overload device
in a plc ladder logic circuit, but ladder logic shows only those components that
have an input or output address, so you do not see it. In Figure 17, you can see
that the start and stop buttons along with the motor relay will all be turned to
inputs in the plc diagram and the motor, signied by a circle with an M in the
middle will be an output. The motor relay will not be a physical entity in the
plc ladder diagram as it is in this relay logic. It will simply be an input that uses
the same I/O address as the motor output. The stop button input can be located
on either side of the start button/relay gate, as long as it is still in series with it.
Figure 18 above shows the addition of a Jog Function to the relay circuit.
The jog function is generally added to any circuit for troubleshooting purposes
only. Most jog functions are set up so that the only time the motor will run
with the help of the jog function is when the Jog Button is pushed. In Figure 18
above, you can see this with the relay logic. As the circuit looks right now, when
the Start Button is pressed, the motor will start, energizing the relay, and going
across the Jog Buttons normally closed contacts. The motor will stay running
this way until the Stop Button is pressed. If instead the Jog Button is pressed,
the current will travel across the normally open Jog contacts that are nowclosed.
The motor will stay running until the Jog Button is no longer pressed.
Figure 19 above shows that same circuit with Status Indicators added. These
are used in control rooms to inform users of the status of their motors or other
moving parts. Green is the generally accepted color for a motor going, while
red is stopped. The green light is energized when the normally open contact is
energized by the moving motor, closing it. The red light is energized whenever
a normally closed relay is closed, so it will turn off whenever the motor starts
to run. From Figure 16 to Figure 19, one can see that with every component
added, many wires need to be connected as well. Depending on how far away
these components are away from each other, this can be very difcult and time
consuming.
Figure 20 above was converted from the relay logic in Figure 19 to the PLC
ladder logic seen here. If the PLC logic here was used in Figures 16-Figures 19,
adding the various component wouldve taken much less time than physically
wiring each component. PLC ladder logic can differ from relay logic in that
different components are used as well. In the relay diagrams, a single button
double pole switch was used so that it could perform two different functions. In
PLC ladder logic, just a single pole button is needed, because the computer can
be asked to look for a on or off state. For the status lights, instead of running
wires to the motor relays the PLC diagram just looks for a true or false state of
the motor output.
27
3.4 EXAMPLES OF LADDER PROGRAMMING
Programming For Start/Stop of Motor by PLC Often we have a little green
start button to turn on a motor, and we want to turn it off with a big red
Stop button. The pushbutton switch connected to input X1 serves as the
Start switch, while the switch connected to input X2 serves as the Stop.
Another contact in the program, named Y1, uses the output coil status as a seal-
in contact, directly, so that the motor contactor will continue to be energized
after the Start pushbutton switch is released. You can see the normally-closed
contact X2 appear in a colored block, showing that it is in a closed (electrically
conducting) state.
Figure 25: Start/Stop of Motor by PLC
Starting of Motor If we were to press the Start button, input X1 would
energize, thus closing the X1 contact in the program, sending power to the
Y1 coil, energizing the Y1 output and applying 120 volt AC power to the real
motor contactor coil. The parallel Y1 contact will also close, thus latching the
circuit in an energized state:
Logic for Continous Running of motor When Start Button is Released
Now, if we release the Start pushbutton, the normally-open X1 contact will
return to its open state, but the motor will continue to run because the Y1 seal-
in contact continues to provide continuity to power coil Y1, thus keeping
the Y1 output energized:
28
Figure 26: Starting of Motor
Figure 27: Continous Running of motor When Start Button is Released
To Stop the Motor To stop the motor, we must momentarily press the
Stop pushbutton, which will energize the X2 input and open the normally-
29
closed contact, breaking continuity to the Y1 coil: When the Stop push-
button is released, input X2 will de-energize, returning contact X2 to its nor-
mal, closed state. The motor, however, will not start again until the Start
pushbutton is actuated, because the seal-in of Y1 has been lost:
Figure 28: To Stop the Motor
30
4 SCADA
An industrial SCADAsystemwill be used for the development of the controls of
the four LHC experiments. This paper describes the SCADA systems in terms
of their architecture, their interface to the process hardware, the functionality
and the application development facilities they provide.
4.1 Introduction
Widely used in industry for Supervisory Control and Data Acquisition of in-
dustrial processes, SCADA systems are now also penetrating the experimental
physics laboratories for the controls of ancillary systems such as cooling, ven-
tilation, power distribution, etc.
SCADA systems have made substantial progress over the recent years in
terms of functionality, scalability, performance and openness such that they are
an alternative to in house development even for very demanding and complex
control systems as those of physics experiments.
4.2 Types of SCADA
1. D+R+N ( Development +Run + Networking)
2. R+N ( Run +Networking )
3. Factory focus
4.3 Features of SCADA
1. Dynamic process Graphic
2. Alarm summery
3. Alarm history
4. Real time trend
5. Historical time trend
6. Security (Application Security)
7. Data base connectivity
31
8. Device connectivity
9. Scripts
10. Recipe management
4.4 Manufacture of SCADA
Modicon (Telemecanique) Visual look
1. Allen Bradly : RS View
2. Siemens: win cc
3. KPIT : ASTRA
4. Intelution : Aspic
5. Wonderware : Intouch
4.5 What does SCADA MEAN?
SCADA stands for Supervisory Control And Data Acquisition. As the name
indicates, it is not a full control system, but rather focuses on the supervisory
level. As such, it is a purely software package that is positioned on top of hard-
ware to which it is interfaced, in general via Programmable Logic Controllers
(PLCs), or other commercial hardware modules.
SCADA systems are used not only in industrial processes: e.g. steel mak-
ing, power generation (conventional and nuclear) and distribution, chemistry,
but also in some experimental facilities such as nuclear fusion. The size of such
plants range from a few 1000 to several 10 thousands input/output (I/O) chan-
nels. However, SCADA systems evolve rapidly and are now penetrating the
market of plants with a number of I/O channels of several 100 K: we know of
two cases of near to 1 M I/O channels currently under development.
SCADA systems used to run on DOS, VMS and UNIX; in recent years all
SCADA vendors have moved to NT and some also to Linux.
32
4.6 Architecture
4.6.1 Hardware Architecture
One distinguishes two basic layers in a SCADAsystem: the client layer which
caters for the man machine interaction and the data server layer which handles
most of the process data control activities. The data servers communicate with
devices in the eld through process controllers. Process controllers, e.g. PLCs,
are connected to the data servers either directly or via networks or eldbuses
that are proprietary (e.g. Siemens H1), or non-proprietary (e.g. Probus). Data
servers are connected to each other and to client stations via an Ethernet LAN.
The data servers and client stations are NT platforms but for many products
the client stations may also be W95 machines. Fig.1. shows typical hardware
architecture.
4.6.2 Generic Software Architecture
However, it is possible to have dedicated servers for particular tasks, e.g. his-
torian, datalogger, alarm handler. Fig. 2 shows a SCADA architecture that is
generic for the products that were evaluated.
4.7 Communications
4.7.1 Internal Communication
Server-client and server-server communication is in general on a publish-subscribe
and event-driven basis and uses a TCP/IP protocol, i.e., a client application sub-
scribes to a parameter which is owned by a particular server application and
only changes to that parameter are then communicated to the client application.
4.7.2 Access to Devices
The data servers poll the controllers at a user dened polling rate. The polling
rate may be different for different parameters. The controllers pass the requested
parameters to the data servers. Time stamping of the process parameters is typ-
ically performed in the controllers and this time-stamp is taken over by the data
server. If the controller and communication protocol used support unsolicited
data transfer then the products will support this too.
The products provide communication drivers for most of the common PLCs
and widely used eld-buses, e.g., Modbus. Of the three eldbuses that are rec-
ommended at CERN, both Probus and Worldp are supported but CANbus
33
often not [3]. Some of the drivers are based on third party products (e.g., Ap-
plicom cards) and therefore have additional cost associated with them. A single
data server can support multiple communications protocols: it can generally
support as many such protocols as it has slots for interface cards.
The effort required to develop new drivers is typically in the range of 2-6
weeks depending on the complexity and similarity with existing drivers, and a
driver development toolkit is provided for this.
4.8 Interfacing
4.8.1 Application Interfaces / Openness
The provision of OPC client functionality for SCADA to access devices in an
open and standard manner is developing. There still seems to be a lack of de-
vices/controllers, which provide OPC server software, but this improves rapidly
as most of the producers of controllers are actively involved in the development
of this standardThe products also provide:
1. an Open Data Base Connectivity (ODBC) interface to the data in the
archive/logs, but not to the conguration database,
2. an ASCII import/export facility for conguration data,
3. a library of APIs supporting C, C++, and Visual Basic (VB) to access data
in the RTDB, logs and archive. The API often does not provide access to
the products internal features such as alarmhandling, reporting, trending,
etc.
The PC products provide support for the Microsoft standards such as Dy-
namic Data Exchange (DDE) which allows e.g. to visualise data dynamically in
an EXCEL spreadsheet, Dynamic Link Library (DLL) and Object Linking and
Embedding (OLE).
4.8.2 Database
The conguration data are stored in a database that is logically centralised but
physically distributed and that is generally of a proprietary format. System
(RDBMS) at a slower rate either directly or via an ODBC interface.
34
4.8.3 Scalability
Scalability is understood as the possibility to extend the SCADA based control
system by adding more process variables, more specialised servers (e.g. for
alarm handling) or more clients. The products achieve scalability by having
multiple data servers connected to multiple controllers. Each data server has its
own conguration database and RTDB and is responsible for the handling of a
sub-set of the process variables (acquisition, alarm handling, archiving).
4.8.4 Redundancy
The products often have built in software redundancy at a server level, which
is normally transparent to the user. Many of the products also provide more
complete redundancy solutions if required.
4.8.5 Functionality
Access Control Users are allocated to groups, which have dened read/write
access privileges to the process parameters in the system and often also to spe-
cic product functionality.
MMI The products support multiple screens, which can contain combi-
nations of synoptic diagrams and text. They also support the concept of a
generic graphical object with links to process variables. These objects can
be dragged and dropped from a library and included into a synoptic diagram.
Most of the SCADA products that were evaluated decompose the process
in atomic parameters (e.g. a power supply current, its maximum value, its
on/off status, etc.) to which a Tag-name is associated. The Tag-names used to
link graphical objects to devices can be edited as required. The products include
a library of standard graphical symbols, many of which would however not be
applicable to the type of applications encountered in the experimental physics
community.
Standard windows editing facilities are provided: zooming, re-sizing, scrolling...
On-line conguration and customisation of the MMI is possible for users with
the appropriate privileges. Links can be created between display pages to navi-
gate from one view to another.
4.8.6 Trending
The products all provide trending facilities and one can summarise the common
capabilities as follows:
35
1. the parameters to be trended in a specic chart can be predened or de-
ned on-line
2. a chart may contain more than 8 trended parameters or pens and an unlim-
ited number of charts can be displayed (restricted only by the readability)
3. real-time and historical trending are possible, although generally not in
the same chart
4. historical trending is possible for any archived parameter
5. zooming and scrolling functions are provided
6. parameter values at the cursor position can be displayed
The trending feature is either provided as a separate module or as a graphical
object (ActiveX), which can then be embedded into a synoptic display. XY and
other statistical analysis plots are generally not provided.
4.8.7 Alarm Handling
Alarm handling is based on limit and status checking and performed in the
data servers. More complicated expressions (using arithmetic or logical expres-
sions) can be developed by creating derived parameters on which status or limit
checking is then performed. The alarms are logically handled centrally, i.e., the
information only exists in one place and all users see the same status (e.g., the
acknowledgement), and multiple alarm priority levels (in general many more
than 3 such levels) are supported.
It is generally possible to group alarms and to handle these as an entity
(typically ltering on group or acknowledgement of all alarms in a group). Fur-
thermore, it is possible to suppress alarms either individually or as a complete
group. The ltering of alarms seen on the alarm page or when viewing the alarm
log is also possible at least on priority, time and group. However, relationships
between alarms cannot generally be dened in a straightforward manner. E-
mails can be generated or predened actions automatically executed in response
to alarm conditions.
4.8.8 Logging/Archiving
The terms logging and archiving are often used to describe the same facility.
However, logging can be thought of as medium-term storage of data on disk,
whereas archiving is long-term storage of data either on disk or on another per-
manent storage medium.
36
Logging is typically performed on a cyclic basis, i.e., once a certain le size,
time period or number of points is reached the data is overwritten. Logging of
data can be performed at a set frequency, or only initiated if the value changes
or when a specic predened event occurs. Logged data can be transferred to an
archive once the log is full. The logged data is time-stamped and can be ltered
when viewed by a user. The logging of user actions is in general performed
together with either a user ID or station ID. There is often also a VCR facility
to play back archived data.
4.8.9 Report Generation
One can produce reports using SQL type queries to the archive, RTDB or logs.
Although it is sometimes possible to embed EXCEL charts in the report, a cut
and paste capability is in general not provided. Facilities exist to be able to
automatically generate, print and archive reports.
4.8.10 Automation
The majority of the products allow actions to be automatically triggered by
events. A scripting language provided by the SCADA products allows these
actions to be dened. In general, one can load a particular display, send an
Email, run a user dened application or script and write to the RTDB.
The concept of recipes is supported, whereby a particular system congura-
tion can be saved to a le and then re-loaded at a later date.
Sequencing is also supported whereby, as the name indicates, it is possible to
execute a more complex sequence of actions on one or more devices. Sequences
may also react to external events.
Some of the products do support an expert system but none has the concept
of a Finite State Machine (FSM).
37
5 Application Development
5.1 Conguration
The development of the applications is typically done in two stages. First the
process parameters and associated information (e.g. relating to alarm condi-
tions) are dened through some sort of parameter denition template and then
the graphics, including trending and alarm displays are developed, and linked
where appropriate to the process parameters. The products also provide an
ASCII Export/Import facility for the conguration data (parameter denitions),
which enables large numbers of parameters to be congured in a more efcient
manner using an external editor such as Excel and then importing the data into
the conguration database.
However, many of the PC tools now have a Windows Explorer type devel-
opment studio. The developer then works with a number of folders, which each
contains a different aspect of the conguration, including the graphics.
The facilities provided by the products for conguring very large numbers
of parameters are not very strong. However, this has not really been an issue
so far for most of the products to-date, as large applications are typically about
50K I/O points and database population from within an ASCII editor such as
Excel is still a workable option.
On-line modications to the conguration database and the graphics is gen-
erally possible with the appropriate level of privileges.
5.2 Development Tools
The following development tools are provided as standard:
1. a graphics editor, with standard drawing facilities including freehand,
lines, squares circles, etc. It is possible to import pictures in many formats
as well as using predened symbols including e.g. trending charts, etc. A
library of generic symbols is provided that can be linked dynamically to
variables and animated as they change. It is also possible to create links
between views so as to ease navigation at run-time.
2. a data base conguration tool (usually through parameter templates). It is
in general possible to export data in ASCII les so as to be edited through
an ASCII editor or Excel.
3. a scripting language
38
4. an Application Program Interface (API) supporting C, C++, VB
5. a Driver Development Toolkit to develop drivers for hardware that is not
supported by the SCADA product.
5.3 Object Handling
The products in general have the concept of graphical object classes, which sup-
port inheritance. In addition, some of the products have the concept of an object
within the conguration database. In general the products do not handle objects,
but rather handle individual parameters, e.g., alarms are dened for parameters,
logging is performed on parameters, and control actions are performed on pa-
rameters. The support of objects is therefore fairly supercial.
5.4 Evolution
SCADA vendors release one major version and one to two additional minor
versions once per year. These products evolve thus very rapidly so as to take
advantage of new market opportunities, to meet new requirements of their cus-
tomers and to take advantage of new technologies.
As was already mentioned, most of the SCADA products that were evalu-
ated decompose the process in atomic parameters to which a Tag-name is as-
sociated. This is impractical in the case of very large processes when very large
sets of Tags need to be congured. As the industrial applications are increas-
ing in size, new SCADA versions are now being designed to handle devices
and even entire systems as full entities (classes) that encapsulate all their spe-
cic attributes and functionality. In addition, they will also support multi-team
development.
As far as new technologies are concerned, the SCADA products are now
adopting:
1. Web technology, ActiveX, Java, etc.
2. OPC as a means for communicating internally between the client and
server modules. It should thus be possible to connect OPC compliant
third party modules to that SCADA product.
5.5 Engineering
Whilst one should rightly anticipate signicant development and maintenance
savings by adopting a SCADA product for the implementation of a control sys-
39
tem, it does not mean a no effort operation. The need for proper engineering
can not be sufciently emphasised to reduce development effort and to reach
a system that complies with the requirements, that is economical in develop-
ment and maintenance and that is reliable and robust. Examples of engineering
activities specic to the use of a SCADA system are the denition of:
1. a library of objects (PLC, device, subsystem) complete with standard ob-
ject behaviour (script, sequences, ...), graphical interface and associated
scripts for animation,
2. templates for different types of panels, e.g. alarms,
3. instructions on how to control e.g. a device ...,
4. a mechanism to prevent conicting controls (if not provided with the
SCADA),
5. alarm levels, behaviour to be adopted in case of specic alarms, ...
5.6 Potential benets of SCADA
The benets one can expect from adopting a SCADA system for the control of
experimental physics facilities can be summarised as follows:
1. a rich functionality and extensive development facilities. The amount of
effort invested in SCADA product amounts to 50 to 100 p-years!
2. the amount of specic development that needs to be performed by the
end-user is limited, especially with suitable engineering.
3. reliability and robustness. These systems are used for mission critical
industrial processes where reliability and performance are paramount.
In addition, specic development is performed within a well-established
framework that enhances reliability and robustness.
4. technical support and maintenance by the vendor.
For large collaborations, as for the CERN LHC experiments, using a SCADA
system for their controls ensures a common framework not only for the devel-
opment of the specic applications but also for operating the detectors. Opera-
tors experience the same look and feel whatever part of the experiment they
control. However, this aspect also depends to a signicant extent on proper
engineering.
40
5.7 Where SCADA is used ?
Electric power generation, transmission and distribution: Electric utilities use
SCADA systems to detect current ow and line voltage, to monitor the opera-
tion of circuit breakers, and to take sections of the power grid online or ofine.
Water and sewage: State and municipal water utilities use SCADA to mon-
itor and regulate water ow, reservoir levels, pipe pressure and other factors.
41
6 CONCLUSION
With the speed of changing technology today it is easy to lose sight or knowl-
edge of the basic theory or operation of programmable logic. Most people sim-
ply use the hardware to produce the results they desire. Hopefully, this report
has given the reader a deeper insight into the inner workings of programmable
logic and its role in mechanical operations. The idea of programmable logic is
very simple to understand, but it is the complex programs that run in the lad-
der diagrams that make them difcult for the common user to fully understand.
Hopefully this has alleviated some of that confusion.
SCADA is used for the constructive working not for the destructive work
using a SCADA system for their controls ensures a common framework not
only for the development of the specic applications but also for operating the
detectors. Operators experience the same look and feel whatever part of the
experiment they control. However, this aspect also depends to a signicant
extent on proper engineering
42
References
[1] A Daneels, W Salter. Technology Survey Summary of Study Report ,
IT-CO/98-08-09, CERN, Geneva 26th Aug 1998.
[2] A Daneels, W Salter, Selection and Evaluation of Commercial SCADA
Systems for the Controls of the CERN LHC Experiments Proceedings of
the 1999 International Conference on Accelerator and Large Experimental
Physics Control Systems, Trieste, 1999, p.353.
[3] G Baribaud et al., Recommendations for the Use of Fieldbuses at CERN
in the LHC Era Proceedings of the 1997 International Conference on Ac-
celerator and Large Experimental Physics Control Systems, Beijing, 1997,
p.285.
[4] www.wikipedia.com
[5] literature.rockwellautomation.com/idc/groups
43

You might also like