EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-R Series - Page 662

Mitsubishi Electric MELSEC iQ-R Series
2110 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
660
7 APPLICATION INSTRUCTIONS
7.8 String Processing Instructions
Processing details
These instructions add a decimal point to the 16-bit binary data in the device specified by (s2) at the location specified by
(s1), convert the data to character string data, and store the converted data in the device areas specified by (d) and later.
Ex.
When converting data "-123" in (s2) into a string assuming that the number of decimal places is one ("-12.3")
The total number of digits that can be specified by (s1) is 2 to 8.
The number of digits in the decimal part that can be specified by (s1)+1 is 0 to 5. Note that the number of digits in the
decimal part must be smaller than the total number of digits minus 3.
(s1)+1
b15 b8 b7 b0
00H
.
(d)+4
(d)+3
(d)+2
(d)+1
(d)
(s2)
(s1)
 
Total number of digits
Number of digits in the
decimal part
ASCII code ((total number of
digits - 1)th digit)
A null character, 00H, is automatically stored at the end of string.
ASCII code ((total number of
digits - 3)th digit)
ASCII code ((total number of
digits - 5)th digit)
ASCII code ((total number of
digits - 7)th digit)
ASCII code (sign data)
ASCII code ((total number of
digits - 2)th digit)
ASCII code ((total number of
digits - 4)th digit)
ASCII code ((total number of
digits - 6)th digit)
Sign
Device area for the total
number of digits
16-bit binary data
5
1
-32.1

31H (1)
2EH (.)
00H
2DH (-)
32H (2)
33H (3)
b7 b0b15 b8
(d)
(d)+1
(d)+2
(s1)
(s1)+1
-123(s2)

Table of Contents

Other manuals for Mitsubishi Electric MELSEC iQ-R Series

Related product manuals