FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
Related devices
Device
Name
M8020
Zero flag
M8021
Borrow flag
M8022
Carry flag
Related instructions
Instruction
ESTR (FNC116)
STR (FNC200)
VAL (FNC201)
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
• When any character other than "30H (0)" to "39H (9)" exists in the integer part or decimal part (error code: K6706)
• When "2EH (.)" exists in two or more positions in a character string specified by
• When any character other than "45H (E)", "2BH (+)" or "2DH (-)" exists in the exponent part, or when two or more
exponent parts exist (error code: K6706)
• When "00H" does not exist in the corresponding device range starting from
• When the number of characters after
Program examples
1)
In the program example shown below, a character string stored in R0 and later is converted into binary floating
point, and stored to D0 and D1 when X000 turns ON
X000
→ For the use methods of the zero, borrow and carry flags, refer to Subsection 6.5.2.
Condition
The conversion result is true "0".
(The mantissa part is "0".)
The absolute value of the conversion result
−126
is less than "2
".
The absolute value of the conversion result
128
is not less than "2
".
Converts binary floating point data into a character string (ASCII codes).
Converts binary data into a character string (ASCII codes).
Converts a character string (ASCII codes) into binary data.
S
is "0" or more than "24" (error code: K6706)
FNC117
R0
D0
DEVALP
END
b15
b8 b7
R0
20H(space)
R1
31H(1)
32H(2)
R2
34H(4)
R3
32H(2)
R4
R5
00H
0
1
2 3 4
Ignored.
18 Floating Point – FNC110 to FNC139
18.5 FNC117 – EVAL / Character String to Floating Point Conversion
Description
The zero flag M8020 turns ON.
D
The value of
numbers and the borrow flag M8021 turns ON.
D
The value of
numbers and the carry flag M8022 turns ON.
Description
b0
2DH(-)
30H(0)
2EH(.)
33H(3)
35H(5)
31H(1)
5 2
1
Rounded.
Operation
−126
is the minimum value (2
) of 32-bit real
128
is the maximum value (2
) of 32-bit real
S
(error code: K6706)
(error code: K6706)
S
D1
D0
− 1.23452
11
12
13
14
15
16
17
18
19
20
501