Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 458

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

• When the number of decimal part digits is 0, the number of digits that can be specified by (s2)+1 is "the number of digits (24
at a maximum)  6". For other than 0, the number of digits that can be specified by (s2)+1 is "the number of digits (24 at a
maximum) > (the number of decimal point digits + 7)".
• The number of digits in the decimal part that can be specified by (s2)+2 is 0 to 7. Note that the number of digits in the
decimal part must be equal to or smaller than the total number of digits minus 7.
• For example, when the total number of digits is "12", the number of digits of the decimal part is "4", and "-12.34567" is
specified, data is stored in (d) and later as shown below:
(s2)
1
(1)
(s2)+1
12
(s2)+2
4
-
(4)
(s1)+1
(s1)
-
1
. 2 3
4 5 6
7
(6)
(1): Total number of digits
(2): Number of digits of decimal part
(3): Fixed to 2 digit
(4): Sign (integer part)
(5): Sign (exponent part)
(6): Single-precision real number
(7): "0000H" is automatically stored at the end of the character string.
• The converted character string data are stored in the device areas specified by (d) and later as shown below.
• As sign data of the integral part, "20H" (space) is stored if the single-precision real number is positive, and "2DH" (-) is stored if the data is negative.
• The integer part is fixed to 1 digit. "20H (space)" is stored between the integer part and the sign.
(s2)
1
12
(s2)+1
4
(s2)+2
(s1)+1
(s1)
-
1
2 . 3 4 5 6 7
(1): Total number of digits
(2): Fixed to 1 digit
(3): "20H (SP)" is stored.
• If the decimal part of the single-precision real number data cannot be accommodated in the number of digits of the decimal part, lower digits of the
decimal part are rounded.
(s2)
1
(s2)+1
12
(s2)+2
4
(s1)+1
(s1)
-
1
2 . 3 4 5 6 7
(1): Total number of digits
(2): Number of digits of decimal part
(3): These values are rounded down.
8 APPLICATION INSTRUCTION
456
8.8 Character String Operation Instruction
(2)
1
. 2 3 4 6
E
+
0
1
(3)
(5)
(2)
.
-
1
(3)
-
1 .
b15
(d)
20H (SP)
2EH(.)
(d)+1
33H(3)
(d)+2
36H(6)
(d)+3
2BH(+)
(d)+4
(d)+5
31H(1)
(d)+6
(1)
2 3 4 6 E + 0 1
(1)
2 3 4 6 6 7 E +
0 1
(2)
(3)
b8 b7
b0
2DH(-)
31H(1)
32H(2)
34H(4)
45H (E)
30H(0)
0000H
(7)

Hide quick links:

Advertisement

loading