SCADA Study Material
SCADA Study Material
In simple terms PLC is a solid-state industrial control device which receives signals from user
supplied controlled devices, such as sensors and switches, implements them in a precise pattern
determined by ladder-diagram based application progress stored in user memory, and provides
outputs for control of processes or user supplied devices, such as relays or motor starters.
PLCs come in different types, and it is generally chosen for an application depending upon the
number of inputs and outputs in a process.
PLC History
PLC development began in 1968 in response to a request from an US car manufacturer (GE).
The first PLCs were installed in industry in 1969.
Communications abilities began to appear in approximately 1973. They could also be used in the
70’s to send and receive varying voltages to allow them to enter the analog world.
The 80’s saw an attempt to: standardize communications with manufacturing automation
protocol (MAP), reduce the size of the PLC, and making them software programmable through
symbolic programming on personal computers instead of dedicated programming terminals or
handheld programmers.
The 90’s have seen 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
1980’s.
The latest standard “IEC 1131-3” has tried to merge plc programming languages under one
international standard. We now have PLCs that are programmable in function block diagrams,
instruction lists, C and structured text all at the same time.
PLCs is designed as a replacement for the hardwired rely and timer logic to be found in
traditional control panels, where PLC provides ease and flexibility of control based on
Reduced space: PLCs are completely solid state devices and hence are extremely compact in
comparison to hard-wired controller where electro-mechanical devices are used.
Higher Life and Reliability: These devices are extremely rugged. The chances of
defect/damage are very less as there is very lesser moving mechanisms here.
Economical: As the defect probability is very less, One can consider it as one time investment.
In this way, PLCs are undoubtedly most economical systems. Cost of PLC recovers within a
short period.
Energy saving: Average power consumption is just 1/10th of power consumed by an equivalent
relay based control.
iii. Error diagnostics with programming unit: Easily understood programming language.
Shorter Project Time: The hard wired control system can be constructed only when the task is
fully defined. However, In case of PLC , the construction of the controller and wiring are
independent of control program definition.
Easier Storage Archiving and Documentation: This is due to its compatibility with PC-AT,
Printer and Floppy disk.
Advantages:
⚫ Many inputs and outputs, excellent for controlling and monitoring many
processes.
⚫ Designed for industrial environments, very robust and reliable.
⚫ Reprogrammable.
⚫ Modular.
⚫ Ideally suited to supervisory control.
Disadvantages of a PLC
⚫ For simple applications where relay logic might suffice, using a PLC might blow out
costs due to the need to hire a programmer.
⚫ Math functions in a PLC are quite advanced, but when it comes to doing large amounts of
complex math computations then an industrial PC might be better suited.
⚫ Certain robotic and positioning applications may require extremely high speed execution
which may not be able to be achieved form a PLC.
⚫ Can be expensive for automating an application with fixed parameters for mass
production as compared to a microcontroller.
Types of PLCs
The general classification of PLC based upon the number of input and outputs is :
In this type of PLC all the components of the PLC are as a single unit. The number of I/O
supported by the PLC is decided by the manufacture and cannot be changed. This type of PLC
can support a small number of I/Os. Some examples of fixed PLC types by different
manufacturers and the terminology they use is :
of Fixed PLCs
⚫ Fixed PLCs have some great advantages over other types of PLCs. They have been
specifically design to cater for smaller, low end automation projects.
⚫ CPU processing power is low and memory is small so complex tasks can be
difficult to realize.
⚫ Inflexible because the number of input, output and communication interfaces are fixed.
⚫ Only suitable for basic applications with small number of inputs and outputs.
Modular Type PLC
Modular PLC is divided by compartments into which separate modules can be plugged. This
feature greatly increases the options and the unit’s flexibility. Mixing the different types of
modules according to the desire is possible. In modular type PLC the number of I/Os can be
increased by the addition of modules to the existing PLC.
⚫ They have been specifically design to cater for medium to high end automation projects.
⚫ Modular PLCs have lager memory, higher performance processors, larger number of
input and outputs, increased communication options, are fully customizable and are
easily expanded. This enables the modular PLC to handle larger scale applications and of
higher complexity .
⚫ Large in size so they take up more space in an enclosure than a fixed PLC.
⚫ The mounting system is more complex than a fixed PLC.
⚫ Higher in cost than a fixed PLC so may not be cost effective for smaller
applications.
Rack Type PLC
In Rack type PLC all the components of the PLC are as separated modules and are assembled
to form one unit by mounting the individual components on a rack. This PLC can support up
to thousands of I/Os.
of a Distributed PLC
A PLC program consists of a set of instructions either in textual or graphical form, which
represents the logic that governs the process the PLC is controlling. There are two main
classifications of PLC programming languages, which are further divided into many sub-
classified types.
⚫ Textual Language
⚫ Instruction list
⚫ Structured text
⚫ Graphical Form
⚫ Ladder Diagrams (LD) (i.e. Ladder Logic)
⚫ Function Block Diagram (FBD)
⚫ Sequential Function Chart (SFC)
Due to the simple and convenient features, graphical representation is much preferred
to textual languages.
Textual Language:
Instruction list
The Instruction List language resembles Assembly Language. PLC Programming Language
Instruction list, will use mnemonic codes such as LD (Load), AND, OR, etc. The Instruction
List contains instructions with each instruction on a new line with any comments you might
want to annotate at the end of each line.
Structured Text
Structured text is a text-based PLC programming language and is similar to Python, Visual
Basic, or C coding languages. Programming with structured text has multiple advantages,
such as the program requiring less space due to being text based instead of graphic based.
Additionally, the structured text can be combined with other
The PLC manufacturer typically determines PLC development software. Allen Bradley,
Siemens, and GE each have their own software development platforms for programming
their PLC models. Once the platform is determined, the actual programming of the PLC logic
can be done in a few different methods. The most common methods of PLC programming
include Ladder Logic, Function Block, and structured text.
Ladder Logic
Ladder Logic is a graphical PLC programming language and is the most common method of
programming. Ladder Logic can be used to execute tasks such as sequencing, counting,
timing, data manipulation, and more. Ladder Logic is structured similarly to relay logic;
however, the physical switches and coils used in relay logic are replaced by the PLC’s
memory locations and I/O.
Sequential Function Chart is similar to Flowchart. Steps act as a major function in the
program. These steps house the actions that occur when the program executed. This decision
can be based on timing, a certain phase of the process, or a physical state of an equipment.
Transitions are the instructions that you use to move from one step to another step by setting
conditions of true or false. Unlike traditional flowcharts, the Sequential Function Charts can
have multiple paths. One can use branches to initiate multiple steps at one time.
Function Block
Function block PLC programs are represented in the form of graphical blocks. Signals or
data flow into the function block from inputs connected to the PLC. When the incoming
signals or data triggers the function block’s pre-programmed function, the PLC executes one
or more outputs. Function blocks can have standard functions such as timers, counters,
calculating min and max values, obtaining averages, and more.
GE - Versa Pro
PLC Architecture
Memory unit:
All PLCs contain both RAM and ROM in varying amounts depending upon the design of
the PLC. The use of a PLC's memory is determined again by the design of the unit. However, all
PLC memories can be subdivided into at least five major areas memory of the PLC .
⚫ Executive Memory
⚫ System memory
⚫ Data Memory
Executive Memory:
The operating system or executive memory for the PLC is always in ROM since, once
programmed and developed by the manufacturer, it rarely needs changing. It is the one that
actually does the scanning in a PLC. The operating system is a special machine language
program that runs the PLC. It instructs the microprocessor to read each user instruction, helps the
microprocessor to interpret user programmed symbols and instructions, keeps track of all the I/O
status, and is responsible for maintaining/monitoring the current status of the health of the
system and all its components
System memory:
In order for the operating system to function, a section of the memory is allotted for
system administration. As the executive program performs its duties, it often requires a place to
store intermediate results and information. A section of RAM is installed for this purpose.
Normally this area is allotted for use of the operating system only and is not available to the user
for programming. It might be thought of as a scratch pad for the operating system to doodle on
as necessary. Some PLCs use this area for storing the information which passes between
programmer and operating system,
e.g. the operating system generates certain error codes store in the specific address in this area
during the execution of user program which can be read by user program; or the user may also
give additional information to the operating system before execution of user program by writing
some codes in the specific address in this area, etc.
I/O Image Table Another portion of RAM is allocated for the storage of current I/O status.
Every single input/output module has been assigned to it a particular location within the
input/output image table. The location within the input and output image tables are identified by
addresses, each location has its own unique address. During the execution of user program, the
microprocessor scans the user program and interpret the user commands, the status of input
modules used are read from the input image table (not directly from the input module itself).
Various output device status generated
Data Memory:
Whenever timers, counters, mathematics and process parameters are required, an area of
memory must be set aside for data storage. The data storage portion of memory is allocated for
the storage of such items as timers or counter preset/accumulated values, mathematics instruction
data and results, and other miscellaneous data and information which will be used by any data
manipulation functions in the user program. Some manufacturers subdivide the data memory
area into two sub-memories, one for fixed data and other for variable data. The fixed data portion
can only be programmed via the programming device. The CPU is not permitted to place data
values in this area. The variable portion of the data memory is available to the CPU for data
storage.
The final area of memory in a PLC is allocated to the storage of the user program. It is
this memory area that the executive program instructs the microprocessor to examine or 'scan' to
find the user instructions. The user program area may be subdivided if the CPU allocates a
portion of this memory area for the storage of ASCII messages, subroutine programs, or other
special programming functions or routines. In the majority PLCs, the internal data storage and
user program areas are located in RAM. Several systems do offer an option that places both the
user program and the fixed data storage areas in EPROM type memory. The user can develop
program in RAM and run the system to ensure correct operation. Once the user is satisfied that
the programming is correct, a set of EPROMs is then duplicated from the RAM. Then the user
can shut down the CPU and replaces the RAM with the newly programmed EPROM. Any future
change would require that the EPROMs be reprogrammed.
The CPU controls and supervises all operations within the PLC, carrying out programmed
instructions stored in the memory. An internal communications highway, or bus system, carries
information to and from the CPU, memory and I/O units, under control of the CPU. Virtually all
modern PLCs are microprocessor-based, using a 'micro' as the system CPU. Some larger PLCs
also employ additional microprocessors to control complex, time consuming functions such as
mathematical processing, three- term PID control, etc.
I/O Module
The input/output unit of PLCs handles the job of interfacing high power industrial
devices to the low-power electronic circuitry that stores and executes the control program. Most
PLCs operate internally at between 5 and 15V d.c. (common TTL and CMOS voltages), whilst
signal from input devices can be much greater, typically 24V d.c. to 240V a.c. at several
amperes. The I/O module units form the interface between the microelectronics of the
programmable controller and the real world outside, and must therefore provide all necessary
signal conditioning and isolation functions. This often allows a PLC to be directly connected to
process actuators and input devices without the need for intermediate circuitry or relays. To
provide this signal conversion, programmable controllers are available with a choice of
input/output units to suit different requirements.
It is standard practice for all I/O channels to be electrically isolated from the controlled process,
using opto-isolator circuits on the I/O modules. An opto-isolator allows small signal to pass
through, but will clamp any high-voltage spikes or surges down to the same small level. This
provides protection against switching transients and power- supply surges, normally up to 1500
V. In small self-contained PLCs in which all I/O points are physically located on one casing, all
inputs will be of one type (e.g. 24V) and the same for outputs (e.g. 240V triac). This is because
manufacturers supply only standard function boards for economic reasons. On the other hand,
modular PLCs have
In all cases the input/output module units are designed with the aim of simplifying the
connection of input devices and actuators to the PLC. For this purpose, all PLCs are equipped
with standard screw terminals or plugs on every I/O point, allowing the rapid and simple
removal and replacement of a faulty I/O card. Every input/output module point has a unique
address or channel number which is used during program development to specify the monitoring
of an input or the activating of a particular output within the program. Indication of the status of
input/output channels is provided by light-emitting diodes (LEDs) on the PLC or I/O unit,
making it simple to check the operation of processed inputs and outputs from the PLC itself
Scan Cycle
Internal Operation and Signal Processing The CPU of the PLC executes the user- program over
and over again when it is in the RUN mode. The following figure shows the entire repetitive
series of events.
(a)Input scan: During the input scan, the current status of every input module is stored in the
input image (memory) table, bringing it up-to-date. Thus all the status of the
(b)Program scan: Following the input scan, the CPU enters its user program execution, or
program scan. The execution involves starting at the program's first instruction, then moving on
to the second instruction and carrying out its execution sequence. This continues to the last
program instruction. Throughout the user-program execution, the CPU continually keeps its
output image (memory) table up-to-date.
(c) Output scan: During program scan, the output modules themselves are not kept continually
up to date. Instead, the entire output image table is transferred to the output modules during the
output scan which comes after the program execution. Thus the output devices are activated
accordingly during the output scan.
Note that by virtue of the cyclic nature of the program I/O scan, the status of the inputs and
outputs cannot be changed within the same scan cycle. If an input signal changes state after the
input scan, it will not be recognized until the next input scan occurs. The time to update all inputs
and outputs depends on the total number to be copied, but is typically a few milliseconds in
length. The total program execution time (or cycle time) depends on the length of the control
program. Each instruction takes 1-10 µs to execute depending on the particular programmable
controller employed. So a 1K (1024) instruction program typically has a cycle time of 1-10 ms.
However, programmable controller programs are often much shorter than 1000 instructions,
namely 500 steps or less.
Ladder Logic
Ladder logic uses symbolic expressions and a graphical editor for writing and reading ladder
diagrams making it easier.
⚫ The simple way to describe a ladder diagram is a graphic programming language that
uses a series of rails and rungs containing logic symbols that are combined to form
decision making expressions. Ladder diagrams actually look like a ladder and are more
commonly known as ladder logic programming.
⚫ The rails in a ladder diagram represent the supply wires of a relay logic control circuit.
There is a positive voltage supply rail on the left hand side and a zero voltage rail on the
right hand side. In a ladder diagram the logic flow is from the left hand rail to the right
hand rail.
⚫ When implementing a ladder logic program in a PLC there are seven basic parts of a
ladder diagram that critical to know. They are rails, rungs, inputs, outputs, logic
expressions, address notation/tag names and comments. Some of these elements are
essential and others are optional.
⚫ Rails – There are two rails in a ladder diagram which are drawn as vertical lines running
down the far most ends of the page. If they were in a relay logic circuit they would
represent the active and zero volt connections of the power supply where the power flow
goes from the left hand side to the right hand side.
⚫ Rungs – The rungs are drawn as horizontal lines and connect the rails to the logic
expressions. If they were in a relay logic circuit they would represent the wires that
connect the power supply to the switching and relay components.
⚫ Inputs – The inputs are external control actions such as a push button being pressed or a
limit switch being triggered. The inputs are actually hardwired to the PLC terminals and
represented in the ladder diagram by a normally open (NO) or normally closed (NC)
contact symbol.
⚫ Outputs – The outputs are external devices that being are turned on and off such as an
electric motor or a solenoid valve. The outputs are also hardwired to the PLC terminals
and are represented in the ladder diagram by a relay coil symbol.
⚫ Logic Expressions – The logic expressions are used in combination with the inputs and
outputs to formulate the desired control operations.
⚫ Address Notation & Tag Names – The address notation describes the input, output and
logic expression memory addressing structure of the PLC. The tag names are the
descriptions allocated to the addresses.
⚫ Comments – Last but by not least, the comments are an extremely important part of a
ladder diagram. Comments are displayed at the start of each rung and are used to describe
the logical expressions and control operations that the rung, or groups of rungs, are
executing. Understanding ladder diagrams is made a lot easier by using comments.
PLC controller is linked with a PC computer through an RS-232 cable. One end of the cable is
connected to a serial PC port (9-pin or 25-pin connector), while the other end is connected to an
RS-232C connector on RS232 module of a CPM1A controller. In order to establish a connection
with a PC, DIP switch on the connector must be set in "Host" position.
A ground loop condition occurs when two or more electrical paths exist in a ground line. For
example, in Figure, the transducers and transmitter are connected to ground at the chassis (or
device enclosure) and connected to an analog input card through a shielded cable. The shield
connects to both chassis grounds, thereby creating a path for current to flow from one ground to
another since both grounds have different potentials. The current flowing through the shield
could be as high as several amperes, which would induce significant magnetic fields in the signal
transmission. This could create interference that would result in a possible misreading of the
analog signal. To avoid this problem, the shield should be connected to ground on only one side
of the chassis, preferably the PLC side. In the example shown in Figure, the shield should only
be connected to ground at the analog input interface.
To check for a ground loop, disconnect the ground wire at the ground termination and measure
the resistance from the wire to the termination point where it is connected. The meter should read
a large ohm value. If a low ohm value occurs across this gap, circuit continuity exists, meaning
that the system has at least one ground loop
Troubleshooting Indicator
LED status indicators can provide much information about field devices, wiring, and I/O
modules. Most input/output modules have at least a single indicator—input modules normally
have a power indicator, while output modules normally have a logic indicator. LED indicators
greatly assist the troubleshooting process. With power and logic indicators, the user can
immediately pinpoint a malfunctioning module or circuit. LED indicators, however, cannot
diagnose all possible problems; instead, they serve as preliminary signs of system malfunctions.
Troubleshooting Inputs
If the field device connected to an input module does not seem to turn ON, a problem may exist
somewhere between the L1 connection and the terminal connection to the module. An input
module’s status indicators can provide information about the field device, the module, and the
field device’s wiring to the module that will help pinpoint the problem. To further pinpoint the
problem, check that voltage is present at the field device. With the device activated, measure the
voltage across the device using a voltmeter. If no voltage is present on the load side of the device
(the side that connects to the module), then the input device is faulty. If there is power, then the
problem lies in
Troubleshooting Outputs
PLC output interfaces also contain status indicators that provide useful troubleshooting
information. Like the troubleshooting of PLC inputs, the first step in troubleshooting outputs is
to isolate the problem to either the module, the field device, or the wiring.
After checking the module, check that the field device is working properly. Measure the voltage
coming to the field device while the output module is ON, making sure that the return line is well
connected to the device. If there is power yet the device does not respond, then the field device is
faulty. Another method for checking the field device is to test it without using the output
module. Remove the output wiring and connect the field device directly to the power source. If
the field device does not respond, then it is faulty. If the field device responds, then the problem
lies in the wiring between the device and the output module. Check the wiring, looking for
broken wires along the wire path.
Troubleshooting CPU
PLCs also provide diagnostic indicators that show the status of the PLC and the CPU. Such
indicators include power OK, memory OK, and communications OK conditions. First, check that
the PLC is receiving enough power from the transformer to supply all the loads. If the PLC is
still not working, check for voltage supply drop in the control circuit or for blown fuses. If the
PLC does not come up even with proper power, then the problem lies in the CPU. The
diagnostic indicators on the front of the CPU will
The best method for diagnosing input/output malfunctions is to isolate the problem to the
module, the field device, or the wiring. If both power and logic indicators are available, then
module failures become readily apparent. The first step in solving the problem is to take a
voltage measurement to determine if the proper voltage level is present at the input or output
terminal. If the voltage is adequate at the terminal and the module is not responding, then the
module should be replaced. If the replacement module has no effect, then field wiring may be
the problem. A proper voltage level at the output terminal while the output device is OFF also
indicates an error in the field wiring. If an output rung is activated but the LED indicator is OFF,
then the module is faulty. If a malfunction cannot be traced to the I/O module, then the module
connectors should be inspected for poor contact or misalignment. Finally, check for broken wires
under connector terminals and cold solder joints on module terminals.
PROGRAMMING TIMERS
INTRODUCTION:
Timers are output instructions used to control operations/events based on time. There are
basically three types of timer instructions in RSLogixs. The three timer instructions in RSLogixs
are:
There are certain parameters which are commonly used in all the three types of timer instruction
to describe its operation. The parameters used to describe the operation of timer instruction are
1. Preset Value
2. Accumulator Value
3. Time base Value
The programmers have to enter the Preset value. Preset value is the set point or delay
time provided by the timer to active or deactivates an event. When the
accumulator value becomes equal to or greater than the preset value, the done (DN) bit is set.
The timer Preset value can range from 0 to 32,767.
This is the time elapsed since the timer was enabled. For a timer, this is the number of timebase
intervals the instruction has counted. Once the timer is reset the accumulator value will reset
automatically (not for RTO). Preset and accumulator values for timers range from 0 to +32,767.
If a timer preset or accumulator value is a negative value, a runtime error occurs.
Timebase
The timebase determines the duration of each timebase interval. The time base (which is always
expressed in seconds) may be either 1.0 s or 0.01 s. The total value the preset address can hold is
32,767, but if the timebase is 0.01 seconds, this limits the preset time to 0.01 x 32767 = 327
seconds.
Each timer has three control words (16 bits each) and three control bits (Status bits).
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word
EN TT DN Internal Use
0
Word
Preset Value
1
Word
Accumulator Value
2
Addressing:
Enter a TIMER address, TIME BASE, PRESET value, and ACCUM (accumulated) value. Timer
files use three words per element, one for instruction bits (the control word), one for the preset,
and one for the accumulator.
Timing could be inaccurate if JMP, LBL, JSR, or SBR instructions skip over the rung containing a timer
instruction while the timer is timing.
TON instruction is used when an output is to be turn on or off after the timer has been on for a
preset time interval. The TON instruction begins to count timebase intervals when rung
conditions become true. As long as rung conditions remain true, the timer adjusts its accumulated
value (ACC) each evaluation until it reaches the preset value (PRE). The accumulated value is
reset when rung conditions go false, regardless of whether the timer has timed out.
Status Bits:
The status bits of TON timer setting is explained in the following table.
Timer Enable Bit EN (bit 15) rung conditions are true rung conditions go false
Use the TOF instruction to turn an output on or off after its rung has been off for a preset time
interval. The TOF instruction begins to count timebase intervals when the rung makes a true-to-
false transition. As long as rung conditions remain false, the timer increments its accumulated
value (ACC) based on the timebase for each scan until it reaches the preset value (PRE). The
accumulated value is reset when rung conditions go true regardless of whether the timer has
timed out.
Status Bits:
The status bits of TOF timer setting is explained in the following table.
Timer Enable Bit EN (bit 15) rung conditions are true rung conditions go false
An RTO function the same as a TON with the exception that once it has begun timing, it holds
its count of time even if the rung goes false. When rung continuity returns (rung goes true again),
the RTO begins timing from the accumulated time which was held when rung continuity was
lost. By retaining its accumulated value, retentive timers measure the cumulative period during
which rung conditions are true.
The RTO instruction retains its accumulated value when any of the following occurs.
Status Bits:
The status bits of RTO timer setting is explained in the following table.
Timer Timing Bit TT (bit 14) rung conditions are true and Rung conditions go false or
the accumulated value is less when the done bit is set
than the preset value
Timer Enable Bit EN (bit 15) rung conditions are true rung conditions go false or if
the timer is reset with the
RES instruction
To reset the retentive timer’s accumulated value and status bits after the RTO rung goes false,
you must program a reset (RES) instruction with the same address in another rung. When the
RES instruction having the same address as the RTO is enabled, the accumulated value and the
control bits are reset.
Cascading Timers:
The Programming of two or more timers together is called cascading of timers. Timers can be
interconnected or cascade, to satisfy any required logic. At times there may require a time-delay
period longer than the preset time value allowed for the single timer instruction of the PLC being
used. This can be solved by cascading timers.
Counters
Introduction:
The counters are instructions which are used to count the number of external events. There are
two types of Counter Instructions
1. Up Counter CTU
2. Down Counter CTD
There are certain parameters which are commonly used in all the two types of Counter
instruction to describe its operation. The parameters used to describe the operation of timer
instruction are
1. Preset Value
2. Accumulator Value
The programmers have to enter the Preset value. The Preset value is the set point that you
enter in the timer or counter instruction. When the accumulated value becomes equal to or
greater than the Preset value, the done status bit is set. You can use this bit to control an output
device.
For a counter, this is the number of false-to-true transitions that have occurred.
Each counter has three control words (16 bits each) and three control bits (Status bits).
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word
CU CD DN OV UN - - - - Not Used
0
Word
Preset Value
1
Word
Accumulator Value
2
Word 0
CU : Count up enables (Bit 15) CD
: Count down enables (Bit 14)
DN : Done bit (Bit 13)
OV : Overflow bit (Bit 12)
UN : Underflow bit (Bit 11)
Enter a COUNTER address, PRESET value and ACCUM value. The Preset value is the point
which must be reached to set the DN (done) bit. The accumulated value represents the current
count status.
Up Counter CTU
This output instruction counts up for each false-to-true transition of conditions preceding it in the
rung and produces an output when the accumulated value reaches the Preset value. Rung
transitions might be triggered by a limit switch or by parts travelling past a detector.
The ability of the counter to detect false-to-true transitions depends on the speed (frequency) of
the incoming signal. The on and off duration of an incoming signal must not be faster than the
scan time. Each count is retained when the rung conditions again become false, permitting
counting to continue beyond the Preset value. This way you can base an output on the preset but
continue counting to keep track of inventory/parts, etc.
The Count value must remain in the range of – 32768 to + 32767. If the count value goes above
+ 32767 or below – 32768, the counter status overflow (OV) or underflow (UN) bit is set. A
Counter can be reset to zero using the reset (RES) instruction.
Use a RES (reset) instruction with the same address as the counter, or another instruction in your
program to overwrite the value. The on or off status of counter done, overflow, and underflow
bits is retentive. The accumulated value and control bits are reset when a RES is enabled.
Counter files use three words per element.
= DN (done) bit
This output instruction counts down for each false-to-true transition of conditions preceding it in
the rung and produces an output when the accumulated value reaches the Preset value. Rung
transitions might be triggered by a limit switch or by parts travelling past a detector.
Each count is retained when the rung conditions again become false. The count is retained until a
RES (reset) instruction with the same address as the counter is enabled, or if another instruction
in your program overwrites the value.
The accumulated value is retained after the CTU or CTD instruction goes false, and when power
is removed from and then restored to the processor. Also, the on or off status of counter done,
overflow, and underflow bits is retentive. The accumulated
13 = DN (done) bit
The major of the Math instructions take two input values, perform the specified arithmetic
function, and output the result to an assigned memory location. For example, both the ADD and
SUB instructions take a pair of input values, add or subtract them, and place the result in the
specified destination. If the result of the operation exceeds the allowable value, an overflow or
underflow bit is set.
Entering Parameters
• Source is the address (es) of the value(s) on which the mathematical, logical, or move
operation is to be performed. This can be word addresses or program constants. An
instruction that has two source operands does not accept program constants in both operands.
• Destination is the address of the result of the operation. Signed integers are stored in two’s
complement form and apply to both source and destination parameters.
Add (ADD)
Use the ADD instruction to add one value (source A) to another value (source B) and place the
result in the destination.
Subtract (SUB)
Use the SUB instruction to subtract one value (source B) from another (source A) and place the
result in the destination.
Multiply (MUL)
Use the MUL instruction to multiply one value (source A) by another (source B) and place the
result in the destination.
Use the DIV instruction to divide one value (source A) by another (source B). The rounded
quotient is then placed in the destination. If the remainder is 0.5 or greater, round up occurs in
the destination. The unrounded quotient is stored in the most significant word of the math
register. The remainder is placed in the least significant word of the math register.
Clear (CLR)
Use the CLR instruction to set the destination value of a word to zero.
When this instruction is evaluated as true, the square root of the absolute value of the source is
calculated and the rounded result is placed in the destination. The instruction calculates the
square root of a negative number without overflow or faults. In applications where the source
value may be negative, use a comparison instruction to evaluate the source value to determine if
the destination may be invalid.
Absolute (ABS)
Use the ABS instruction to calculate the absolute value of the Source and place the result in the
Destination. This instruction supports integer and floating point values.
Entering Parameters
• Source can be a word address, an integer constant, floating point data element, or a
floating point constant
• Destination can only be a word address or a floating point data element.
Comparison instructions are used to test pairs of values to condition the logical continuity of a
rung. As an example, suppose a LES instruction is presented with two values. If the first value is
less than the second, then the comparison instruction is true.
Equal (EQU)
Use the EQU instruction to test whether two values are equal. If source A and source B are
equal, the instruction is logically true. If these values are not equal, the instruction is logically
false. Source A must be an address. Source B can either be a program constant or a address.
Negative integers are stored in two’s complement form.
Not Equal (NEQ)
Use the NEQ instruction to test whether two values are not equal. If source A and source B are
not equal, the instruction is logically true. If the two values are equal, the instruction is logically
false.
Source A must be an address. Source B can be either a program constant or an address. Negative
integers are stored in two’s complement form.
Less Than (LES)
Use the LES instruction to test whether one value (source A) is less than another (source B). If
source A is less than the value at source B, the instruction is logically true. If the value at source
A is greater than or equal to the value at source B, the instruction is logically false.
Source A must be an address. Source B can either be a program constant or an address. Negative
integers are stored in two’s complement form.
Less Than or Equal (LEQ)
Use the LEQ instruction to test whether one value (source A) is less than or equal to another
(source B). If the value at source A is less than or equal to the value at source B, the instruction is
logically true. If the value at source A is greater than the value at source B, the instruction is
logically false.
Source A must be an address. Source B can either be a program constant or an address. Negative
integers are stored in two’s complement form.
Greater Than (GRT)
Use the GRT instruction to test whether one value (source A) is greater than another (source B).
If the value at source A is greater than the value at source B, the instruction is logically true. If
the value at source A is less than or equal to the value at source B, the instruction is logically
false.
Source A must be an address. Source B can either be a program constant or an address. Negative
integers are stored in two’s complement form.
Greater Than or Equal (GEQ)
Use the GEQ instruction to test whether one value (source A) is greater than or equal to another
(source B). If the value at source A is greater than or equal to the value at source B, the
instruction is logically true. If the value at source A is less than the value at source B, the
instruction is logically false.
Test (LIM)
Use the LIM instruction to test for values within or outside a specified range, depending on how
you set the limits.
Entering Parameters
The Low Limit, Test, and High Limit values can be word addresses or constants, restricted to the
following combinations:
• If the Test parameter is a program constant, both the Low Limit and High Limit parameters
must be word addresses.
• If the Test parameter is a word address, the Low Limit and High Limit parameters can be
either a program constant or a word address.
True/False Status of the Instruction
If the Low Limit has a value equal to or less than the High Limit, the instruction is true when the
Test value is between the limits or is equal to either limit. If the Test value is outside the limits,
the instruction is false, as shown below.
If the Low Limit has a value greater than the High Limit, the instruction is false when the Test
value is between the limits. If the Test value is equal to either limit or outside the limits, the
instruction is true.
These instructions are used to control the sequence in which your program is executed. Control
instructions allow changing the order in which the processor scans a ladder program.
Typically, these instructions are used to minimize scan time, create a more efficient program,
and troubleshoot a ladder program.
LBL
This input instruction is the target of JMP instructions having the same label number. You must
program this instruction as the first instruction of a rung. This instruction has no control bits. Can
program multiple jumps to the same label by assigning the same label number to multiple JMP
instructions. However, label numbers must be unique.
The JSR, SBR, and RET instructions are used to direct the controller to execute a Separate
subroutine file within the ladder program and return to the instruction following the JSR
instruction. Use a subroutine to store recurring sections of program logic that must be executed
from several points within your application program. A subroutine saves memory because you
program it only once. Update critical I/O within subroutines using immediate input and/or output
instructions (IIM, IOM), especially if your application calls for nested or relatively long
subroutines. Otherwise, the controller does not update I/O until it reaches the end of the main
program (after executing all subroutines).
JSR
When the JSR instruction is executed, the controller jumps to the subroutine instruction (SBR) at
the beginning of the target subroutine file and resumes execution at that point. You cannot jump
into any part of a subroutine except the first instruction in that file. You must program each
subroutine in its own program file by assigning a unique file number (3 to 255).
SBR
The target subroutine is identified by the file number that you entered in the JSR instruction. This
instruction serves as a label or identifier for a program file as a regular subroutine file. This
instruction has no control bits. It is always evaluated as true. The instruction must be
programmed as the first instruction of the first rung of a subroutine. Use of this instruction is
optional; however, we recommend using it for clarity.
RET
This output instruction marks the end of subroutine execution or the end of the subroutine file. It
causes the controller to resume execution at the instruction following the JSR instruction. If a
sequence of nested subroutines is involved, the instruction causes the processor to return
program execution to the previous subroutine.
MCR instructions are used in pairs to create program zones that turn off all the non- retentive
outputs in the zone. Rungs within the MCR zone are still scanned, but scan time is reduced due
to the false state of non-retentive outputs. MCR zones enable or inhibit segments of program,
such as for recipe applications.
When program MCR instructions, note that:
• must end the zone with an unconditional MCR instruction.
• cannot nest one MCR zone within another.
• do not jump into an MCR zone. If the zone is false, jumping into it activates the zone.
• Always place the MCR instruction as the last instruction in a rung.
If the rung that has Program Execution
the start MCR
Instruction (Zone)
is
TRUE Executes the rungs in the MCR zone based on each rung’s
individual input condition (as if the zone did not exist).
FALSE Resets all non-retentive output instructions in the MCR zone
regardless of each rung’s individual input conditions.
Processor Operation
Do not jump (JMP) into an MCR zone. Instructions that are programmed within the MCR zone
starting at the LBL instruction and ending at the END MCR instruction are always evaluated as
though the MCR zone is true, regardless of the true state of the
This instruction, when its rung is true, stops the processor from scanning the rest of the program
file, updates the I/O, and resumes scanning at rung 0 of the main program (file 2). If this
instruction’s rung is false, the processor continues the scan until the next TND instruction or the
END statement. Use this instruction to progressively debug a program, or conditionally omit the
balance of your current program file or subroutines. Use this instruction to trap and identify
specific conditions for program debugging and system troubleshooting.
Enter a suspend ID number from -32,768 to + 32,767 when you program the instruction. When the
SUS instruction is executed, the programmed suspend ID, S:7 (word 7), as well as the program
file ID, S:8 (word 8), from which the SUS instruction executed is placed in the system status file.
Sequencer Instructions
When your application requires more than 16 bits, use parallels multiple sequencer instructions.
These instructions transfer 16-bit data to word addresses for the control of sequential machine
operations.
Enter the following parameters when programming these instructions.
• File is the address of the sequencer file. You must use the file indicator (#) for this address.
Mask (SQO, SQC) is a hexadecimal code or the address of the mask word or file through
which the instruction moves data. Set mask bits to pass data and reset mask bits to mask data.
Use a mask word or file if you want to change the mask according to
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word EN DN ER FD Not Used
0
Word Length of Sequencer file
1
Word Position
2
This output instruction steps through the sequencer file whose bits have been set to control
various output devices.
When the rung goes from false-to-true, the instruction increments to the next step (word) in the
sequencer file. Data stored there is transferred through a mask to the destination address
specified in the instruction. Current data is written to the corresponding destination word every
scan that the rung remains true.
The done bit is set when the last word of the sequencer file is transferred. On the next false-to-
true rung transition, the instruction resets the position to step one. If the position is equal to zero
at startup, when you switch the processor from the program mode to the run mode instruction
operation depends on whether the rung is true or false on the first scan.
• If true, the instruction transfers the value in step zero.
• If false, the instruction waits for the first rung transition from false-to-true and transfers the
value in step one. If you alter a length value with your ladder program, make certain that the
altered value is valid.
The bits mask data when reset and pass data when set. The instruction will not change the value
in the destination word unless you set mask bits. The mask can be fixed or variable. If you enter
a hexadecimal code, it is fixed. If you enter an element address or a file address for changing the
mask with each step, it is variable.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word EN DN ER FD Not Used
0
Word Length
1
Word Position
2
Move (MOV)
This output instruction moves the source value to the destination location. As long as the rung
remains true, the instruction moves the data each scan.
Entering Parameters
Enter the following parameters when programming this instruction.
• Source is the address or constant of the data you want to move
• Destination is the address where the instruction moves the data
The MVM instruction is a word instruction that moves data from a source location to a
destination, and allows portions of the destination data to be masked by a separate word. As long
as the rung remains true, the instruction moves the data each scan.
Entering Parameters
Enter the following parameters when programming this instruction.
• Source is the address of the data you want to move
• Mask is the address of the mask through which the instruction moves data; the mask can also
be a hexadecimal value (constant)
• Destination is the address where the instruction moves the data.
Analog values are continuous values, such as temperatures and pressures. When the
analog input signal enters the PLC it goes through an A/D converter or analog to digital
converter. This is the component in the PLC analog input card that transforms the analog signal
to digital signals. It is these digital signals that will eventually give our binary value
representation in the PLC. Voltage signals in the range of plus or minus 20 volts or so and
current signals in milliamps are commonly used as both analog inputs to PLCs. Every PLC
manufacturer has I/O modules to deal with these kinds of signals, along with other, more
specialized modules.
Voltage-Mode Analog Inputs
In the image below we have a simple circuit that converts the position of a 0 into a 0 to 5 volts
signal and connected to a generic PLC voltage analog input. When the knob is on zero, the input
to the PLC will be zero volts, and at the other end of the knob’s rotation, the PLC will see 5
volts. What the PLC program sees as the result of the conversion of the voltage to a number
depends on the PLC and its configuration.
For instance, some of the older Allen-Bradley SLC models would return an integer ranging from
0 to 8191 for an input of 0 to 5 Volts. Usually, the newer models of PLC will allow more
flexibility in how the value is returned, so that you can scale the numeric value to whatever your
application needs.
The PLC program can use this input to control (for example) the brightness of a light bulb, the
output of a heat source, the speed of a motor, or how fast a counter counts.
Current-Mode Analog Inputs
While the voltage input is capable of almost everything we need in general applications, because
of electrical noise interference from other devices, current mode signal transmission is a better
choice for signals that need to travel over any real distance. For this reason, many applications
use current inputs. From the PLC end, a current mode interface is generally a voltage mode
interface with an added high-precision resistor.
While the resistor is often inside the PLC module and switched in by a jumper or connection
position, it is effectively the same. Below you can find an example of a device powered current
source. The field device is getting its power from another source. The current signal is sourced
from the positive terminal on the measuring device, traveling to the positive terminal of the
PLC. Since there is a limit to how much
voltage is available in the loop; we usually limit the overall resistance on the measuring end of
the loop to 500 Ohms. Often this is called out as part of the field device installation instructions.
Another common type of analog device uses the 4 to 20 milliamps signal as its power source,
reducing the required complexity on the field end.
Analog signals tends to be very sensitive. Although it is our intention that a signal range
should be from 4-20mA, the signal can sometimes peak or drop. When that happens we want to
be able to see that in the PLC. When entering the analog input card the analog signal will be
split into a value between 0 and 32.767. Dividing the analog value into 32.767 gives us a certain
resolution. Every time our value increases by 1, it means that the analog signal has increased
with x mA. Our normal range or rated range is 4-20mA. But on top and below that Siemens had
added some extra mA in the range. They divide the over range in these two categories:
What this means is that instead of a 4-20 mA range we now have a 1.185 – 22.96 mA
range. The same applies to the other types of analog signals. E.g. the 0-10V range is 0 –
11.852 V range. With the over- and underflow in mind, we can now start to calculate the real
resolution of our analog signal. But instead of just using the 22.96-
1.185 mA or the 11.852 V ranges there is one number you should notice here: 27.648
These two numbers are the minimum values we can represent in out PLC with the digital value.
In most cases these steps are small and precise enough. Keep in mind also that the higher
resolution you want, the more expensive PLC analog input and output modules.
Case Study
1. BOTTLE FILLING SYSTEMS
To write ladder logic for the bottle filling systems for the following sequence
To write the ladder logic to control the motors in section. The conditions are as follows:
i. Motor 1 should be turned ON after 5 seconds the main switch has been switched ON.
ii. Motor 2 should be turned ON for 10 seconds after Motor 1 s turned ON.
iii. Motor 3 should be turned ON after Motor 2 is turned OFF.
Introduction
In the modern cities, many facilities and works are controlled by the automation system and
computers, for example, MTR, electricity supply system, traffic light control system, elevators
and CNC machines in factories. There are many advantages of automation system such as the
increase in efficiency; reduction of the cost, the number of operators, repetitive and boring work;
enhancing the safety of workers; improvement of the working performance and completing the
work that cannot be done manually.
Computer is not the only ways to control the automation system, other methods include:
mechanical systems, electrical (relay) systems, pneumatic system, electronic system, etc. Yet
computer control system has many advantages over the other control systems. For example, it
has fast calculation speed, multiple forms of input and output devices, large memory,
programmable control, telecommunication possible, small and light, etc.
The central processing unit of modern computers can do a large number of calculations within
one second, and it can manage a lot of work and data in a short time. The fast calculation speeds
of computer make it possible to control a lot of facilities at the same time under different
conditions. For example, the MTR computer system can control trains in different routes to
ensure the system runs normally.
Computer has many input devices, including keyboar , mouse, scanner, tape, etc. Moreover, it
can also use electronic circuits to transform signals from electronic sensors to digital data and
input them to the computer. For example, by using a sensor, the temperature can be transformed
into digital data and input in the computer.
After processing the data, the computer can generate output signal. Similarly, computer can use
electronic circuits to output digital signals which can then control various output devices, for
examples, printer, monitor, relay, motor, electromagnetic detecting valve, etc.
Programmable control
A program is a set of instructions. Computer can operate according to the program. Therefore,
operators can either input new program or modify the existing program to change the working
procedures or methods according to the needs. So, computer control system not only can operate
those simple task and repetitive work, it can also operate complicated work under different
conditions and feedback according to the program. For example, there is a visual system in the
computer controlled six legs machine as shown in Fig. 5. The computer of the robot can analyze
the image and choose the way without any obstacle.
Telecommunications possible
Computers can be used to input or output digital signals, and using the wires to transmit signals,
exchange information and communicate. So, computer information can be transmitted to distant
areas by private cables, telephone lines, internet or radio wave. For example, computers can
control distant video cameras or machines through the internet; computers can also be used to
control spacecrafts in space through the use of radio wave.
With the advancement of technology, the size and weight of computers have been reduced a lot.
The microcomputers developed recently are so sophisticated that it is possible to put the
microcomputers into a number of utensils, such as washing machines, refrigerators, air-
conditioners, car (Fig. 7), etc. Take the car as an example. For those cars having traditional
emulsifier engine, the amount of petrol supply to the engine is controlled by the emulsifier. But
nowadays, some of the car has an EFI system that can decide the best amount of petrol supply to
the engine according to the amount of air input, air temperature, spinning speed of the engine,
coolant’s temperature, valves’ open width, oxygen concentration in the air vent pipe and other
important factors.
There are many advantages of the computer control system, but there are some restrictions as
well. For example, the cost is high, the maintenance is difficult and the control is complicated. It
is difficult to withstand adverse environment and it needs a large amount of accessory devices.
High cost
To design and make a computer control system takes a long period of time. The equipment is
expensive and hence at the total cost is high. For example, when a computer is used to control a
cutting machine, a suitable set of control program is needed to control the moving path of the
tools, moving speed, spinning speed, feeding rate, change of tools, adding of coolants, etc.
Difficulties in maintenance
Nowadays, computers are used in mass production of integrated circuit and electronic circuit
board. They need new parts to replace those damaged. With the rapid development of computer
technology, the newly designed parts may not be used in those old-fashioned electronic circuit
boards, and so the maintenance will be more difficult. For example, when newly designed
random access memory (RAM) is produced, the production of the old designed RAM will
cease. After some time, when the old designed RAM is damaged, it cannot be replaced.
The electronic parts of the computer control system cannot work under bad environment, for
example, too hot, too cold, humid, dusty, vigorous vibration (Fig. 10), etc. So, we should avoid
using compute control system under these environments. For example, we should avoid using
cooling fan to cool down the computer in dusty place.
Computers can manage large amount of data in a short time, but it needs some supporting
devices to provide information. That is why a computer control system needs many supporting
devices. For example, a system is needed to detect the position of the tools and work pieces
when a computer is used to control a cutting machine. The system can give feedback to the
computer to allow it to control the machine accordingly.
Data loggers
A data logger (also data logger or data recorder) is an electronic device that records data
over time or in relation to location either with a built in instrument or sensor or via external
instruments and sensors. Increasingly, but not entirely, they are based on a digital processor (or
computer).
Data loggers are normally more economical than chart recorders. They offer more flexibility and
are available with a greater variety of input types. Most data loggers collect data which may be
directly transferred to a computer. Although this option is available with some recorders, it
normally adds significant expense to the recorder price.
Data acquisition systems offer a great deal of flexibility and are certainly attractive when high
sample rates are required, however, since they require connection or installation into a computer,
the computer must also be present and active when collecting the data. Data loggers can collect
data independently of a computer. Data is normally collected in non-volatile memory for later
download to a computer. The computer does not need to be present during the data collection
process. This makes them ideally suited for applications requiring portability.
Wireless data logger that measures and records ambient pressure, humidity and temperature. This
type of dynamic data logger is ideal for monitoring weather data, measuring barometric pressure
in high-rise buildings or monitoring storage or warehouse environments that contain sensitive
material
Miniature single input data loggers are generally low cost loggers dedicated to a specific
input type. These types of data loggers are often used in the transportation industry. A typical
application would be to include a temperature data logger in a shipment of food products to
insure that the food temperature does not exceed acceptable limits. In addition to temperature
miniature data loggers are available for a large variety of input types. most input types.
Fixed input loggers have a fixed number of input channels which are generally dedicated for a
specific type of input. OMEGA offers fixed input data loggers ranging from one to 8 channels
Handheld multi-channel loggers are commonly used in applications where the data logger is to
be carried from one location to another. They are also commonly used in bench top or laboratory
environments. In addition to storing data internally some models even contain on board printers
which can produce an immediate hardcopy of the data.
A modular data logger is configurable and expandable through the use of plug-in modules. The
modules are normally field configurable and the user has the option of adding as many channels
to satisfy the application requirement.
Developments in digital electronics have led to many industrial processes being computer
controlled. The first system used was Direct Digital Control (DDC), in which a computer
measured each variable in the process, these signals being used to maintain the required set
points in the process.
As digital electronics developed, minicomputers become more competitive, and with the advent
of electronic Multiplexer (Mux) and Demultiplexer (Demux), it is possible to sample the state
of many analog and digital transducers at high speed and also to control many values or devices
in the plant.
A basic Direct Digital Control System is shown in Fig. In this system a large number of
transducers are sited around the plant, each transducer being connected to one input of a Mux. A
Mux can be considered as- the electronic equivalent of a switch with a contact or blade which
rotates very rapidly so that it moves from one transducer to another, the blade remaining in
contact with the transducer long enough for an ADC to sample and digitise or to quantise the
analog signal. The quantised data are then transmitted along the data bus of the system to the
CPU.
When the CPU has analysed the data from one or more transducers 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
value through a demux. As this is being
DDC SOFTWARE:
There are two algorithms for programming a three mode PID control loop
Position Algorithm
Velocity Algorithm
A basic Computer Supervisory Control system is shown in Fig. Each digital control controls one
section of the plant by means of a closed loop involving its own sensors and control values.
Each controller can either be operated manually to give the local operator complete control of his
own section of the plant or it can be remotely controlled by the computer operator.
SCADA stands for supervisory control and data acquisition. It is a type of software application
program for process control. SCADA is a central control system which consists of controllers
network interfaces, input/output, communication equipment, and software. SCADA systems are
used to monitor and control the equipment in the industrial process which includes
manufacturing, production, development, and fabrication. The infrastructural processes include
gas and oil distribution, electrical power, water distribution. Public utilities include bus traffic
system, airport. The SCADA system takes the reading of the meters and checks the status of
sensors in regular intervals so that it requires minimal interference of humans.
A large number of processes occur in large industrial establishments. Every process you need to
monitor is very complex because each machine gives a different output. The SCADA system
used to gather data from sensors and instruments located in remote areas. The computer then
processes this data and presents it promptly. The SCADA system gathers the information (like a
leak on a pipeline occurred) and transfers the information back to the system while giving the
alerts that leakage has occurred and displays the information in a logical and organized fashion.
The SCADA system used to run on DOS and UNIX operating systems.
Generally, the SCADA system is a centralized system that monitors and controls the entire area.
It is a pure software package that is positioned on top of the hardware. A supervisory system
gathers data on the process and sends the commands control to the process. The SCADA is a
remote terminal unit which is also known as RTU. Most
The SCADA system allows operators to change the set point for the flow, and enable alarm
conditions in case of loss of flow and high temperature, and the condition is displayed and
recorded. The SCADA system monitors the overall performance of the loop. The SCADA
system is a centralized system to communicate with both wired and wireless technology to Clint
devices. The SCADA system controls can run completely all kinds of the industrial process.
Hardware Architecture:
⚫ The data server layer which handles most of the process data activities.
The SCADA station refers to the servers and it is composed of a single PC. The data
servers communicate with devices in the field through process controllers like PLCs or RTUs.
The PLCs are connected to the data servers either directly or via networks or buses. The
SCADA system utilizes a WAN and LAN networks, the WAN and LAN consist of internet
protocols used for communication between the master
Software Architecture
Most of the servers are used for multitasking and real-time database. The servers are responsible
for data gathering and handling. The SCADA system consists of a software program to provide
trending, diagnostic data, and manage information such as scheduled maintenance procedures,
logistic information, detailed schematics for a particular sensor or machine, and expert-system
troubleshooting guides. This means the operator can see a schematic representation of the plant
being controlled.
EX: alarm checking, calculations, logging, and archiving; polling controllers on a set of
parameters, those are typically connected to the server.
⚫ Data Acquisitions
⚫ Data Communication
⚫ Information/Data presentation
⚫ Monitoring/Control
Data Acquisitions:
The real-time system consists of thousands of components and sensors. It is very important to
know the status of particular components and sensors. For example, some sensors measure
the water flow from the reservoir to the water tank and some sensors measure the value
pressure as the water is a release from the reservoir.
Data Communication:
The SCADA system uses a wired network to communicate between users and devices. Real-
time applications use a lot of sensors and components which should be controlled remotely. The
SCADA system uses internet communications. All information is transmitted through the
internet using specific protocols. Sensor and relays are not able to communicate with the
network protocols so RTUs used to communicate sensors and network interfaces.
Information/Data presentation: The normal circuit networks have some indicators which can
be visible to control but in the real-time SCADA system, there are thousands of sensors and
alarm which are impossible to be handled simultaneously. The SCADA system uses the human-
machine interface (HMI) to provide all of the information gathered from the various sensors.
Monitoring/Control:
The SCADA system uses different switches to operate each device and displays the status of the
control area. Any part of the process can be turned ON/OFF from the control station using these
switches. SCADA system is implemented to work automatically without human intervention
but in critical situations, it is handled by manpower.
In large industrial establishments, many processes occur simultaneously and each needs to be
monitored, which is a complex task. The SCADA systems are used to monitor and control the
equipment in the industrial processes which include water distribution, oil distribution, and
power distribution. The main aim of this project is to process the real-time data and control the
large scale remote industrial environment. In the real-time scenario, a temperature logging
system for a remote plant operation is taken.
The temperature sensors are connected to the microcontroller, which is connected to the PC at
the front end, and software is loaded on the computer. The data is collected from the
temperature sensors. The temperature sensors continuously send the signal to the
microcontroller which accordingly displays these values on its front panel. One can set the
parameters like low limit and high limit on the computer screen. When the temperature of a
sensor goes above-set point the microcontroller sends a command to the corresponding relay.
The heaters connected through relay contacts are turned OFF and ON.
This is a temperature logging system. Here 8 temperature sensors in multiplexing mode are
connected to the microcontroller through ADC 0808. Then the values of all the sensors are sent
serially by the microcontroller through Max 32 to the com port of the PC. A Software “DAQ
System” loaded on the PC takes these values and show them on its front panel, and also logs
them to the database “daq.mdb”. One can set by the
Applications:
Advantages:
⚫ The SCADA system is easily expandable. We can add a set of control units and
sensors according to the requirement.
Sampling
Sampling is defined as, “The process of measuring the instantaneous values of continuous-time
signal in a discrete form.”Sample is a piece of data taken from the whole data which is
continuous in the time domain. When a source generates an analog signal and if that has to be
digitized, having 1s and 0s i.e., High or Low, the signal has to be discretized in time. This
discretization of analog signal is called as Sampling.
Sampling Rate
To digitize the signals, the gap between the samples should be fixed. That gap can be termed as
a sampling period Ts.
Where,
Sampling frequency is the reciprocal of the sampling period. This sampling frequency, can be
simply called as Sampling rate. The sampling rate denotes the number of samples taken per
second, or for a finite set of values.
For an analog signal to be reconstructed from the digitized signal, the sampling rate should be
highly considered. The rate of sampling should be such that the data in the message signal
should neither be lost nor it should get over-lapped. Hence, a rate was fixed for this, called as
Nyquist rate.
Nyquist Rate
Where,
Aliasing
Aliasing can be referred to as “the phenomenon of a high-frequency component in the spectrum
of a signal, taking on the identity of a low-frequency component in the spectrum of its sampled
version.”
The corrective measures taken to reduce the effect of Aliasing are −
In the transmitter section of PCM, a low pass anti-aliasing filter is employed, before the
sampler, to eliminate the high frequency components, which are unwanted.
The signal which is sampled after filtering, is sampled at a rate slightly higher than the
Nyquist rate.
This choice of having the sampling rate higher than Nyquist rate, also helps in the easier design
of the reconstruction filter at the receiver.
Quantizing
The digitization of analog signals involves the rounding off of the values which are
approximately equal to the analog values. The method of sampling chooses a few points on the
analog signal and then these points are joined to round off the value to a near stabilized value.
Such a process is called as Quantization.
Both sampling and quantization result in the loss of information. The quality of a Quantizer
output depends upon the number of quantization levels used. The discrete amplitudes of
the quantized output are called as representation levels or reconstruction levels.
The spacing between the two adjacent representation levels is called a quantum or step-size.
The following figure shows the resultant quantized signal which is the digital form for the given
analog signal.
Types of Quantization
There are two types of Quantization - Uniform Quantization and Non-uniform Quantization.
The type of quantization in which the quantization levels are uniformly spaced is termed as a
Uniform Quantization. The type of quantization in which the quantization levels are unequal
and mostly the relation between them is logarithmic, is termed as a Non-uniform
Quantization.
There are two types of uniform quantization. They are Mid-Rise type and Mid-Tread type. The
following figures represent the two types of uniform quantization.
Figure 1 shows the mid-rise type and figure 2 shows the mid-tread type of uniform quantization.
The Mid-Rise type is so called because the origin lies in the middle of a raising part of
the stair-case like graph. The quantization levels in this type are even in number.
The Mid-tread type is so called because the origin lies in the middle of a tread of the
stair-case like graph. The quantization levels in this type are odd in number.
Both the mid-rise and mid-tread type of uniform quantizers are symmetric about the
origin.
Quantization Noise
It is a type of quantization error, which usually occurs in analog audio signal, while quantizing
it to digital. For example, in music, the signals keep changing continuously, where regularity is
not found in errors. Such errors create a wideband noise called as Quantization Noise.
Sample and Hold Circuit
A Sample and Hold Circuit, sometimes represented as S/H Circuit or S & H Circuit, is usually
used with an Analog to Digital Converter to sample the input analog signal and hold the sampled
signal.
In the S/H Circuit, the analog signal is sampled for a short interval of time, usually in the range
of 10µS to 1µS. After this, the sampled value is hold until the arrival of next input signal to be
sampled. The duration for holding the sample will be usually between few milliseconds to few
seconds.
The following image shows a simple block diagram of a typical Sample and Hold Circuit.
If the input analog voltage of an ADC changes more than ±1/2 LSB, then there is a severe
chance that the output digital value is an error. For the ADC to produce accurate
As the name suggests, a S/H Circuit samples the input analog signal based on a sampling
command and holds the output value at its output until the next sampling command is arrived.
The following image shows the input and output of a typical Sample and Hold Circuit
Let us understand the operating principle of a S/H Circuit with the help of a simplified circuit
diagram. This sample and hold circuits consist of two basic components:
Analog Switch
Holding Capacitor
This circuit tracks the input analog signal until the sample command is changed to hold
command. After the hold command, the capacitor holds the analog voltage during the analog to
digital conversion.
The main and important advantage of a typical SH Circuit is to aid an Analog to Digital
Conversion process by holding the sampled analog input voltage.
In multichannel ADCs, where synchronization between different channels is important, an
SH circuit can help by sampling analog signals from all the channels at the same time.
In multiplexed circuits, the crosstalk can be reduced with an SH circuit.
In order to optimize the characteristics of the system in terms of performance, handling capacity
and cost, the relevant sub systems can be combined together. Analog Data Acquisition System is
generally acquired and converted into digital form for the purpose of processing,
transmission, display and storage.
Processing may consist of a large variety of operations, ranging from simple comparison to
complicated mathematical manipulations. It can be for such purposes as collecting information
(averages, statistics), converting the data into a useful form (e.g., calculations of efficiency of
motor speed, torque and power input developed), using data for controlling a process,
performing repeated calculations to separate signals buried in the noise, generating information
for display, and various other purposes.
Data may be transmitted over long distances (from one point to another) or short distances (from
test centre to a nearby PC).
The data may be displayed on a digital panel or on a CRT. The same be stored temporarily (for
immediate use) or permanently for ready reference later.
Data acquisition generally relates to the process of collecting the input data in digital form as
rapidly, accurately, and economically as necessary. The basic instrumentation used may be a
DPM with digital outputs, a shaft digitizer, or a sophisticated high speed resolution device.
To match the input requirements with the output of the sensor, some form of scaling and
offsetting is necessary, and this is achieved by the use of amplifier/ attenuators.
For converting analog information from more than one source, either additional
transducers or multiplexers are employed. To increase the speed with which information is
accurately converted, sample-hold circuits are used. (In some cases, for analog signals with
extra-wide range, logarithmic conversion is used.)
The characteristics of the data acquisition system depend on both the properties of the analog
data and on the processing carried out.
Based on the environment, a broad Classification of data acquisition system into two categories.
The Classifications of data acquisition system specifically includes measure, protecting the
integrity of the analog data under hostile conditions. Such measurement conditions arise in
aircraft control systems, in electrical power systems, and in industrial process control systems.
Most of these hostile measurement conditions require devices capable of a wide range of
temperature operations, excellent shielding, and redundant paths for critical measurements and
considerable processing of the digital data acquisition system.
A/D converters based on dual slope techniques are useful for conversion of low frequency data,
such as from thermocouples, especially in the presence of noise. The most popular type of
converter for data system applications is the successive approximation type, since it is capable of
high resolution and high speed at moderate cost. (For a conversion time of 10 μS, the maximum
dv/dt for full scale and 0.1% resolution is about 1 V/ms, which is a considerable improvement.)
Higher speeds are obtained by preceding the A/D converter by a sample hold (S/H). The sample
hold is particularly required with successive approximation type A/D converters, since at higher
rates of input change the latter generates substantial non- linearity errors because it cannot
tolerate changes during the conversion process.
Direct digital conversion carried out near the signal source is very advantageous in cases
where data needs to be transmitted through a noisy environment. Even with a
The individual analog signals are applied directly or after amplification and/or signal
conditioning, whenever necessary, to the multiplexer. These are further converted to digital
signals by the use of A/D converters, sequentially. For the most efficient utilization of time, the
multiplexer is made to seek the next channel to be converted while the previous data stored in the
sample/hold is converted to digital form.
When the conversion is complete, the status line from the converter causes the sample/hold to
return to the sample mode and acquires the signal of the next channel. On completion of
acquisition, either immediately or upon command, the S/H is switched to the hold mode, a
conversion begins again and the multiplexer selects the next channel. This method is relatively
slower than systems where S/H outputs or even A/D converter outputs are multiplexed, but it
has the obvious advantage of low cost
The S/H outputs are connected to an A/D converter through a multiplexer, resulting in a
sequential readout of the outputs.
(Applications that might require this approach include wind tunnel measurements, seismographic
experimentation, radar and fire control systems. The event to be measured is often a one-shot
phenomenon and information is required at a critical point during a one-shot event.)
Multiplexing After A/D Conversion:
It is now economically feasible to employ an A/D converter for each analog input and multiplex
the digital outputs. Since each analog to digital converter (A/D) is assigned to an individual
channel, the conversion rate of the A/D need only be as fast as is needed for that channel,
compared to the higher rates that would be needed if it were used as in a multi channel analog
multiplexed system.
Alternatively, input channels having slowly varying data can be pre-multiplexed in any of the
forms suggested earlier, so that a set of sequentially multiplexed sub channels can then replace
one channel of the main digital multiplexed system, as indicated in Figure.
Individual amplifiers are used for each low level signal. Low level multiplexing can be attractive
when a large number of channels (25), all having low level outputs, need to be used at moderate
speeds. The use of individual channels is possible because of the availability of high quality
amplifiers at moderate cost. (A typical application is a 200 channel stress measurement system in
a transmission tower set up.)
Several factors have to be considered to accomplish low level multiplexing successfully.
Guarding may have to be employed for every channel, and each individual guard may have to be
switched, so that the appropriate guard is driven by the common mode pertaining to that channel.
Problems of pickup gets more complicated and have to be taken care of, to preempt the
possibility of signal-to-signal, and even common mode-to differential mode signal cross-talk.
Capacitance balance may need to be carried out. When the number of channels to be multiplexed
increases, the problems of stray capacitances and capacitive balance are worsened. In the specific
case of a 48 channel system, the input channels are subdivided into groups of eight channels in
the first tier. Each of these six subgroups are in turn multiplexed by a six channel multiplexer on
the second tier. The main advantage of using this is the reduction of capacitance effects.
Computer Based Data Acquisition System:
Computer Based Data Acquisition System – If a large number of inputs are to be
measured, some equipment is needed to measure them and display the results in a
meaningful and operationally useful fashion. All this is possible with Data Acquisition System,
which utilizes a computer driven visual display unit (CRT) as an operator aid. A screen display
can be obtained within two seconds by pressing a button. Information may be displayed only
when called up. The screen display can be designed in several ways, using a combination of
graphical and numeric displays, so as to be of maximum utility to the operator.