Data types
Integer
7
4.4 Data types
Physically, the types consist of one or more octets (Bytes). One byte consists of 8 bits (Bit 0 to 7). Bit 0 is the LSB (Least
Significant Bit). A byte can also be depicted hexadecimally (0x00 ... 0xff).
If a data type consists of n byte, the following applies:
Data byte 1 (Byte in address x)
= highest value byte
Data byte n (Byte in address x+n-1)
= lowest value byte
The data coding in this chapter and the value ranges for the respective data types apply, unless otherwise explicitly stated in
the data description of a COMPAX communication object.
4.4.1 Integer
Integer values are signed quantities.
Type
Value range
Length
Integer8
-128 ... +127
1 Byte
Integer16
-32 768 ... +32 767
2 Byte
Integer32
-2 147 483 647 ... +2 147 483 647
-2 147 483 648 (0x80 00 00 00)
"
Overflow
4 Byte
Coding
Two's complement
In objects with the data type Integer32 it is possible that its value lies outside the value range.
If this is the case, the corresponding object has the value -2 147 483 648 (0x80 00 00 00)
"
Overflow.
E.G. this is possible with the objects LAGE_IST or GRENZEN, as the actual travel area
of COMPAX M/S lies b/- 4 000 000.
4.4.2 Unsigned
Unsigned values are unsigned quantities.
Type
Value range
Length
Unsigned8
0...255
1 Byte
Unsigned16
0...65 535
2 Byte
Unsigned32
0...4 294 967 295
4 Byte
Coding
binary