FX Series Programmable Controllers Devices in Detail 4
4-44
c) ABCD conversion
Usin
g
the ori
g
inal bit pattern as a base but addin
g
the followin
g
BCD headers allows the
conversion of the binar
y
data into a BCD format.
Binary Coded Decimal value= ERROR!!!!!
It will be noticed that this will produce an ERROR. The conversion will not be correct.
This is because BCD numbers can onl
y
have values from 0 to 9, but the second block of
4 bit devices from the left would have a value of 14. Hence, the error.
The conversion process is ver
y
similar to that of hexadecimal except for the mentioned
limit on values of 0 to 9. If the other blocks were converted
j
ust as an example the
followin
g
values would be found;
Extreme Left Hand Block= ((1
×
8) + (1
×
1)) = 9
Second Ri
g
ht Hand Block= ((1
×
4) + (1
×
2) + (1
×
1)) = 7
Extreme Ri
g
ht Hand Block= ((1
×
4) + (1
×
1)) = 5
BCD data is read from left to ri
g
ht as a normal number would be read. Therefore, in this
example the “9” would actuall
y
represent “9000”. The second ri
g
ht hand block is actuall
y
“70” not “7”. The units are provided b
y
the extreme ri
g
ht hand block, i.e. 5. The hundreds
“100’s” would have been provided b
y
the second left hand block (which is in error).
It is also important to note that there is no si
g
n with BCD converted data. The maximum
number allowable for a sin
g
le data word is “9999” and the minimum is “0000”.
Word Data Summary
In each of the previous cases the ori
g
inal bit pattern had a further meanin
g
. To recap the three
new readin
g
s and the ori
g
inal bit pattern,
Decimal : -24971
Hexadecimal : 9E75
BCD : Error (9?75)
Each meanin
g
is radicall
y
different from the next
y
et the
y
are all different wa
y
s of describin
g
the same thin
g
. The
y
are in fact all equal to each other!
1 0 0 1 1 1 1 0 0 1 1 1 0 1 0 1
8421842184218421
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