Siemens SIMATIC S7 System Manual page 366

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Program instructions
7.15 String
Example: Find string within string instruction
A string stored at VB0 is used as a command for turning a pump on or off. A string "On" is
stored at VB20 and a string "Off" is stored at VB30. The result of the find string within string
instruction is stored in AC0 (the OUT parameter). If the result is not 0, then the string 'On'
was found in the command string (VB12).
LAD
366
1. Set AC0 to 1. (AC0 is used as the
OUT parameter.)
2. Search the string at VB0 for the
string at VB20 ('On'), starting at
the first position (AC0=1).
STL
Network 1
LD I0.0
MOVB 1, AC0
SFND VB0, VB20, AC0
System Manual, V2.3, 07/2017, A5E03822230-AF
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents