EasyManua.ls Logo

Siemens SIMATIC S7-1200

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Extended instructions
9.2 String and character
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
369
9.2.4.8
FIND (Find characters in a character string)
Table 9- 67 Find substring instruction
LAD / FBD
SCL
Description
out := FIND(
in1:=_string_in_,
in2:=_string_in);
Provides the character position of the substring specified by IN2 within
the string IN1. The search starts on the left. The character position of
the first occurrence of IN2 string is returned at OUT. If the string IN2 is
not found in the string IN1, then zero is returned.
Table 9- 68 Data types for the parameters
Parameter and type
Data type
Description
IN1
IN
String, WString
Search inside this string
IN2
IN
String, WString
Search for this string
OUT
OUT
Int
Character position in string IN1 of the first search match
Table 9- 69 ENO status
ENO
Condition
OUT
1
No errors detected
Valid character position
0
IN2 is larger than IN1
Character position is set to 0
Current length of IN1 exceeds maximum length of IN1, or current length
of IN2 exceeds maximum length of IN2 (invalid string)
Maximum length of IN1 or IN2 does not fit within allocated memory
range
Maximum length of IN1 or IN2 is 255 (String data type) or 65535
(WString data type)

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals