Professional Documents
Culture Documents
Unit II (1) (1)
Unit II (1) (1)
Unit II (1) (1)
__________________________________________________________________________________
Figure 1. MCR instruction programmed to control an entire circuit
__________________________________________________________________________________
energize instruction, the on-delay timer, and the off-delay timer). All retentive devices,
such as latches, retentive timers, and counters remain in their last state.
__________________________________________________________________________________
2.1.2.2 Return Jump instruction
Another valuable tool in PLC programming is to be able to escape from the main
program and go to a program subroutine to perform certain functions and then return to the
main program.
__________________________________________________________________________________
2.1.2.2.1 Flashing Pilot Light using Subroutine Program
__________________________________________________________________________________
2.1.3 Setting up a Subroutine
__________________________________________________________________________________
2.1.4 Nested Subroutine
Nesting subroutines allow you to direct program flow from the main program to a
subroutine and then to another subroutine.
__________________________________________________________________________________
operation on data with math functions, data conversion, data comparison, and logical
operations.
There are two basic classes of instructions to accomplish this: instructions that operate
on word data, and those that operate on file, or block, data, which involve multiple words. Each
data manipulation instruction requires two or more words of data memory for operation. Figure
illustrates the difference between a word and a file. The data contained in files and words will
be in the form of binary bits represented as series of 1s and 0s. The data manipulation
instructions allow the movement, manipulation, or storage of data in either single or multiple
word groups from one data memory area of the PLC to another. Use of these PLC instructions
in applications that require the generation and manipulation of large quantities of data greatly
reduces the complexity and quantity of the programming required.
Data manipulation can be placed in two broad categories:
i) Data transfer and ii) Data comparison.
2.2.1 Data Transfer Operation
Data transfer operations are all output instructions. Data transfer instructions simply
involve the transfer of the contents from one word or register to another.
Figure 19. Change the preset value of a Timer using MOV instruction
In Figure 19, when the selector switch is 10-s position, rung 2 has logic continuity and
rung 3 does not. As a result, the value 10 stored at the source address, N7:1, is copied into the
destination address, T4:1 PRE. Therefore, the preset value of the timer T4:1 will be 10. When
PB1 is closed, there will be a 10-s delay period before the pilot light is energized. To change
__________________________________________________________________________________
the preset value of the timer to 5 s, the selector switch is turned to the 5-s position. This makes
rung 3 true and rung 2 false. As a result, the preset value of the timer will change from 10 to 5.
Closing PB1 will now result in a 5-s time-delay period before the pilot light is energized.
2.2.1.3 Program to Change the Preset Value of a Counter Using MOVE (MOV)
Instruction
Figure 20. Change the preset value of a Counter using MOV instruction
In Figure 20 shows, a limit switch provides count pulses for products coming off of a
conveyor line onto a storage rack. The storage rack has room for only 300 boxes of product A
or 175 boxes of product B or 50 boxes of product C. Three switches are provided to select the
desired preset counter value depending on the product line being manufactured. A reset button
is provided to reset the accumulated count to zero. A pilot lamp is switched on when the storage
rack is full. If more than one of the preset counter switches is closed, the last value is selected.
2.2.1.4 FAL (File, Arithmetic, and Logical) Instruction
__________________________________________________________________________________
before the next part of a process can take place. Some of the compare instructions are as
follows:
EQU-equal; NEQ-not equal; GRT-greater than; LES-less than; GEQ-greater than equal; LEQ-
less than equal; LIM-limit test; MEQ-Masked comparison for equal.
2.2.2.1 EQU (equal) Instruction
__________________________________________________________________________________
The limit test instruction (LIM) compares a test value to values in the low limit and the
high limit. The limit test instruction is said to be circular because it can function in either of
two ways. Since the high limit has a value of 50, and the low limit 25, the instruction will be
true for test values 25 through 50. If the value of the low limit is greater than the value of the
high limit, the instruction is true if the value of the test is equal to or less than the low limit or
equal to or greater than the high limit. If the high limit has a greater value than the low limit,
then the instruction is true if the value of the test is between or equal to the values of the high
limit and the low limit. Since the high limit has a value of 50, and the low limit 100, the
instruction will be true for test values of 50 and less than 50, and for test values of 100 and
greater than 100.
2.2.2.8 Timer Program Using GREATER THAN OR EQUAL Instruction
Three time-delay relays (1TD, 2TD, 3TD) are used to control the four solenoid valves.
When the start button is pressed, solenoid A is energized immediately, solenoid B is energized
5 s later, solenoid C is energized 10 s later, and solenoid D is energized 15 s later. The same
circuit can be programmed using only one internal timer along with data compare instructions,
which will result in savings of memory words.
__________________________________________________________________________________
timer is equal to 5, the equal instruction in rung 2 will become logic true for 1s. As a result, the
latch output will energize to switch the pilot light PLI on. Then, when the accumulated value
of the timer reaches 15, the equal instruction in rung 3 will be true for 1s. As a result, the
unlatch output will energize to switch the pilot light PLl off. Therefore, when the switch is
closed, the pilot light will come on after 5s, stay on for 10s, and then turn off.
2.2.2.10 Counter Program Using LESS THAN Instruction
__________________________________________________________________________________
Figure 36. Addition logic rung
Figure 36 shows the example of an ADD instruction. When the rung is true, the value
stored at the source A address, N7:0 (25), is added to the value stored at the source address
N7:1 (50), and the answer (75) is stored at the destination address, N7:2. Source A and source
B can either be values or addresses that contain values, however source A and source B cannot
both be constants.
Example program: Counter program that uses the ADD Instruction
The program shows how the ADD instruction can be used to add the accumulated
counts of two up-counters. This application requires a light to come on when the sum of the
counts from the two counters is equal to or greater than 350. Source A of the ADD instruction
is addressed to store the accumulated value of counter C5:0, while source B is addressed to
store the accumulated value of counter C5:1. The value at source A is added to the value at
source B and the result (answer) is stored at destination address N7:1. Source A of the
GREATER THAN OR EQUAL instruction is addressed to store the value of the destination
address N7:1, while source B contains the constant value of 350.
__________________________________________________________________________________
Therefore the GREATER THAN OR EQUAL instruction will be logic true whenever
the accumulated values in the two counters are equal to or greater than the constant value 350.
A reset button is provided to reset the accumulated count of both counters to zero.
2.3.2 SUB Instruction
The figure shows the block
formatted SUB instruction. The
SUBTRACT instruction is an output
instruction that subtracts one value from
another and stores the result in the
destination address. When rung conditions
are true, the subtract instruction subtracts
source B from source A and stores the result
in the destination.
__________________________________________________________________________________
Figure 41. Oven Temperature Control Program
2.3.4 DIV Instruction
The figure shows the block
formatted DIV instruction. The DIVIDE
instruction divides the value in source A by
the value in source B and stores the result in
the destination and math register. If the
reminder is 0.5 or greater, a round-up
occurs in the integer destination. The value
stored in the math register consists of the
unrounded quotient (placed in the most
significant word) and the remainder (placed
in the least significant word). Some larger
PLC's support the use of floating-decimal
as well as integer values.
__________________________________________________________________________________
Figure 42. Division logic rung.
When the rung is true, the data in source A (the accumulated value of counter C5:5)
will be divided by the data in source B (the constant 2), with the result being placed in the
destination N7:3.
Example program: Converting Celsius to Fahrenheit
The program shows in Figure 43, how the DIVIDE instruction is used as part of a
program to convert Celsius temperature to Fahrenheit. In this application, the thumbwheel
switch connected to the input module indicates Celsius temperature. The program is designed
to convert the recorded Celsius temperature in the data table to Fahrenheit values for display.
The formula: F = (9/5 x C) + 32 forms the basis for the program. In this example, a current
temperature reading of 60 °C is assumed. The MULTIPLY instruction multiplies the
temperature (60°C) by 9 and stores the product (540) in address N7:0. Next, the DIVIDE
instruction divides 5 into the 540 and stores the answer (108) in address N7:1. Finally, the ADD
instruction adds 32 to the value of 108 and stores the sum (140) in address O:13. Thus 60°C =
140°F.
__________________________________________________________________________________
2.4.1 Mechanical Sequencers
Mechanical sequencers are often referred to as drum switches, rotary switches, stepper
switches, or cam switches. The mechanical cam-operated sequencer switch uses an electric
motor to drive the cams.
Figure 44. Mechanical Cam-operated sequencer. (a) Cam-driving mechanism, (b) Cam
and contact operation.
The figure 44 illustrates the operation of a cam-operated sequencer switch. An electric
motor is used to drive the cams. A series of leaf-spring mounted contacts interacts with the cam
so that in different degrees of rotation of the cam, various contacts are closed and opened to
energize and de-energize various electrical devices.
__________________________________________________________________________________
2.4.2 Dishwasher Sequencer Switch
__________________________________________________________________________________
cycle. The numbers in the "Active Circuits" column refer to the circled numbers found on the
schematic diagram.
__________________________________________________________________________________
task. For example, the on/off operation of 16 discrete outputs can be controlled, using a
sequencer instruction, with only one ladder rung.
To program a sequencer binary information is entered into a series of consecutive
memory words. These consecutive memory words are referred to as a word file. Data are first
entered into a word file for each sequencer step. As the sequencer advances through the steps,
binary information is transferred from the word file to the output word(s).
2.4.3.1 Sequencer Output (SQO) Instruction
__________________________________________________________________________________
Step 3: Bits 4 and 9 are ON Step 2: Bits 4 and 5 are ON
Figure 51. Sequencer steps (R-Red light, G-Green light, A-Amber light)
Data are entered into a word file for each sequencer step, as illustrated in Figure 50. In
this example, words 60, 61, 62, and 63 are used for the four-word file. Using the programmer,
binary information (ls and 0s) that reflects the desired light sequence is entered into each word
of the file. For ease of programming, some PLCs allow the word file data to be entered using
the octal, hexadecimal, BCD, or similar number system. When this is the case, the required
binary information for each sequencer step must first be converted to whatever number system
is employed by the PLC. This information is then entered with the programmer into the word
file, once the data have been entered into the word file of the sequencer, the PLC is ready to
control the lights.
When the sequencer is activated and advanced to step 1, the binary information in word
060 of the file is transferred into word 050 of the output. As a result, lights 1 and 12 will be
switched ON and all the rest will remain off. Advancing the sequencer to step 2 will transfer
the data from word 061 into word 050. As a result, lights 1 and 8 will be ON and all the rest
will be off. Advancing the sequencer to step 3 will transfer the data from word 062 into word
050. As a result, lights 4 and 9 will be ON and all the rest will be off. Advancing the sequencer
to step 4 will transfer the data from word 063 into word 050. As a result, lights 4 and 5 will be
ON and all the rest will be off. When the last step is reached, the sequencer is either
automatically or manually reset to step 1.
__________________________________________________________________________________
be positioned at the 0 position. If false, the sequencer will be positioned at the 1 position. The
mask is filter through which all data from the sequencer file must pass before being placed in
the destination or output word. Only bits in the mask that are set to 1 will pass data to the
destination. To enter a hexadecimal mask, type the hexadecimal value followed by the letter h
(hexadecimal). To enter a binary mask, type the binary value followed by the letter b (binary).
To enter a decimal mask, type the decimal value.
2.4.3.2 Sequencer Programs
A sequencer program can be event-driven or time-driven. An event-driven sequencer
operates similarly to a mechanical stepper switch that increments by one step for each pulse
applied to it. A time-driven sequencer operates similarly to a mechanical drum switch that
increments automatically after a preset time period.
2.4.3.2.1 Time-Driven Sequencer Programs
Figure 54 shows the program of a time-driven sequencer used for traffic light control
at a four-way intersection. In this example, the control of traffic is accomplished using two
sequencer output (SQO) instructions and a single on-delay timer (TON) instruction.
• Length is the number of steps of the sequencer file, starting at position 1. Position 0
is the start-up position. The instruction resets (wraps) to position 1 at each cycle completion.
The actual file length will be 1 plus the file length entered in the instruction.
• Position is the word location or step in the sequencer file from which the instruction
moves data. Any value up to the file length may be entered, but the instruction will always
reset to 1 on the true-to-false transition after the instruction has operated on the last position.
Before we start the sequence, we need a starting point at which the sequencer is in a neutral
position. The start position is all zeros, representing this neutral position; thus, all outputs will
be off in position 0.
2.4.3.2.1.1 Time-Driven Sequencer Output (SQO) Program
__________________________________________________________________________________
2.4.3.2.2 Event-Driven Sequencer Programs
The event-driven sequencer output program of Figure 56 can be used to explain the
operation of the sequencer output instruction.
__________________________________________________________________________________
2.5.1 Basic Concept of Shift Register
Figure 57 illustrates the basic concept of a shift register. A common shift pulse or clock
causes each bit in the shift register to move 1 position to the right.
Figure 58. Bit shit right and bit shift left registers
You can program a shift register to shift status data either right or left by shifting either
status or values through data files. When you want to track parts on a status basis, use bit shift
registers. Bit shift instructions will shift bit status from a source bit address, through a data file,
__________________________________________________________________________________
and out to an unload bit, one bit at a time. There are two bit shift instructions: bit shift left
(BSL), which shifts bit status from a lower address number to a higher address number through
a data file, and bit shift right (BSR), which shifts data from a higher address number to a lower
address number through a data file (Fig. 58).
Some PLCs provide a circulating shift register function, which allows you to repeat a
pattern again and again. When working with a bit shift register, you can identify each bit by its
position in the register. Therefore, working with any bit in the register becomes a matter of
identifying the position it occupies rather than the conventional word number/bit number
addressing scheme.
2.5.2 Shift Register Instructions
__________________________________________________________________________________
Figure 60. Bit shift right program
2.5.2.3 Shift Register Spray-Painting Application
The program of Figure 61 illustrates a spray-painting operation controlled by a shift
register. Each file bit location represents a station on the line, and the status of the bit indicates
whether or not a part is present at that station. The bit address, I:l/2, detects whether a part has
come on the line.
The shift register's function is used to keep track of the items to be sprayed. A bit shift
left instruction is used to indicate a forward motion of the line. As the parts pass along the
production line, the shift register bit patterns represent the items on the conveyor hangers to be
painted.
LS (Limit Switch) 1 is used to detect the hanger and LS2 detects the part. The logic of
this operation is such that when a part to be painted and a part hanger occur together (indicated
by the simultaneous operation of LSI and LS2), a logic 1 is input into the shift register. The
logic 1 will cause the undercoat spray gun to operate, and five steps later, when a 1 occurs in
the shift register, the topcoat spray gun is operated.
a) Process diagram
__________________________________________________________________________________
b) Program
Figure 61. Shift register spray-painting application
LS3 counts the parts as they exit the oven. The count obtained by limit switch 2 and
limit switch 3 should be equal at the end of the spray- painting run (PLI is energized) and is an
indication that the parts commencing the spray-painting run equal the parts that have completed
it.
A logic 0 in the shift register indicates that the conveyor has no parts on it to be sprayed,
and it therefore inhibits the operation of the spray guns.
__________________________________________________________________________________
Figure 62. Bit shift operation – 16-station machine
__________________________________________________________________________________
Figure 63. Bottle filling system (Process diagram)
__________________________________________________________________________________
The bottle will remain in position for 0.7 seconds, then the energized
internal 1003 will start the feed motor. The feed motor will remain ON until the limit switch
detects another bottle.
2.7.2 Continues Box Filling System (Continues Process Control)
__________________________________________________________________________________
Sequence of operation:
Start the conveyor when the START button is momentarily pressed.
Stop the conveyor when the STOP button is momentarily pressed;
Energize the RUN status light when the process is operating;
Energize the STANDBY status light when the process is stopped;
Stop the conveyor and energize the STANDBY light when the right edge of the box is
first sensed by the photo sensor;
With the box in position and the conveyor stopped open the solenoid valve and allow
the box to be fill;
Filling should stop when the LEVEL sensor goes true;
Energize FULL light when the box is full; the FULL should remain energized until
the box is moved clear of the photo sensor.
2.7.3 Batch Mixing System (Batch Process Control)
This is another commonly applied application of PLC where two liquids are mixed in
required proportion to form a batch. Rate of the flow is already fixed. We only control the time
of the flow. Level of the liquids in the tank is sensed by the level sensor switches.
We try a simple blending of water and acid in a container where we only have three
level sensors (L1, L2, and L3) and two liquids flowing in through two solenoid valves, solenoid
a (water control) and solenoid b (acid control) and draining out through solenoid c (blend
outflow). The batch is to be controlled by timer. After required level of blend is sensed (by L1)
the mixer runs for 3 mins. by the motor. They are mixed in ratio of 3:2. The process initiates
with the drain valve open, water and acid valves closed, mixer motor is off, and the tank is
empty.
__________________________________________________________________________________
Figure 68. Ladder diagram
When start button is pressed water is filled upto L2 and it ends as L2 is closed. First of
all as start is pressed output O:0/15 turns ON and remains ON until tank is emptied.
Rung 2 closes normally open drain valve, before timer T:4 activates.
Rung 3 energises solenoid a until L2 doesn’t signal, once it signals solenoid a gets de-
energised.
Then motor is turned ON and mix it for 3 mins. Similarly acid is filled up to L3 by
solenoid b, as level gets detected by L3 solenoid b de-energises.
Then mixer gets started and it runs for 3 minutes. After time delay of 3 mins solenoid
c opens and the blend gets drained out. Once the blend gets out completely, the process cycle
restarts.
__________________________________________________________________________________
3.0 Introduction
The Distributive Control System (in Figure 2) differs from the centralized system in
that each machine is handled by a dedicated control system.
__________________________________________________________________________________
Each dedicated control (PLC) is totally independent and could be removed from the
overall control scheme if it were not for the manufacturing functions it performs. Distributive
control involves two or more computers communicating with each other to accomplish the
complete control task. This type of control typically employs local area networks (LANs), in
which several computers control different stages or processes locally and are constantly
exchanging information and reporting the status on the process. Communications among
computers is done through single coaxial cables or fiber optics at very high speed.
Distributive control drastically reduces field wiring and heightens performance because
it places the controller and I/O close to the machine process being controlled. Because of their
flexibility, distributive control systems have emerged as the system of choice for numerous
batch and continuous process automation requirements.
3.1 Basic Building Blocks of Computer Controlled System
The basic functions of computer aided process control system are:
Measurement and acquisition.
Data conversion with scaling and checking.
Data accumulation and formatting.
Visual display.
Comparing with limits and alarm raising.
Recording and monitoring of events, sequence and trends.
Data logging and computation.
Control action.
__________________________________________________________________________________
EI6702 Logic and Distributed Control System Unit III Computer Controlled Systems
Digital input signals refer to the ON-OFF states of various valves, limit switches, etc.
one digital input signal represents status of the limit switch or valve and is represented by on
bit of information for real-time systems. Normally digital input signals are compatible to real-
time systems and can be inputted directly.
3.1.1.1 Analog Input Module
The module continuously scans the analog inputs signals in the pre-defined order and
frequency, converts them into the digital and then sends these values to processor and memory
module for processing. The analog input module may also provide signal conditioning for some
standard transducers like thermocouples, LVDTs, strain gauges etc. in such cases, analog input
modules may be different for different types of transducers.
__________________________________________________________________________________
3.1.3 Display Control Module
Display control module consists of following independent sub-modules.
Manual entry sub-module
CRT controller sub-module
LED/LCD control sub-module
Alarm annunciator sub-module
Printer controller sub-module
The manual entry to the system may be via thumb wheel switches, various ON-OFF
command switches and / or keyboard. The keyboard may be a full ASCII keyboard or a
specialized numeric and task-oriented keyboard. There are both advantages and disadvantages
in using any manual entry sub modules. Basically, manual entry sub-modules have built in
buffer to store current setting of thumb wheel switches and last command/data entered through
keyboard. The processor may read these values on its own or may be interrupted whenever a
new data/command is entered.
CRT controller sub-module interfaces main processor to Visual Display Unit, which is
used to show the status of process by displaying transducers values, present set points entered
through manual entry sub-module, historical trend of various parameters, mimic diagram of
process, alarm status etc. All the above display tasks are provided in the main processor through
software. LED/LCD control sub-module interfaces array of LED/LCD to main processor. This
sub-module accepts data bytes/word from main processor and displays it on LED/LCD. Alarm
annunciator controller sub-module generates ON-OFF signal for each type of alarm. The
processor may send an alarm byte/word to the alarm annunciator controller sub-module which
decodes byte/word and sends ON-OFF signals for various types of alarms. These alarm
modules are separate and require only digital signal to light the incandescent bulbs and/or audio
alarms. Printer controller sub-module is printer interface to main processor. Generally it has
local intelligence for printer control, a data buffer to store the data for printing etc. It accepts
the data bytes/words from main processor and prints it for the benefit of operator. The
interaction with main processor may be through periodic direct memory access or under the
direct control of main processor.
3.2 Role of Computers in Measurement and Control
The figure 8 shows the Role of computer in process control. After the technological
development of digital computer system, its use for measurement and control application has
tremendously increased. The basic objective of computer-aided measurement and control is to
identify the information flow and to manipulate the material and energy flow of given process
in a desired, optimal way. The requirement in terms of response time, computing power,
flexibility and fault tolerance are stricter, since the control is to be carried out in real-time.
Other difficulties, as a result of computer technology developments are a solution to the
problem of complexity, flexibility, and geographical separation of process elements.
Digital computer control application exists today for two major areas in the process
industries passive and active applications. Passive application involves acquisition and
manipulation of process data whereas; active application involves manipulation of process as
well. The passive application deals predominantly with monitoring, alarming and data
reduction systems. The process data, after captured (measured) on-line, are sent to the data
acquisition computer through interface module. The smart instruments such as smart sensors,
smart transmitters and smart actuators (final control element), are now available which have a
microcomputer built into them. The smart instruments help the operator to get real-time process
measurement information and automatic transmission is required form for further processing
by the process control computer. The smart instruments ensure that the actuator, transmitter or
sensor function according to design.
The major application of digital computers is in process control and plant optimization.
Computer control systems, once prohibitively expensive, can now be tailored to fit most
__________________________________________________________________________________
industrial applications on a competitive economic basis. The advances in the use of computer
control have motivated many and changed the concepts of the operations of industrial
processes. Video display terminals now provide the four for operators to supervise the whole
plant from a control room. Large panels of instruments, knobs and switches are replaced by a
few keyboards and screens. Control rooms are now much smaller and fewer people are required
to supervise the plant.
__________________________________________________________________________________
Figure 9. Block diagram of Data Acquisition System
The devices that perform the interfacing function between analog and digital worlds are
analog-to-digital (A/D) and digital-to-analog (D/A) converters, which together are known as
data converters. Some of the specific applications in which data converters are used include
data telemetry systems, pulse code modulated communications, automatic test systems,
computer display systems, video signal processing systems, data logging systems, and sampled
data control systems. In addition, every laboratory digital multimeter or digital panel meter
contains an A/D converter.
Obtaining proper results from a PC-based DAQ system (in Figure 10) depends on each
of the following system elements.
• Personal computer
• Transducers
• Signal conditioning
• DAQ Hardware
• DAQ Software
__________________________________________________________________________________
3.3.2 Transducers
Transducers sense physical phenomena and provide electrical signals that the DAQ
system can measure. For example, thermocouples, RTDs, thermistors, and IC sensors convert
temperature into an analog signal that an ADC can measure. Other examples include strain
gauges, flow transducers, and pressure transducers, which measure force, rate of flow, and
pressure, respectively. In each case, the electrical signals produced are proportional to the
physical parameters they are monitoring.
3.3.3 Signal Conditioning
The electrical signals generated by the transducers must be optimized for the input
range of the DAQ board. Signal conditioning accessories can amplify low-level signals, and
then isolate and filter them for more accurate measurements. In addition, some transducers
require voltage or current excitation to generate a voltage output. Signal conditioning has the
following applications:
i) Amplification, ii) Isolation, iii) Filtering, iv) Excitation and v) Linearization.
3.3.3.1 Amplification
The most common type of conditioning is amplification. Low-level thermocouple
signals, for example, should be amplified to increase the resolution and reduce noise. For the
highest possible accuracy, the signal should be amplified so that the maximum voltage range
of the conditioned signal equals the maximum input range of the analog-to-digital converter
(ADC). Very high resolution reduces the need for high amplification and provides wide
dynamic range.
3.3.3.2 Isolation
Another common application for signal conditioning is to isolate the transducer signals
from the computer for safety purposes. The system being monitored may contain high-voltage
transients that could damage the computer. An additional reason for needing isolation is to
make sure that the readings from the plug-in DAQ board are not affected by differences in
ground potentials or common-mode voltages. When the DAQ board input and the signal being
acquired are each referenced to “ground,” problems occur if there is a potential difference in
the two grounds. This difference can lead to what is known as a ground loop, which may cause
inaccurate representation of the acquired signal, or if too large, may damage the measurement
system. Using isolated signal conditioning modules will eliminate the ground loop and ensure
that the signals are accurately acquired.
3.3.3.3 Filtering
The purpose of a filter is to remove unwanted signals from the signal that you are trying
to measure. A noise filter is used on DC-class signals such as temperature to attenuate higher
frequency signals that can reduce the accuracy of your measurement. AC-class signals such as
vibration often require a different type of filter known as an antialiasing filter. Like the noise
filter, the antialiasing filter is also a low pass filter; however, it must have a very steep cut off
rate, so that it almost completely removes all frequencies of the signal that are higher than the
input bandwidth of the board. If the signals were not removed, they would erroneously appear
as signals within the input bandwidth of the board.
3.3.3.4 Excitation
Signal conditioning also generates excitation for some transducers. Strain gauges,
thermistors, and RTDs, for example, require external voltage or current excitation signals.
Signal conditioning modules for these transducers usually provide these signals. RTD
measurements are usually made with a current source that converts the variation in resistance
to a measurable voltage. Strain gauges, which are very low-resistance devices, typically are
used in a Wheatstone bridge configuration with a voltage excitation source.
__________________________________________________________________________________
3.3.3.5 Linearization
Another common signal conditioning function is linearization. Many transducers, such
as thermocouples, have a nonlinear response to changes in the phenomena being measured.
Therefore, application software includes linearization routines for thermocouples, strain
gauges, and RTDs.
3.3.4 DAQ Hardware
Data acquisition hardware includes the following functions.
3.3.4.1 Analog Inputs
The analog input specifications can give you information on both the capabilities and
the accuracy of the DAQ product. Basic specifications, which are available on most DAQ
products, tell you the number of channels, sampling rate, resolution, and input range. The
number of analog channel inputs will be specified for both single-ended and differential inputs
on boards that have both types of inputs. Single-ended inputs are all referenced to a common
ground point. These inputs are typically used when the input signals are high level (greater than
1 V), the leads from the signal source to the analog input hardware are short (less than 15 ft.),
and all input signals share a common ground reference. If the signals do not meet these criteria,
you should use differential inputs. With differential inputs, each input has its own ground
reference. Noise errors are reduced because the common-mode noise picked up by the leads is
cancelled out.
3.3.4.2 Sampling Rate
This parameter determines how often conversions can take place. A faster sampling
rate acquires more points in a given time and can therefore often form a better representation
of the original signal.
__________________________________________________________________________________
Figure 12. Digitized sine wave with 3-bit Resolution.
Figure 12 shows a sine wave and its corresponding digital image as obtained by an ideal
3-bit ADC. A 3-bit converter (which is actually seldom used but a convenient example) divides
the analog range into 23, or 8 divisions. Each division is represented by a binary code between
000 and 111. Clearly, the digital representation is not a good representation of the original
analog signal because information has been lost in the conversion. By increasing the resolution
to 16 bits, however, the number of codes from the ADC increases from 8 to 65,536, and you
can therefore obtain an extremely accurate digital representation of the analog signal if the rest
of the analog input circuitry is designed properly.
3.3.5 DAQ Software
Data acquisition software transforms the PC and DAQ hardware into a complete DAQ,
analysis, and display system. DAQ hardware without software is useless and DAQ hardware
with poor software is almost useless. The following two types of software is used: i) Driver
Software and ii) Application Software.
3.3.5.1 Driver Software
The majority of DAQ applications use driver software. Driver software is the layer of
software that directly programs the registers of the DAQ hardware, managing its operation and
its integration with the computer resources, such as processor interrupts, DMA, and memory.
Driver software hides the low-level, complicated details of hardware programming, providing
the user with an easy-to-understand interface.
Driver functions for controlling DAQ hardware can be grouped into analog I/O, digital
I/O, and timing I/O. Although most drivers will have this basic functionality, you will want to
make sure that the driver can do more than simply get data on and off the board. Make sure the
driver has the functionality to:
• Acquire data at specified sampling rates.
• Acquire data in the background while processing in the foreground.
• Use programmed I/O, interrupts, and DMA to transfer data.
• Stream data to and from disk.
• Perform several functions simultaneously.
• Integrate more than one DAQ board.
• Integrate seamlessly with signal conditioning equipment.
3.3.5.2 Application Software
An additional way to program DAQ hardware is to use application software. But even
if you use application software, it is important to know the answers to the previous questions,
because the application software will use driver software to control the DAQ hardware.
Application software adds analysis and presentation capabilities to the driver software.
Application software also integrates instrument control such as GPIB (General Purpose
Interface Bus), RS-232, PXI (Peripheral component interact Extensions for Instrumentation),
and VXI (Virtual Extension for Instrumentation) with data acquisition.
__________________________________________________________________________________
3.4 Supervisory Control
The advent of microprocessor has changed the field of process control completely. The
tasks which were performed by complex and costly minicomputers are now easily programmed
using microcomputers.
In the past computer was not directly connected to the process but was used for
supervision of analog controllers. The analog controllers were interfaced to the process directly
as well as through specialised control for dedicated functions shown in figure 13.
The analog controllers and specialised controllers were called level 2 and level 1 control
respectively. The emergence of economical and fast microprocessor has made analog
controllers completely out-dated, as the same functions can be performed by digital computers
in more efficient and cost effective way.
__________________________________________________________________________________
Figure 14. Direct Digital Control
Figure 14 shows the various functional blocks of a direct digital control system. These
functional blocks have been described in number of books on microprocessor. The multiplexer
acts like a switch under microprocessor control. It switches and presents at its output the analog
signal from a sensor/transmitter. The analog to digital converter converts the analog signal to
digital value.
t K I 0
Yn K P .en K D . e.t Y0 ------ (1)
Where,
Yn - valve position at time n
Yo - median valve position
KP - proportional constant = l00 / PB (where, PB - proportional band in per cent),
KI - integral constant = 1/TI (where TI - integral time constant)
KD - derivative constant =TD (where TD - derivative constant)
en - error at instant tn = (S - Vn)
Vn - value of controlled variable at instant tn
S - set-point
The PID control can be realised with a microprocessor based system, if only the above
equation is implemented in the software. Apparently, it is very difficult to write the software
for implementing the above equation for a microprocessor based system. However, the above
__________________________________________________________________________________
equation can be modified such that its software implementation becomes easy. The
modifications are discussed in the following section.
The integral term at any given instant tn is equal to the algebraic sum of all the control
forces generated by the integral control action from the beginning to that instant. Thus integral
term can be represented as
1 n
et .t
K I t 0
and the differential term, KI . Δe/Δt at any instant tn is proportional to the rate of change of the
error.
Thus, differential term, can be represented as
e e
K D . n n1
t
Where, en is the current error and en-1 is the previous error calculated at instant tn-1.
The integral and the differential control forces are dependent upon the interval between
the two consecutive errors. This interval is the inverse of the rate at which the value of the
controlled variable is measured i.e. the sampling rate. Hence the provision for defining the
sampling rate should be made available in the software.
The flowchart for calculating PID control output based on above equation (Eq. 2) is
shown in Figure 15.
3.5.2.2 Velocity Algorithm
In number of control loops, the final control element is stepper motor or stepper motor
driven valve. In such cases, the requirement at the computer output will be a pulse train
__________________________________________________________________________________
specifying the change in valve position. Thus output of position algorithm cannot be used, since
it gives the new position of the valve, in absolute term. In velocity algorithm, the computer
calculates the required change in valve position. The output is digital pulse train which can be
directly used in case valve is stepper motor driven. In case of other valves, stepper motor
combined with slide wire arrangement can be used. The same function can be performed by an
integrating amplifier.
3.6 Supervisory Control And Data Acquisition (SCADA)
SCADA stands for supervisory control and data acquisition. The SCADA system is
based on Hardware and Software. The hardware included “Master Terminal Unit (MTU),
Remote Terminal Units (RTUs)” or / and actuators, and sensors. The software included Human
Machine Interface (HMI) or other user software that provides communication interface
between SCADA hardware and software.
__________________________________________________________________________________
The channels can be polled
sequentially, in which case the channel
address in first step above increase by one
every time or they may be scanned in some
other order. In the latter case, a channel
Scan Array can he maintained in memory.
The scan array contains the addresses of the
channels in the order in which they should
he addressed. The ASCN array has 9, 10, 1,
2 ... as entries in sequence. Thus, the first
channel to be scanned will be channel 9,
followed by 10, 1, 2. . . pointer reaches the
last entry in the array, first entry is again
taken up (i.e. channel 9 is scanned).
If a channel number is repeated in
the array, then that particular channel will
be scanned repeatedly. Thus it is possible
to scan some channels more than others.
This gives them higher priority over others.
Figure 18. Channel scan array In Figure 18 shows the channel 9 is scanned
3 times, channel, 2 is scanned 2 times while
other channels are scanned once during a
cycle.
__________________________________________________________________________________
permanently in (ROM) Read Only Memory.
Thus the channels are always scanned in
that particular order. However, it may be
desirable to offer the facility of changing
the sequence at the operator level. The
operator may like to take this action
depending on the condition of the plant
being monitored. As an example, if at any
instant operator finds out that the transducer
connected to channel 9 has generated some
fault, then he might take decision to bypass
the channel 9, as otherwise its data will be
taken into analysis to produce incorrect
result. In another situation, it may become
necessary to scan some channel more
frequently for some time to observe its
response to some modifications
incorporated in the system. The operator
should be able insert new scan array at any
time. This facility may be provided through
a key switch, which may be connected to
Figure 20. Scan array with time interrupt request input of processor. The
The scan array may he decided at Interrupt Servicing Routine will accept new
the design stage of SCADA and fused scan array and store in place of the old one.
__________________________________________________________________________________
control decisions. This is the operation of the Master Terminal Unit (MTU) located in the
control center.
Communication between the MTU and RTU is bidirectional, however the major
difference is RTU cannot initiate the conversation, and RTU simply collects the data from the
field and stores the data. Communication between the MTU and RTUs are initiated by the
programs with in the MTU which are triggered either by operator instructions or automatically
triggered. 99% of the instructions and messages to the RTUs from MTUs are automatically
triggered. When Master Terminal Unit (MTU) asks the desired information RTU sends it.
So MTU is considered as master and RTU is the Slave. After receiving the data required MTU
communicates to the printers and CRTs which are operator interface through necessary
protocols. At this level of communication it will be of the form peer-to-peer communication
rather than master slave communication unlike communication between MTUs and RTUs.
Thus in SCADA system Master Terminal Unit (MTU) acts as heart of the system.
3.8 Remote Terminal Unit (RTU)
The Remote Terminal Units (RTUs) are basically distributed SCADA based systems
used in remote locations in applications like oil pipelining, irrigation canals, oil drilling
platforms etc. They are rugged and should be able to work unattended for a long duration.
There are two modes in which Remote Terminal Units work.
1. Under command from central computer
2. Standalone mode
Since these RTU's have to operate for a long duration unattended, the basic
requirements would be that they consume minimum power and have considerable self-
diagnostic facility. Following are the main parts of remote terminal units; Input / Output
modules, and Communication module.
3.8.1 Input / Output Modules
Input / Output modules contain analog input modules, analog output modules, digital
input modules and digital output modules.
3.8.2 Communication Module
The communication module is the most important portion of remote terminal unit and
has the interface available with 2-wire/4-wire communication line. Some of the RTUs may also
have built-in transceivers and modems. Following are the basic communication strategies that
a RTU may use depending on the application need:
3.8.2.1 Wireline communications
The wireline communication may have number of options and these options can be
selected depending upon the distance between central computer and RTU or between two
RTUs. These options are enlisted here:
(i) Option l-RS-232C/442. RTU can support communication via standard RS-
232C/442. The I/O ports can select the average levels as well as the baud rates.
(ii) Option 2-Switch line modem. When the user wants to use the existing telephone
lines for communication, the switch line modem can be effective. Such RTUs contain the
facilities like auto answer, auto dial and auto select baud rates. The modem is ideal for data
networks configured in time or event reporting RTUs and for master station polling networks.
(iii) Option 3-2-wire or 4-wire communication. The modem residents in the RTU can
be configured to 2 or 4-wire communication on dedicated lines. The same communication
protocol is used for all devices making the actual network configuration transparent to the user.
3.8.2.2 Terrestrial UHF/VHF radio with store and forward capability
The RTU may support a complete line of UHF/VHF terrestrial radios. The
communication protocol in these RTUs is transparent to the user and supports CRC
intelligence, error checking, and packet protocol for error free data transmission. The store and
Forward capability of the RTU minimizes the required input in large numbers.
__________________________________________________________________________________
3.8.2.3 Satellite communications
In the applications where wireline and terrestrial radio communications are impossible
or cost prohibitive, the satellite communications may be desirable. Some of the latest RTUs
provide the facility to be interfaced to one-way or two-way satellite communication using Very
Small Aperture Termina1s (VSATs). These terminals use one metre antennas and have data
rates from 50 to 60 Kbps (Kilobits per second).
3.8.2.4 Fibre-optic communications
For applications where electromagnetic interferences or hazardous electrica1 potentials
exist, the RTU can be networked using fibre-optic cables. The same communication protocols
and networking concepts available for wireline and radio are used for fibre-optic
communication.
3.9 Distributed SCADA System
In any application, if the number of channels is quite large then in order to interface
these to processor, one has to use multiplexers at different levels.
__________________________________________________________________________________
(a) Star configuration
__________________________________________________________________________________