25 TYPE CONVERSION FUNCTIONS
25.36 Converting DINT to STRING
1837
25
Processing details
■
Operation processing
• These functions convert the value input to (s) from DINT data type to STRING data type, and output the converted value
from (d).
• Input a DINT data type value to (s).
• As sign data, 20H (space) is stored if the input value is positive, and 2DH (-) is stored if the value is negative.
• If the number of digits in the input value is less than the number of significant digits, 20H (space) is stored for the upper
digit(s).
Ex.
When the value -123456 is input
• When SM701 (Number of output characters selection) is off, 00H is stored at the end of the string (upper bytes of the 6th
word).
■
Operation result
1.
Function without EN/ENO
The operation processing is performed. The operation result is output from (d).
2.
Function with EN/ENO
The execution conditions and operation results will be as follows.
*1 If the value FALSE is output from ENO, the output data from (d) will be undefined. Create a program so that the undefined value will not
be used in operations.
Operation error
There is no operation error.
Execution condition
Operation result
EN
ENO
(d)
TRUE (executed)
TRUE
Operation result output value
FALSE (not executed)
FALSE
Undefined value
(s)
(d)
00H
+0
+3
+4
+5
+2
+1
STRING
DINT
When SM701 is off, 00H is stored.
Lower byte
Upper byte
ASCII code (sign data)
ASCII code
(ten-thousands place)
ASCII code (tens place)
ASCII code (ones place)
ASCII code
(thousands place)
ASCII code (millions place)
ASCII code
(hundred-thousands place)
ASCII code
(hundred-millions place)
ASCII code
(ten-millions place)
ASCII code (billions place)
ASCII code (hundreds place)
(s)
(d)
00H
32H(2)
33H(3)
34H(4)
36H(6)
35H(5)
-123456
31H(1)
2DH(-)
+0
+3
+4
+5
+2
+1
20H
20H
20H
20H
Lower byte
Upper byte
Summary of Contents for MELSEC iQ-R Series
Page 1: ...MELSEC iQ R Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 24: ...22 INDEX 2092 INSTRUCTION INDEX 2093 REVISIONS 2104 WARRANTY 2105 TRADEMARKS 2106 ...
Page 34: ...32 MEMO ...
Page 35: ...33 PART 1 PART 1 OVERVIEW This part consists of the following chapter 1 OVERVIEW ...
Page 68: ...66 1 OVERVIEW 1 5 Precautions on Programming MEMO ...
Page 1448: ...1446 14 REDUNDANT SYSTEM INSTRUCTIONS 14 2 Disabling Enabling System Switching MEMO ...
Page 1972: ...1970 33 TIME DATA TYPE FUNCTIONS 33 4 Division MEMO ...
Page 2067: ...APPX Appendix 5 PID Control Program Examples 2065 A 252 Set PID control data for loop 2 ...
Page 2109: ......