655
Data Control Instructions Section 3-17
Negative Values
An Analog Input Unit actually inputs values from FF38 to 1068 hexadecimal
for 0.8 to 5.2 V. SCL(194), however, can handle only unsigned binary values
between 0000 and FFFF hexadecimal, making it impossible to use SCL(194)
directly to handle signed binary values below 1 V (0000 hexadecimal), i.e.,
FF38 to FFFF hexadecimal. In an actual application, it is thus necessary to
add 00C8 hexadecimal to all values so that FF38 hexadecimal is represented
as 0000 hexadecimal before using SCL(194), as shown in the following exam-
ple.
In this example, values from 0000 to 00C8 hexadecimal will be converted to
negative values. SCL(194), however, can output only unsigned BCD values
from 0000 to 9999, so 0000 BCD will be output whenever the contents of D0
is between 0000 and 00C8 hexadecimal.
(BCD)
(BIN)
(BCD)
(BIN)
P1: D100
P1+1: D101
P1+2: D102
P1+3: D103
P1
R
D0
0.00
D100
D200
Contents of D0 (R)
Contents of D0 (S)
Point B
Point A
5 V
0FA0 Hex
1 V
0000 Hex
(BCD)
(BIN)
(BCD)
(BIN)
P1: D100
P1+1: D101
P1+2: D102
P1+3: D103
+
200
#C8
D0
D0
D100
D200
+00C8 Hex
Contents of D200 (R)
Point B
Point A
Contents of D0 (S)
Point A (00C8 Hex → 0000 (BCD))
Point B (1068 Hex → 0300 (BCD))
The value in CIO
200 plus 00C8
hexadecimal
0.8 V
0000 Hex
1130 Hex
1068 Hex
00C8 Hex
0000 Hex
0FA0 Hex
0000 Hex
FF38 Hex
5 V
5.2 V
1 V
0.8 V
1 V
0008 Hex
5 V
1068 Hex
5.2 V
1130 Hex
1068 Hex