Siemens SIMATIC S7-200 System Manual page 200

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

Advertisement

S7-200 Programmable Controller System Manual
Copy Substring from String
The Copy Substring from String instruction (SSCPY) copies
the specified number of characters N from the
string specified by IN, starting at the index INDX, to a new
string specified by OUT.
Error conditions that set ENO = 0
H 0006 (indirect address)
H 0091 (range error)
H 009B (index=0)
Table 6-66
Valid Operands for the Copy Substring from String Instructions
Inputs/Outputs
IN
OUT
INDX, N
Example: Copy Substring Instruction
Before executing the program
VB0
11
'H'
After executing the program
VB20
5
'W'
186
Data Types
Operands
STRING
VB, LB, *VD, *LD, *AC, Constant String
STRING
VB, LB, *VD, *LD, *AC
BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Constant
Network 1
LD
SSCPY
'E'
'L'
'L'
'O'
' '
VB25
'O'
'R'
'L'
'D'
//Starting at the seventh character in
//the string at VB0, copy 5 characters
//to a new string at VB20
I0.0
VB0, 7, 5, VB20
VB11
'W'
'O'
'R'
'L'
'D'

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents