Mitsubishi Electronics FXCPU Welding System User Manual


 
5 Applied Functions
5.1 Type Conversion Functions
60
FXCPU Structured Programming Manual
(Application Functions)
5.1.13 INT_TO_STR(_E)
Outline
This function converts word [signed] data into string data, and outputs the data obtained by conversion.
1. Format
*1. Output variable
2. Set data
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
1) This function converts word [signed] data stored in a device specified in into string data, and outputs
the data obtained by conversion to a device specified in .
2) In "Sign data", "20H (space)" is stored when the input value is positive, and "2DH (-)" is stored when the
input value is negative.
3) "20H (space)" is stored in high-order digits when the number of significant figures is small.
Example: When "-123" is input
4) "00H" is automatically stored at the end (4th word) of the character string.
Cautions
1) Use the function having "_E" in its name to connect a bus.
2) When handling string data in structured programs, you cannot specify 16-bit devices directly, different
from simple projects. Use labels when handling string data.
Use global labels when specifying labels.
FX3U(C) FX3G FX2N(C) FX1N(C) FX1S
FX
U
/FX
2C
FX0N FX0(S)
Function name
Expression in each language
Structured ladder ST
INT_TO_STR
INT_TO_STR(_INT);
Example:
Label:=
INT_TO_STR(D0);
INT_TO_STR_E
INT_TO_STR_E(EN,_INT,
Output label);
Example:
INT_TO_STR_E(X000, D0, Label);
Variable Description Data type
Input
variable
EN Execution condition Bit
_INT ( )
Conversion source word [signed] data Word [signed]
Output
variable
ENO Execution status Bit
*1 ( )
String data after conversion String
INT_TO_STR
_INT *1
LabelD0
INT_TO_STR_E
EN ENO
*1
Label
X000
D0
_INT
s
d
s
d
Word [signed] data
ASCII code for ten-thousands place
High-order byte
ASCII code for hundreds place
ASCII code for thousands place
ASCII code for tens place
ASCII code for ones place
Sign data
Low-order byte
0000H
Automatically stored at the end of the character string
String
1st word
2nd word
3rd word
4th word
String
1st word
2nd word
3rd word
4th word
Word [signed] data
20H (space)
High-order byte
31H (1) 20H (space)
32H (2)
33H (3)
2DH (-)
Low-order byte
0000H
-123