Converting Int To String - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

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

Advertisement

25.27

Converting INT to STRING

INT_TO_STRING(_E)
RnPCPU
RnCPU RnENCPU
(Process)
These functions convert a value from INT data type to STRING data type.
Ladder, FBD/LD
[Without EN/ENO]
s
d
Setting data
■Description, type, data type
Argument
EN
s (IN)
ENO
d
Processing details
■Operation processing
• These functions convert the value input to (s) from INT data type to STRING data type, and output the converted value from
(d).
(s)
INT
• Input an INT 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 -123 is input
(s)
-123
• When SM701 (Number of output characters selection) is off, 00H is stored at the end of the string (4th word).
25 TYPE CONVERSION FUNCTIONS
1824
25.27 Converting INT to STRING
RnPCPU
RnSFCPU RnSFCPU
(Redundant)
(Standard)
(Safety)
[With EN/ENO]
EN
ENO
s
Description
Execution condition (TRUE: Executed, FALSE: Not executed)
Input
Output status (TRUE: Normal, FALSE: Abnormal)
Output
Upper byte
ASCII code (ten-thousands place)
ASCII code (hundreds place)
ASCII code (ones place)
Upper byte
20H
31H(1)
33H(3)
Structured text
[Without EN/ENO]
d:=INT_TO_STRING(s);
[With EN/ENO]
d:=INT_TO_STRING_E(EN,ENO,s);
d
(d)
00H
STRING
When SM701 is off, 00H is stored.
(d)
00H
Type
Input variable
Input variable
Output variable
Output variable
Lower byte
ASCII code (sign data)
ASCII code (thousands place)
ASCII code (tens place)
Lower byte
2DH(-)
20H
32H(2)
Data type
BOOL
INT
BOOL
STRING(6)
+0
+1
+2
+3
+0
+1
+2
+3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents