
Program instructions
7.15 String
S7-200 SMART
362
System Manual, V2.3, 07/2017, A5E03822230-AF
7.15
String
7.15.1
String (Get length, copy, and concatenate)
SLEN (String length)
LAD / FBD
STL
Description
SLEN IN, OUT
The string length instruction returns the length in bytes of the string specified by
IN.
Note: Because Chinese characters are not represented by a single byte, the
STR_LEN function does not return the number of characters in a string contain-
ing Chinese characters.
Error conditions with ENO = 0
SM bits affected
•
0006H Indirect address
•
0091H Operand out of range
None
Input / output
Data type
Operand
IN
STRING
VB, LB, *VD, *LD, *AC, Constant string
OUT
BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC
SCPY and SCAT (String copy and string concatenate)
LAD / FBD
STL
Description
SCPY IN, OUT
The copy string instruction copies the string assigned by IN to the string as-
signed by OUT.
SCAT IN, OUT
The concatenate string instruction appends the string assigned by IN to the
end of the string assigned by OUT.
Note: The STR_CPY and STR_CAT instructions operate on bytes and not characters. Because Chinese characters are not
represented by a single byte, unexpected results can occur with the STR_CPY and STR_CAT instructions with strings
containing Chinese characters. If you know the number of bytes that a character string occupies, you can use the
STR_CPY and STR_CAT instructions with the correct number of bytes.
Содержание SIMATIC S7-200
Страница 30: ...Product overview 1 7 Programming software S7 200 SMART 30 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 267: ...Program instructions 7 6 Counters S7 200 SMART System Manual V2 3 07 2017 A5E03822230 AF 267 HSC modes 3 and 4 ...
Страница 394: ...Program instructions 7 18 Subroutine S7 200 SMART 394 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 425: ...Communication 8 5 PROFIBUS S7 200 SMART System Manual V2 3 07 2017 A5E03822230 AF 425 ...
Страница 786: ...Technical specifications A 11 S7 200 SMART cables S7 200 SMART 786 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 798: ...Error codes C 4 PLC fatal error codes S7 200 SMART 798 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 848: ...Ordering information F 6 Human Machine Interface devices S7 200 SMART 848 System Manual V2 3 07 2017 A5E03822230 AF ...