Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 666

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

• The converted character string data are stored in the device areas specified by (d) and later as shown below.
• As sign data, 20H (space) is stored if the 32-bit binary data is positive, and 2DH (-) is stored if the data is negative.
• If the number of digits in the decimal part is set to other than 0, "2EH" (.) is automatically stored at the position before the specified number of digits. If the
number of digits in the decimal part is 0, "2EH" (.) is not stored.
(s1)
10
(s1)+1
3
BIN32
1
2 3 4 5 6
7
• If the specified number of digits in the decimal part is greater than the number of digits of the 32-bit binary data, 0s are automatically added and the data is
regarded as "0.".
(s1)
13
(s1)+1
10
BIN32
5 4
3 2 1
• If the total number of digits excluding the sign and the decimal point is greater than the number of digits of the 32-bit binary data, 20H (space) is stored
between the sign and the numeric value. If the number of digits of the 32-bit binary data is greater, an error occurs.
(s1)
13
(s1)+1
2
BIN32
-
5
4 3 2
1
• The value "00H" is automatically stored at the end of the converted character string.
Operation error
Error code
Description
(SD0)
3401H
Invalid data that cannot be converted is input to (s1).
• The specified total number of digits is out of the range, 2 to 13.
• The specified number of digits in the decimal part is out of the range, 0 to 10.
• The relationship between the total number of digits specified by (s1) and the number of digits in the decimal part specified by (s1)+1
does not satisfy the following.
(Total number of digits)-3Number of digits in the decimal part
• The number of digits specified by (s1) is smaller than the number of digits plus 2 of the 32-bit binary data specified by (s2).
[Number of digits in (s1)] < [Number of digits of 32-bit binary data excluding the sign in (s2) + Number of digits in the sign (+ or -) +
Decimal point (.)]
7 APPLICATION INSTRUCTIONS
664
7.8 String Processing Instructions
1 2 3 4 5 . 6 7 8
8
Automatically added.
0 . 0 0 0 0 0 5 4 3 2 1
Automatically added.
-
5
4 3 2 . 1 0
0
Filled with 20Hs (spaces).
Number of digits in the decimal part

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents