Int_To_Str(_E) - Mitsubishi Electric MELSEC FX Series Structured Programming Manual

Hide thumbs Also See for MELSEC FX Series:
Table of Contents

Advertisement

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
Function name
INT_TO_STR
INT_TO_STR_E
*1.
Output variable
2. Set data
Variable
EN
Input
variable
_INT (
ENO
Output
variable
*1
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
the data obtained by conversion to a device specified in
Word [signed] data
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
-123
Word [signed] data
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.
60
FX
3U(C)
Expression in each language
Structured ladder
INT_TO_STR
D0
_INT
X000
INT_TO_STR_E
EN
D0
_INT
Execution condition
Conversion source word [signed] data
)
s
Execution status
String data after conversion
(
)
d
High-order byte
ASCII code for ten-thousands place
ASCII code for hundreds place ASCII code for thousands place
ASCII code for ones place
Automatically stored at the end of the character string
High-order byte
FX
FX
FX
3G
2N(C)
1N(C)
INT_TO_STR(_INT);
Example:
Label:=
*1
Label
INT_TO_STR(D0);
INT_TO_STR_E(EN,_INT,
Output label);
ENO
Example:
*1
Label
INT_TO_STR_E(X000, D0, Label);
Description
.
d
Low-order byte
ASCII code for tens place
0000H
Low-order byte
20H (space)
31H (1)
20H (space)
33H (3)
0000H
5 Applied Functions
5.1 Type Conversion Functions
FX
FX
/FX
1S
U
2C
ST
Bit
Word [signed]
Bit
String
into string data, and outputs
s
Sign data
String
2DH (-)
String
32H (2)
FX
FX
0N
0(S)
Data type
1st word
2nd word
3rd word
4th word
1st word
2nd word
3rd word
4th word

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents