FX Series Programmable Controllers Devices in Detail 4
4-47
4.15.1 Scientific Notation
This format could be called the step between the ‘inte
g
er’ formats and the full floatin
g
point
formats. In basic terms Scientific Notation use two devices to store information about a number
or value. One device contains a data strin
g
of the actual characters in the number (called the
mantissa), while the second device contains information about the number of decimal places
used in the number (called the exponent). Hence, Scientific Notation can accommodate values
g
reater/smaller than the normal 32 bit limits, i.e. -2,147,483,648 to 2,147,483,647 where
Scientific Notation limits are;
Maximums Minimums
9999 10
35
9999 10
-41
-9999 10
35
-9999 10
-41
Scientific Notation can be obtained b
y
usin
g
the BCD, or EBCD in FX
2N
, instruction (FNC 18 or
FNC 118) with the float fla
g
M8023 set ON. In this situation floatin
g
point format numbers are
converted b
y
the BCD instruction into Scientific Notation - see pa
g
e 5-22 for details. When
usin
g
the FX2N the INT instruction (FNC 129) can be used.
Scientific Notation can be converted back to floatin
g
point format b
y
usin
g
the BIN instruction
(FNC 19) with the float fla
g
M8023 set ON - see pa
g
e 5-22 for details.
The followin
g
points should be remembered about the use of Scientific Notation within
appropriate FX units;
• The mantissa and exponent are stored
in consecutive data re
g
isters.
Each part is made up of 16 bits and can
be assi
g
ned a positive or ne
g
ative value
indicated b
y
the value of the most
si
g
nificant bit (MSB, or bit 15 of the data
re
g
ister) for each number.
• The mantissa is stored as the first 4
si
g
nificant fi
g
ures without an
y
roundin
g
of the number, i.e. a floatin
g
point number of value 2.34567 10
3
would be stored as a
mantissa of 2345 at data re
g
ister D and an exponent of 0 (zero) at data re
g
ister D+1.
• The ran
g
e of available mantissa values is 0, 1000 to 9999 and -1000 to -9999.
• The ran
g
e of available exponent values is +35 throu
g
h to -41.
• Scientific format cannot be used directl
y
in calculations, but it does provide an ideal method
of displa
y
in
g
the data on a monitorin
g
interface.
b0b15 b15 b0
EXPONENT MANTISSA
Sign bit (MSB)
1= Negative
0 = Positive
Sign bit (MSB)
1= Negative
0= Positive
Data Register D+1 Data Register D