Find (Find Characters In A Character String) Instruction - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

8.2.4.8

FIND (Find characters in a character string) instruction

Table 8- 67
Find substring instruction
LAD / FBD
SCL
out := FIND(
Table 8- 68
Data types for the parameters
Parameter and type
IN1
IN
IN2
IN
OUT
OUT
Table 8- 69
ENO status
ENO
Condition
1
No errors detected
0
IN2 is larger than IN1
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
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
in1:=_string_in_,
in2:=_string_in);
Data type
String
String
Int
Description
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.
Description
Search inside this string
Search for this string
Character position in string IN1 of the first search match
Extended instructions
8.2 String and character
OUT
Valid character position
Character position is set to 0
313

Advertisement

Table of Contents
loading

Table of Contents