Determine Length Of String (Strlen) - Siemens Sinumerik 840D sl Programming Manual

Job planning
Hide thumbs Also See for Sinumerik 840D sl:
Table of Contents

Advertisement

Flexible NC programming
1.9 String operations
Example
Because user inputs can be initiated on the operator interface, they can be given standard
capitalization (upper or lower case):
Program code
DEF STRING [29] STRG
...
IF "LEARN.CNC"==TOUPPER(STRG) GOTOF LOAD_LEARN
1.9.5

Determine length of string (STRLEN)

Function
The STRLEN command can be used to determine the length of a character string.
Syntax
<INT_ERG>=STRLEN("<STRING>")
Significance
STRLEN:
<string>:
<INT_ERG>:
Example
In conjunction with the single character access, this function allows the end of a character
string to be determined:
Program code
IF (STRLEN(BAUSTEIN_NAME)>10) GOTOF ERROR
80
The STRLEN command determines the length of the specified character
string.
The number of characters that are not the 0 character, counting from the
beginning of the string is returned.
Character string whose length is to be determined
Type:
STRING
Variable for the result of the determination
Type:
INT
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Job planning

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents