D300529 0115 - BL67 I/O modules
15-23
Analog value representation (analog output modules)
The decimal values can be converted into current values from -10 VDC to 10 VDC by means of the fol-
lowing equation:
For positive voltage values 0 VDC to 10 VDC use:
decimal value = 3276,7
× voltage value
The value range:
0 V to 10 V
is displayed as follows:
0000
hex
to 7FFF
hex
(decimal: 0 to 32767)
For negative voltage values -10 VDC to 0 VDC use:
decimal value = 3276,8
× voltage value
The value range:
-10 V to -3,052 10
-4
V
is displayed as follows:
8000
hex
to FFFF
hex
(decimal:-32768 to -1)
Conversion of the decimal values into hexadecimal/binary values
The decimal value can easily be converted into hexadecimal value. The two’s complement (→ page
15-9) for the 16 bit values corresponds to th
e dual numbers in the positive range.
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 voltage value -6 V is searched:
Convert the value as follows, using the equation above:
decimal value = 3276,8
× (-6 V) = -19660,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 C
onvert the amount of the negative decimal value to a binary number:
= 19660,8 ⇔ 100.1100.1100.1100
2 Fill the 16 bit of the binary number with "0":
100.1100.1100.1100 ⇔ 0100.1100.1100.1100
3 Invert the 16-digit binary number:
0100.1100.1100.1100 → 1011.0011.0011.0011