6 - 69 6 - 69
6 IEC FUNCTIONS
6.10 Character String Functions
6.10.1 Character string length acquisition LEN
LEN_E
The character string length of the specified character string data is acquired.
Function definition
INT LEN ( STRING S1 );
Argument
Argument Name
IN/OUT
Description
S1
IN
Data whose character string length will be acquired (character string
data)
Return value
Return Value
Description
INT
Character string length result (BIN 16-bit data)
Remarks: This function cannot be used with the Basic model QCPU.
Example of use
Argument Type
ST Program
Conversion Result
Used Instruction
STRING
i_data1 := LEN( s_ary1 );
LD
SM400
LEN s_ary1
i_data1
LD,LEN
Function definition
BOOL LEN_E( BOOL EN, STRING S1, INT D1 );
Argument
Argument Name
IN/OUT
Description
EN
IN
Execution condition (Function is executed only when the result is TRUE)
S1
IN
Data whose character string length will be acquired (character string
data)
D1
OUT
Character string length result (BIN 16-bit data)
Return value
Return Value
Description
BOOL Execution
condition
Example of use
(*
(*
When execution condition X0 turns ON, the length of the character string
stored in sData1 is acquired and stored into Result.
M0 := LEN_E( X0, sData, Result ) ;
*)
*)
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......