Faculty of Engineering
Electrical Engineering Department
Programmable Logic Controller
Chapter 10
Data Manipulation Instructions
An-Najah National University
Faculty of Engineering
Electrical Engineering Department
Programmable Logic Controller
Data Manipulation
Data manipulation instructions allow numerical data stored in the
controllers memory to be operated on within the control program.
The use of data manipulation extends a controllers capability
from that of simple on/off control based on binary logic, to quantitative
decision making involving data comparisons, arithmetic, and conversions
which in turn can be applied to analoge and positioning control.
There are two basic classes of instructions to accomplish data
manipulation: instructions that operate on word data and those that
operate on file, or block, data, which involve multiple words.
The data manipulation instructions allow the ovement,manipulation, or
storage of data in either single- or multiple-word groups from one data
memory area of the PLC to another.
Data manipulation can be placed in two broad categories: data transfer
and data comparison.
An-Najah National University
Faculty of Engineering
Electrical Engineering Department
Programmable Logic Controller
Data Manipulation
Figure shows the Move/Logical menu tab for the SLC 500 PLC and its
associated RSLogix software.
The commands can be summarized as follows:
MOV (Move) Moves the source value to the destination.
MVM (Masked Move) Moves data from a source location to a
selected portion of the destination.
AND (And) Performs a bitwise AND operation.
OR (Or) Performs a bitwise OR operation.
XOR (Exclusive Or) Performs a bitwise XOR operation.
NOT (Not) Performs a bitwise NOT operation.
CLR (Clear) Sets all bits of a word to zero.
An-Najah National University
Faculty of Engineering
Electrical Engineering Department
Programmable Logic Controller
Closed-Loop Control
In open-loop control, no feedback loop is employed and system
variations which cause the output to deviate from the desired value are
not detected or corrected.
A closed-loop system utilizes feedback to measure the actual system
operating parameter being controlled such as temperature, pressure,
flow, level, or speed.
This feedback signal is sent back to the PLC where it is compared with
the desired system set-point.
The controller develops an error signal that initiates corrective action
and drives the final output device to the desired value..
An-Najah National University
Faculty of Engineering
Electrical Engineering Department
Programmable Logic Controller
Closed-Loop Control
PLC set-point control in its simplest form compares an input value,
such as analoge or thumbwheel inputs,to a set-point value.
A discrete output signal is provided if the input value is less than,
equal to, or greater than the set-point value.
The temperature control program of Figure is one example of set-
point control.
In this application, a PLC is to provide for simple off/on control
of the electric heating elements of an oven.
An-Najah National University
Faculty of Engineering
Electrical Engineering Department
Programmable Logic Controller
Closed-Loop Control
An-Najah National University
Faculty of Engineering
Electrical Engineering Department
Programmable Logic Controller
Closed-Loop Control
Several set-point control schemes can be performed by different PLC
models.
These include on/off control, proportional (P) control, proportional-
integral (PI) control, and proportional-integral-derivative (PID) control.
Each involves the use of some form of closed-loop control to maintain
a process characteristic such as a temperature, pressure, flow, or level at
a desired value.
When a control system is designed such that it receives operating
information from the machine and makes adjustments to the machine
based on this operating information, the system is said to be a closed-
loop system.
An-Najah National University
Faculty of Engineering
Electrical Engineering Department
Programmable Logic Controller
Closed-Loop Control
The block diagram of a closed-loop control system is shown in Figure .
A measurement is made of the variable to be controlled.
This measurement is then compared to a reference point, or set-point.
If a difference (error) exists between the actual and desired levels, the
PLC control program will take the necessary corrective action.
Adjustments are made continuously by
the PLC until the difference between the
desired and actual output is as small as
is practical.
An-Najah National University
Faculty of Engineering
Electrical Engineering Department
Programmable Logic Controller
Closed-Loop Control
With on/off PLC control (also known as two-position and bang-bang
control ), the output or final control element is either on or offone for
the occasion when the value of the measured variable is above the set-
point and the other for the occasion when the value is below the
set-point.
The controller will never keep the final control element in an
intermediate position.
Most residential thermostats are on/off type controllers.
On/off control is inexpensive but not accurate enough for most process
and machine control applications.
On/off control almost always means overshoot and resultant system
cycling.
For this reason a deadband usually exists around the set-point.
The deadband or hysteresis of the control loop is the difference
between the on and off operating points.
An-Najah National University
Faculty of Engineering
Electrical Engineering Department
Programmable Logic Controller
Closed-Loop Control
Proportional controls are designed to eliminate the hunting or cycling
associated with on/off control.
They allow the final control element to take intermediate positions
between on and off.
This permits analog control of the final control element to vary the
amount of energy to the process, depending on how much the value of
the measured variable has shifted from the desired value.
An-Najah National University
Faculty of Engineering
Electrical Engineering Department
Programmable Logic Controller
Closed-Loop Control
Proportional-integral-derivative (PID) control is the most sophisticated
and widely used type of process control.
PID operations are more complex and are mathematically based.
PID controllers produce outputs that depend on the magnitude,
duration, and rate of change of the system error signal.
Sudden system disturbances are met with an aggressive attempt to
correct the condition.
A PID controller can reduce the system error to 0 faster than any
other controller.
An-Najah National University
Faculty of Engineering
Electrical Engineering Department
Programmable Logic Controller
Closed-Loop Control
Control Block is the file that stores the data required to operate the
instruction.
Process Variable (PV) is an element address that stores the process
input value.
Control Variable (CV) is an element address that stores the output of
the PID instruction.