Determine Length Of String (Strlen); Search For Character/String In The String (Index, Rindex, Mindex, Match) - Siemens SINUMERIK 840D sl Programming Manual

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

Advertisement

1.9.5

Determine length of string (STRLEN)

Function
The
Syntax
<INT_ERG>=STRLEN("<STRING>")
Meaning
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
1.9.6

Search for character/string in the string (INDEX, RINDEX, MINDEX, MATCH)

Function
This functionality searches for single characters or a string within a string. The function
results specify where the character/string is positioned in the string that has been searched.
Syntax
INT_ERG=INDEX(STRING,CHAR)
INT_ERG=RINDEX(STRING,CHAR)
INT_ERG=MINDEX(STRING,STRING)
INT_ERG=MATCH(STRING,STRING)
Job Planning
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
command can be used to determine the length of a character string.
STRLEN
:
The
STRLEN
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
command determines the length of the specified character
; Result type: INT
; Result type: INT
; Result type: INT
; Result type: INT
Flexible NC programming
1.9 String operations
83

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents