Appendix
D300529 0115 - BL67 I/O modules15-26
For negative voltage values -10 VDC to 0 VDC use:
decimal value = 204,8
× voltage value
The value range:
-10 V to -0.0049 V
is displayed as follows:
800
hex
to FFF
hex
(decimal: -2048 to -1)
The decimal value can easily be converted into hexadecimal value. The two’s complement (→ page
15-9) for the 12 bit values corresponds to the
dual numbers in the positive range.
As the numbers are represented left-justified, a "0" has
to be added to the 3-digit hexadecimal value or
the number has to move one digit to the left page 15-24.
Conversion of the decimal values into hexadecimal/binary values
The conversion of negative decimal values into hexadecimal values is
more complicated, because the
values have to be coded as a two’s complement. The following example explains the method of con-
version:
The 4-digit hexadecimal number for the volt
age value -6 V is searched:
decimal value = 204,8
× (-6 V) = -1228,8
Some calculators can be used to convert negative decimal values directly in a hexadecimal value coded
as two’s complement.
Without such a calculator, conv
ert the value as follows:
1 Convert the amount of the negative decimal value to a binary number:
= 1228,8 → 100.1100.1100
2 Fill the 12 bit of the binary number with "0":
100.1100.1100 → 0100.1100.1100
3 Invert the 12-digit binary number:
0100.1100.1100 → 1011.0011.0011
4 Add "1" to this inverted number:
1011.0011.0011
0000.0000.0001
1011.0011.0100
5 The number is now coded as a two’s complement and can be converted into a hexadecimal num-
ber.
1011.0011.0100 → B34