Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 663

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 16-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)
6
(s1)+1
2
BIN16
1 2 3 4
• If the specified number of digits in the decimal part is greater than the number of digits of the 16-bit binary data, 0s are automatically added and the data is
regarded as "0.".
(s1)
6
(s1)+1
3
BIN16
1 2
• If the total number of digits excluding the sign and the decimal point is greater than the number of digits of the 16-bit binary data, "20H" (space) is stored
between the sign and the numeric value. If the number of digits of the 16-bit binary data is greater, an error occurs.
(s1)
8
(s1)+1
1
-
BIN16
- 1 2 3
• 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 8.
• The specified number of digits in the decimal part is out of the range, 0 to 5.
• 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 16-bit binary data specified by (s2).
[Number of digits in (s1)] < [Number of digits of 16-bit binary data excluding the sign in (s2) + Number of digits in the sign (+ or -) +
Decimal point (.)]
1 2 . 3 4
Number of digits in the decimal part
Automatically added.
0 . 0 1 2
Automatically added.
1 2 . 3
Filled with 20Hs (spaces).
7 APPLICATION INSTRUCTIONS
7.8 String Processing Instructions
7
661

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents