1038
25 CHARACTER STRING FUNCTIONS
25.8 Searching Character String
25.8
Searching Character String
FIND(_E)
These functions search for a character string and output the result.
Setting data
■
Descriptions, types, and data types
Processing details
■
Operation processing
• These functions search for a character string input to (s2) from the start of the character string input to (s1) and output the
result from (d).
• This function outputs the head character position of the searched character string detected first as the search result.
• If a character string specified by (s2) cannot be searched from the one specified by (s1), these functions output "0".
• A value input to (s1) and (s2) is the STRING type data value and within the range from 0 to 255 byte(s).
Ladder diagram, FBD/LD
Structured text
[Without EN/ENO]
[With EN/ENO]
[Without EN/ENO]
d:=FIND(s1,s2);
[With EN/ENO]
d:=FIND_E(EN,ENO,s1,s2);
Argument
Description
Type
Data type
EN
Execution condition (TRUE: Execution, FALSE: Stop)
Input variable
BOOL
s1(IN1), s2(IN2)
Input
Input variable
STRING(255)
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
Output variable
BOOL
d(FIND(_E))
Output
Output variable
INT
s1
d
s2
EN
ENO
d
s1
s2
"ABCD1234567"
32H (2)
31H (1)
34H (4)
33H (3)
00H
High-order byte Low-order byte
"1234"
+1
+2
+0
42H (B)
41H (A)
44H (D)
43H (C)
32H (2)
31H (1)
34H (4)
33H (3)
36H (6)
35H (5)
00H
37H (7)
High-order byte Low-order byte
+1
+2
+3
+4
+5
+0
IN2
IN1
(d)
INT
5
Search of
character string
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......