FX Series Programmable Controllers Devices in Detail 4
4-42
4.14.2 Word Devices
Word devices such as T, C, D, V and Z can store data about a particular event or action within
the PLC. For the most part these devices are 16 bit re
g
isters. However, certain variations do
have 32 bit capabilities, as can pairs of consecutive data re
g
isters or combined V and Z
re
g
isters.
It ma
y
seem stran
g
e to quote the size of a word device in bits. This is not so stran
g
e when it is
considered that the bit is the smallest unit of data within the PLC. So b
y
identif
y
in
g
ever
y
thin
g
in bit format a common denomination is bein
g
used, hence comparison etc is much easier.
Additional consequences of this bit interpretation is that the actual data can be interpreted
differentl
y
. The ph
y
sical pattern of the active bits ma
y
be the important feature or perhaps the
numerical interpretation of the bit pattern ma
y
be the ke
y
to the pro
g
ram. It all comes down to
how the information is read.
4.14.3 Interpreting Word Data
As word data can be read in man
y
wa
y
s the si
g
nificance of certain parts of the word data can
chan
g
e. PLC’s can read the word data as:
- A pure bit pattern
- A decimal number
- A hexadecimal number
- Or as a BCD (Binar
y
Coded Decimal) number
The followin
g
examples will show how the same piece of data can become man
y
different
thin
g
s dependin
g
wholl
y
on the wa
y
the information is read or interpreted.
a) Considerin
g
a bit pattern
The followin
g
bit pattern means nothin
g
- it is simpl
y
16 devices which have two states.
Some of the devices are randoml
y
set to one of the states. However, if the header
notation (base 2) is added to the 16 bit data the sum, decimal, total of the active bits can
be calculated, e.
g
.,
Decimal value = (2
0
x 1) + (2
2
x 1) + (2
4
x 1) + (2
5
x 1)
+(2
5
x 1) + (2
9
x 1) + (2
10
x 1) + (2
11
x 1) + (2
12
x 1)
Decimal value = 7797
This is in fact incorrect!
There is one bit device which has been shaded in. If its header notation is studied
carefull
y
it will be noted that it sa
y
s MSB. This is the Most Si
g
nificant Bit. This sin
g
le bit
device will determine if the data will be interpreted as a positive or ne
g
ative number. In
this example the MSB is equal to 1. This means the data is ne
g
ative.
The answer however, is not -7797.
1 0 0 1 1 1 1 0 0 1 1 1 0 1 0 1
1 0 0 1 1 1 1 0 0 1 1 1 0 1 0 1
222222222222222
01234567891011121314
MSB