Siemens SIMATIC S7-200 System Manual page 201

Programmable controller
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

Find String Within String
The Find String Within String instruction (SFND) searches
for the first occurrence of the string IN2 within the string IN1.
The search begins at the starting position specified by OUT
(which must be in range 1 through the string length). If a
sequence of characters is found that matches exactly the
string IN2, the position of the first character in the sequence
for the string is written to OUT. If the string IN2 was not found
in the string IN1, the instruction OUT is set to 0.
Error conditions that set ENO = 0
H 0006 (indirect address)
H 0091 (range error)
H 009B (index=0)
Find First Character Within String
The Find First Character Within String instruction (CFND)
searches the string IN1 for the first occurrence of any
character from the character set described in the string IN2.
The search begins at starting position OUT (which must be
in range 1 through the string length). If a matching character
is found, the position of the character is written to OUT. If no
matching character is found, OUT is set to 0.
Error conditions that set ENO = 0
H 0006 (indirect address)
H 0091 (range error)
H 009B (index=0)
Table 6-67
Valid Operands for Find String Within String and Find First Character Within String
Instructions
Inputs/Outputs
Data Types
IN1, IN2
STRING
OUT
BYTE
Operands
VB, LB, *VD, *LD, *AC, Constant String
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC
S7-200 Instruction Set
Chapter 6
187

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents