CAN-8124/CAN-8224/CAN-8424 User Manual
CAN-8124/ CAN-8224/ CAN-8424 User Manual (Version 2.0, Aug/2007)
133/153
Chapter 8 Interpreting Analog Module Data
8.1 Analog Input Module Data transfer
Since the CAN-8x24 only supports the hex format, all of the AI channels
need to transfer to the hex format when storing into this object. The
transformation equation is shown below.
(
)
min
min
max
min
max
min
F
F
F
H
H
H
HexValue
FloatValue
+
−
∗
⎟
⎠
⎞
⎜
⎝
⎛
−
−
=
The FloatValue is the result after transformation. The HexValue is the
value which wants to be transferred. The Hmax and Hmin is the maximum and
minimum values of the 2's complement hex range. The Fmax and Fmin is the
maximum and minimum value of the float range. Users can find out the Hmax,
Hmin, Fmax, and Fmin, values from in the appendix B. For example, the input
range for the module I-7017 is set to -10V ~ +10V. According to the table in the
appendix B, we can find out the range for the hex format as 0x8000 (+32767) ~
0x7FFF (-32768). Therefore, if the value received from the AI channel of the
I-7017 is 0x1234, the AI value with a float format can be calculated as follows.
(
)
(
)
(
)
(
) (
)
V
V
V
V
422
.
1
10
10
10
32768
32767
32768
4660
≈
−
+
−
−
∗
⎟⎟
⎠
⎞
⎜⎜
⎝
⎛
−
−
−
−
Incidentally, any AI value which is bigger than the maximum value of the input
range will be set to the maximum value of the input range automatically.
Furthermore, the AI value which is smaller than the minimum value of the input
range is also set to the minimum value of the input range automatically.