Extended instructions
9.2 String and character
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
369
FIND (Find characters in a character string)
Table 9- 67 Find substring instruction
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
Search inside this string
Character position in string IN1 of the first search match
Table 9- 69 ENO status
0
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
Maximum length of IN1 or IN2 is 255 (String data type) or 65535