EasyManua.ls Logo

Siemens Simatic S7 Series

Siemens Simatic S7 Series
726 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...
Program instructions
7.15 String
S7-200 SMART
324 System Manual, 09/2015, A5E03822230-AC
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
STL
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).
Network 1
LD I0.0
MOVB 1, AC0
SFND VB0, VB20, AC0

Table of Contents

Other manuals for Siemens Simatic S7 Series

Related product manuals