Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 665

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

Advertisement

Processing details
• These instructions add a decimal point to the 32-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.
(s1)
Total number of digits
Number of digits in the
(s1)+1
decimal part
(s2)+1
(s2)
b31
∙∙∙
b16 b15
∙∙∙
Upper 16 bits
Lower 16 bits
32-bit binary data
Ex.
When converting data "-654321" in (s2) into a string assuming that the number of decimal places is three ("-654.321")
-
6
5
4
.
3
2
(d)
(d)+1
(d)+2
(d)+3
(d)+4
• The total number of digits that can be specified by (s1) is 2 to 13.
• The number of digits in the decimal part that can be specified by (s1)+1 is 0 to 10. Note that the number of digits in the
decimal part must be smaller than the total number of digits minus 3.
.
Sign
b0
(s1)
8
(s1)+1
3
(s2)+1
b31
∙∙∙
1
b15
∙∙∙
b8
b7
∙∙∙
b0
36H (6)
2DH (-)
34H (4)
35H (5)
33H (3)
2EH (.)
31H (1)
32H (2)
00H
b15
b8 b7
∙∙∙
ASCII code ((total number of
(d)
ASCII code (sign data)
digits - 1)th digit)
ASCII code ((total number of
ASCII code ((total number of
(d)+1
digits - 3)th digit)
digits - 2)th digit)
ASCII code ((total number of
ASCII code ((total number of
(d)+2
digits - 5)th digit)
digits - 4)th digit)
ASCII code ((total number of
ASCII code ((total number of
(d)+3
digits - 7)th digit)
digits - 6)th digit)
ASCII code ((total number of
ASCII code ((total number of
(d)+4
digits - 9)th digit)
digits - 8)th digit)
ASCII code ((total number of
ASCII code ((total number of
(d)+5
digits - 11)th digit)
digits - 10)th digit)
ASCII code ((total number of
(d)+6
00H
digits - 12)th digit)
A null character, 00H, is automatically stored at the end of string.
(s2)
b16
b15
∙∙∙
-654321
BIN32
7 APPLICATION INSTRUCTIONS
7.8 String Processing Instructions
b0
∙∙∙
Device area for
the total number
of digits
b0
663
7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents