6 - 77 6 - 77
6 IEC FUNCTIONS
6.10.9 Search for character string from specified position FIND
FIND_E
The specified character string is searched for the specified character string.
Function definition
INT FIND( STRING S1, STRING S2 );
Argument
Argument Name
IN/OUT
Description
S1
IN
Character string to be searched (character string data)
S2
IN
Character string to be searched for (character string data)
Return value
Return Value
Description
INT
Position where character string is found first (BIN 16-bit data)
Remarks: This function cannot be used with the Basic model QCPU.
If the character string is not found, the return value turns to 0.
Example of use
Argument Type
ST Program
Conversion Result
Used Instruction
STRING w_Word1:=
FIND(w_Str1,w_Str2);
LD SM400
INSTR w_Str2 w_Str1
w_Word1
K1
LD,INSTR
Function definition
BOOL FIND_E( BOOL EN, STRING S1, STRING S2, INT D1 );
Argument
Argument Name
IN/OUT
Description
EN
IN
Execution condition (Function is executed only when the result is TRUE)
S1
IN
Character string to be searched (character string data)
S2
IN
Character string to be searched for (character string data)
D1
OUT
Position where character string is found first (BIN 16-bit data)
Remarks: If the character string is not found, the return value turns to 0.
Return value
Return Value
Description
BOOL Execution
condition
Example of use
(*
(*
(*
When execution condition X0 turns ON, the character string data in sData1 is
searched for the character string data in sData2, and the position where the
character string is found first is stored into Result.
M0 := FIND_E( X0, sData1, sData2, Result ) ;
*)
*)
*)
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......