String Operations - Siemens SINUMERIK 840D sl Programming Manual

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

Advertisement

Flexible NC programming

1.10 String operations

1.10
String operations
1.10
Overview
Further string manipulations are provided in addition to the conventional operations
"Assignment" and "Comparison" described in this section:
Parameters
Type conversion to STRING:
STRING_ERG = <<any type
STRING_ERG = AXSTRING (AXIS)
Type conversion from STRING:
BOOL_ERG = ISNUMBER (STRING)
REAL_ERG = NUMBER (STRING)
AXIS_ERG = AXNAME (STRING)
Concatenation of strings:
any type
Conversion to lower/upper case:
STRING_ERG = TOUPPER (STRING)
STRING_ERG = TOLOWER (STRING)
Length of the string:
INT_ERG = STRLEN (STRING)
Look for character/string in the
string:
INT_ERG = INDEX (STRING, CHAR)
INT_ERG = RINDEX (STRING, CHAR)
INT_ERG = MINDEX (STRING, STRING)
INT_ERG = MATCH (STRING, STRING)
Selection of a substring:
STRING_ERG = SUBSTR (STRING, INT)
STRING_ERG = SUBSTR (STRING, INT,
INT)
Selection of a single character:
CHAR_ERG = STRINGVAR [IDX]
CHAR_ERG = STRINGARRAY [IDX_FELD,
IDX_CHAR]
1)
Special meaning of the 0 char
The 0 char is interpreted internally as end-of-string. Replacing a character by the 0 character
truncates the string.
1-26
1)
1)
<< any Type
"any type" stands for the variable types INT, REAL, CHAR, STRING, and BOOL.
1)
Result type: STRING
Result type: STRING
Result type: BOOL
Result type: REAL
Result type: AXIS
Result type: STRING
Result type: STRING
Result type: STRING
Result type: INT
Result type: INT
Result type: INT
Result type: INT
Result type: INT
Result type: INT
Result type: INT
Result type: CHAR
Result type: CHAR
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Job planning

Advertisement

Table of Contents
loading

Table of Contents