Xylem Expert 7060_7070_Modbus User Manual
Page 24

Communication protocol Serie30
Page 30/37
6
Appendix
6.1
Interface converter
The serial RS232 interface or the USB interface can be used for connection to a PC. KELLER offers converters for this purpose.
Various other products are commercially available, however. The following requirements apply when working with KELLER
software:
- The converter must control transmit / receive switch-over automatically.
- KELLER converters feature a hardware echo, i.e. the transmitted message is received again immediately as
an echo. This echo is required by some KELLER software programmes.
6.2
floating-point format IEEE754
As data transmission is effected byte-wise (8-bit data), the floating-point values are represented as follows :
B0: Bit 0..7;
B1: Bit 8..15,
B2: Bit 16..23, B3: Bit 24..31
Representation in accordance with IEEE754:
B3 DATA H (Reg. 0) B2 DATA L (Reg. 0) B1 DATA H (Reg. 1) B0 DATA L (Reg. 1)
b01000001 (0x41)
b00101001 (0x29)
b00000010 (0x02)
b11011110 (0xDE)
Valid Number
b01111111 (0x7F)
b10000000 (0x80)
b00000000 (0x00)
b00000000 (0x00)
∞
/ Overflow
b11111111 (0xFF)
b10000000 (0x80)
b00000000 (0x00)
b00000000 (0x00)
-∞ / Underflow
bx1111111 (0xFF)
b11111111 (0xFF)
b11111111 (0xFF)
b11111111 (0xFF)
Not a Number
1 bit Sign + 8 bit Exponent + 23 bit Mantis = 32 bit
Calculation of the value transmitted:
127
2
2
)
0
.
1
(
)
1
(
23
−
⋅
+
⋅
−
=
E
M
S
V
0 = 0
10000010 = 130
01010010000001011011110 = 2687710
-1
0
* (1.0 + 2687710/8388608) * 2
130-127
= 10.5631999969482421875
These values directly show the value in the requested unit [bar] or [°C].
Ö
10.5632 bar
Usage of Keller software:
If you use the DLL which is available from KELLER, you do not need to carry out conversion, as this is encapsulated in the DLL.
If you wish to address the devices directly, however, you must convert the individual bytes into a floating-point value.
To obtain a floating-point value from the individual bytes, proceed as follows:
1. Define data structure in which an array of 4 bytes and a 32-bit floating-point value is defined at the same memory
location.
2. Write the bytes into the byte array.
3. Read out the floating-point value.
You do not need to carry out any actions, therefore, as the computer attends to interpretation. Some microcontrollers have a
different data structure for floating-point values. In such cases, adaptation is necessary.
Further information is to be found at:
http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html - 556
MJK do
MJK
MJK -
The MJK
MJK ,