Smartec S CLD132/134 PROFIBUS-PA/-DP
System integration
Hauser
19
PROFIBUS processes data in hexadecimal code and converts them into 4 bytes (each 8 bits,
4x8=32 bits).
In accordance with IEEE 754, a number has three components:
• Sign (S)
The sign requires exactly 1 bit and has the values 0 (+) or 1(-).
Bit 7 of the 1st byte of a 32-bit floating-point number defines the sign.
• Exponent
The exponent is composed of bits 6 to 0 of the 1st byte plus bit 7 of the 2nd byte (= 8 bits).
• Mantissa
The remaining 23 bits are used for the mantissa.
Explanation of measuring range switch (MRS)
Byte 1
Byte 2
Byte 3
Byte 4
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
V
Z
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
2
-
1
2
-
2
2
-
3
2
-
4
2
-
5
2
-
6
2
-
7
2
-
8
2
-
9
2
-
10
2
-
11
2
-
12
2
-
13
2
-
14
2
-
15
2
-
16
2
-
17
2
-
18
2
-
19
2
-
20
2
-
21
2
-
22
2
-
23
S
Exponent
Mantissa
Formula (IEEE 754):
Value
= (-1)
VZ
* 2
(exponent - 127)
* (1 + Mantissa)
Example:
40 F0 00 00
= 0 10000001 1110000 00000000 00000000
(hexadecimal)
Byte 1
Byte 2
Byte 3
Byte 4
Value
=
=
=
=
(-1)
0
* 2
(129 - 127)
* (1 + 2
-1
+ 2
-2
+ 2
-3
)
1 * 2
2
* (1 + 0.5 + 0.25 + 0.125)
1 * 4 * 1.875
7.5
MRS
Function
reserved
reserved
reserved
reserved
reserved
E2
E1
de
cim
a
l
hexa
dec
ima
l
number of binary inputs = 2; E1 and E2 active
-
-
-
-
-
0
0
0
0x00
MRS 1
-
-
-
-
-
0
1
1
0x01
MRS 2
-
-
-
-
-
1
0
2
0x02
MRS 3
-
-
-
-
-
1
1
3
0x03
MRS 4
number of binary inputs = 1; E1 and E2 active
-
-
-
-
-
0
0
0
0x00
MRS 1
-
-
-
-
-
-
1
1
0x01
Hold on
-
-
-
-
-
1
0
2
0x02
MRS 2
number of binary inputs = 0; E1 active
-
-
-
-
-
-
0
-
0x00
Hold off
-
-
-
-
-
1
1
0x01
Hold on