5 Applied Functions
5.1 Type Conversion Functions
85
FXCPU Structured Programming Manual
(Application Functions)
1
O
utlin
e
2
Function Li
st
3
Functi
on
Cons
tructi
on
4
Ho
w t
o R
ea
d
Explanati
on of
Func
tions
5
Appl
ie
d
Functions
6
Stan
dard
Functi
on
Blocks
A
Correspondence
be
tw
een Dev
ice
s
an
d A
ddres
ses
2) The string data obtained by conversion is output to a device specified in
as follows:
a) The number of digits is fixed respectively for the integer part, decimal part and exponent part as
follows:
Integer part: 1, decimal part: 5, exponent part: 2
"2EH (.)" is automatically stored in the 3rd byte, and "45H (E)" is automatically stored in the 9th byte.
b) In "Sign data (integer part)", "20H (space)" is stored when the input value is positive, and "2DH (-)" is
stored when the input value is negative.
c) The 6th and later digits of the decimal part are rounded.
d) "30H (0)" is stored in the decimal part when the number of significant figures is small.
e) In "Sign data (exponent part)", "2BH (+)" is stored when the input value is positive, and "2DH (-)" is
stored when the input value is negative.
f) "30H (0)" is stored in the tens place of the exponent part when the exponent part consists of 1 digit.
3) "00H" is automatically stored at the end (7th word) of the character string.
Cautions
1) Use the function having "_E" in its name to connect a bus.
2) When handling character string data and 32-bit data in structured programs, you cannot specify 16-bit
devices directly, different from simple projects. Use labels when handling string data and 32-bit data.
You can specify 32-bit counters directly, however, because they are 32-bit devices.
Use global labels when specifying labels.
d
-12.3456
Float (single precision)
data
E
-
1 . 2 3 4 5 6
+ 0 1
Integer part
(1 digit)
Total number of digits (12 digits)
Decimal part
(5 digits)
"2EH (.)" is stored.
"45H (E)" is stored.
Exponent part
(2 digits)
-12.345678
Float (single precision)
data
E
- 1 . 2 3 4 5
7 8
6
7
+ 0 1
Total number of digits (12 digits)
Number of digits
of decimal part (5)
These digits are rounded.
-12.34
Float (single precision)
data
E
- 1 . 2 3 4 0 0
+ 0 1
"30H (0)" is stored.
Number of digits of decimal part (5)
Total number of digits (12 digits)
-12.3456
Float (single precision)
data
E
- 1 . 2 3 4 5 6
+ 0 1
Total number of digits (12 digits)
"30H (0)" is stored.
Number of digits of exponent part (2)