6 - 13 6 - 13
6 IEC FUNCTIONS
6.1.11 Integer type (INT) character string type (STRING) conversion INT_TO_STR
INT_TO_STR_E
Integer type (INT) data is converted into character string type (STRING) data.
Function definition
STRING(8) INT_TO_STR ( INT S1 );
Argument
Argument Name
IN/OUT
Description
S1
IN
Data to be converted (BIN 16-bit data)
Return value
Return Value
Description
STRING (8)
Conversion result (character string data)
Remarks: This function cannot be used with the Basic model QCPU.
Example of use
Argument Type
ST Program
Conversion Result
Used Instruction
INT
w_Str1 := INT_TO_STR( D0 ); LD
SM400
BINDA D0
w_Str1
LD,BINDA
Function definition
BOOL INT_TO_STR _E( BOOL EN, INT S1, STRING(8) D1 );
Argument
Argument Name
IN/OUT
Description
EN
IN
Execution condition (Function is executed only when the result is TRUE)
S1
IN
Data to be converted (BIN 16-bit data)
D1
OUT
Conversion result (character string data)
Return value
Return Value
Description
BOOL Execution
condition
Example of use
(*
(*
When execution condition X0 turns ON, the integer type (INT) data in iData is
converted into character string type data, and the result is stored into Result.
M0 := INT_TO_STR_E( X0, iData, Result ) ;
*)
*)
Summary of Contents for MELSEC L series
Page 1: ...Programming Manual Structured Text ...
Page 2: ......
Page 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Page 297: ......