24. MATHEMATIC ROUTINES
The CPU of the Compact PLC is equipped with fast floating point mathematic routines. These routines
are components of the operating system. They are called by means of statement list instruction
mnemonics.
In addition to the basic mathematics addition, subtraction, multiplication, division and square root
numerous conversion and utility programs available (e.g. for comparing and copying). Numbers are
represented in standard 4 byte IEEE format. A detailed description of these mathematic routines can be
found in the MAAWLKB-E booklet.
NOTE:
Mathematic routines may not be used in the interrupt routines.
Number Formats
IEEE-Floating point format
31
24 23
S
EXP
S
S ... Sign
EXP ... 7 bit exponent
Absolute with sign, long
31
24 23
S
Absolute with sign, short
15 14
8 7
S
ABSOLUTE VALUE
Integer, long
31
24 23
S
Integer, short
15 14
8 7
S
2's complement
Format
16 15
8 7
MANTISSA
MANTISSA ... 23 bit mantissa
16 15
8 7
ABSOLUTE VALUE
0
16 15
8 7
2's complement
0
B&R COMPACT PLC
Range
18
-9.22 * 10
to -9.22 * 10
0
and
-18
9.22 * 10
to 9.22 * 10
±2.15 * 10
0
9
±32767
0
±2.15 * 10
9
-32768 to +32767
-18
18
- 223 -