Mitsubishi Electric MELSEC FX3U Programming Manual page 522

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

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
520
→ 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
−126
result is less than "2
The absolute value of the conversion
result 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
FNC117
R0
DEVALP
b15
b8 b7
20H(space)
R0
R1
31H(1)
32H(2)
R2
34H(4)
R3
32H(2)
R4
R5
00H
0
1
2 3 4
Ignored.
18.5 FNC117 – EVAL / Character String to Floating Point Conversion
Description
The zero flag M8020 turns ON.
The value of
".
bit real numbers and the borrow flag M8021 turns ON.
The value of
128
".
bit real numbers and the carry flag M8022 turns ON.
Description
is "0" or more than "24" (error code: K6706)
D0
END
b0
2DH(-)
30H(0)
2EH(.)
33H(3)
35H(5)
31H(1)
5 2
1
Rounded.
18 Floating Point – FNC110 to FNC139
Operation
D
is the minimum value (2
is the maximum value (2
D
(error code: K6706)
S
(error code: K6706)
S
D1
D0
−1.23452
−126
) of 32-
128
) of 32-

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents