Mitsubishi Electronics FX3G User Manual

Page of 964
496
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
18 Floating Point – FNC110 to FNC139
18.4 FNC116 – ESTR / Floating Point to Character String Conversion
Program examples
1) In the program example shown below, the contents (binary floating point data) of R0 and R1 are converted
according to the contents specified by R10 to R12, and then stored to D0 and later when X000 turns ON
2) In the program shown below, the contents (binary floating point data) of R0 and R1 are converted according to the
contents specified by R10 to R12, and then stored to D10 and later when X000 turns ON
X000
FNC116
DESTRP
R0
R10
END
D0
Total number
of digits
0 3 3
0
Space Number of
digits of
decimal part
0
7
3
R11
R1
R10
R12
Conversion
format
Total number
of digits
Number of digits
of decimal part
R0
0.0327457
20H(space)
2EH(.)
b15
b8 b7
b0
00H is automatically stored at
the end of the character string.
33H(3)
00H
20H(space)
30H(0)
30H(0)
33H(3)
D1
D0
D2
D3
X000
FNC116
DESTRP
R0
R10
END
D10
1 (exponent
format)
12
4
R11
R10
R12
Conversion
format
Total number
of digits
Number of digits
of decimal part
Total number
of digits
0
2 7 4 6 E
2
3
Number of digits
of decimal part
Space
R1
R0
0.0327457
20H(space)
2EH(.)
b15
b8 b7
b0
0000H is automatically stored at the
end of the character string.
37H(7)
36H(6)
20H(space)
33H(3)
34H(4)
45H(E)
2DH(-)
32H(2)
0000H
30H(0)
32H(2)
D10
D11
D12
D13
D14
D15
D16