Vous êtes sur la page 1sur 14

DATA HANDLING

Some situations arise where a group of bits


have to be handled.

(ex) a sensor supplies an analogue signal


which is converted to, say, an 8-bit word
before becoming an input to a PLC.

The operations that may be carries out with a


PLC on data words normally include:

Moving data.

Comparison of magnitudes of data,


(i.e.)greater then, equal to or less than.

Arithmetic operations such as addition and


subtraction.

Conversions between binary coded decimal


(BCD), binary and octal.

DATA REGISTERS
Data instructions also require

memory addresses.
The locations in the PLC

memory allocated for data are


termed as data registers.
Each data register can store a

binary word of usually, 8 or 16


bits.

Addresses are given as

D0,D1,D2 and so on.


A 8-bit word means that a

quantity is specified to a
precision of 1 in 256, a 16-bit a
precision of 1 in 65536.
Each instruction has to specify

the form of the operation

the source of the data used in


terms of its data register

the destination data register of


the data.

DATA MOVEMENT
For data movement, the

instruction will contain

Move data instruction

The source address of the data

The destination address of the


data

The following is the ladder


rung to transfer data from D1
to D2.

DATA COMPARISON

SAMPLE APPLICATION
OF DATA COMPARISON
Comparison might be used when signals
from two sensors are to be compared by
the PLC before action is taken.

(ex) an alarm might be required to be


sounded if a sensor indicates a
temperature above 80oc and remain
sounding until temperature falls below
70oc

ARITHMETIC
OPERATIONS
The instruction to add or

subtract consists of:

The instruction.

The register containing the


address of the value to be
added or subtracted.

The address of the value to


which the addition or from
which the subtraction is to be
made.

The register where the result


is to be stored.

It may be used to alter the


value of some sensor input
value, perhaps a correction or
offset term or alter the preset
values of timers or counters.

The following shows the form


used for the ladder symbol for
addition with OMRON.

CODE
CONVERSIONS
All internal operations in the

CPU of a PLC are carried out


using binary numbers.
So when input is a decimal,

conversion to binary required.

Also when a decimal output is

required, conversion from


Binary to decimal is needed.
(ex) following is the rung

employed in conversion from


BCD to binary.

ANALOG
INPUT/OUTPUT
Many sensors generate analog

signals and many actuators


require analog signals.

Thus, some PLCs have A-D

converter fitted to input


channels and D-A converter
fitted to output channels.
(ex) speed control of a motor

so that its speed moves up to


its steady value at a steady rate.
The program is as shown
below:

Contd
A PLC equipped with analog

input channels can be used to


carry out a continuous control
function, (i.e) PID control.

To carry out proportional

control on an analog input the


following set of operations can
be used:

Convert the sensor output to a


digital signal.

Compare the converted actual


sensor output with the
required sensor value (i.e) the
set point and obtain the
difference(error).

Multiply the error by the


proportional constant Kp.

Move this result to the D-A


converter output and use the
result as the correction signal
to the converter.

SAMPLE
APPLCATION OF
ANALOG I/O
Temperature controller.
The input could be from a

thermocouple, which after


amplification is fed through an
A-D converter into the PLC.

The PLC is programmed to

give an output proportional to


the error between the input
from the sensor and the
required temperature.
The output word is then fed

through a D-A converter to the


actuator, a heater, in order to
reduce the error. (program in
next slide).

TEMPERATURE
CONTROL

SELECTION OF A
PLC
Criteria to be considered are as

follows:

What i/o capacity is required,


(i.e) the number of i/o,
capability of expansion for
future needs.

2.

What types of i/o are


required, (i.e) isolation,
onboard power supply for i/o,
signal conditioning.

3.

What size of memory is


required? This is linked to the
number of i/o and the
complexity of program used.

4.

What speed and power is


required for the CPU? This is
linked to the number of types
of instruction that can be
handled by a PLC. As the
number of types increases , a
faster CPU is required.
Likewise, the greater the
number of i/o to be handled
the faster the CPU required.

Vous aimerez peut-être aussi