1
Flexible NC Programming 04.00
1.10 Strin
o
erations
1
840D
NCU 571
840D
NCU 572
NCU 573
FM-NC 810D 840Di
ï›™
Siemens AG 2000. All rights reserved
1-46
SINUMERIK 840D/840Di/810D/FM-NC Programming Guide Advanced (PGA)
−
04.00 Edition
1.10 String operations
Overview
In addition to the classic operations "assignment" and
"comparison" described in this section, the following further
string manipulations are possible:
Explanation
Type conversion to STRING:
STRING_ERG = <<bel._Typ
1)
Result type: STRING
STRING_ERG = AXSTRING (AXIS)
Result type: STRING
Type conversion from STRING:
BOOL_ERG = ISNUMBER (STRING)
Result type: BOOL
REAL_ERG = NUMBER (STRING)
Result type: REAL
AXIS_ERG = AXNAME (STRING)
Result type: AXIS
Chaining of strings:
bel._Typ
1)
<< bel. Typ
1)
Result type: STRING
Conversion to lower/upper case:
STRING_ERG = TOUPPER (STRING)
Result type: STRING
STRING_ERG = TOLOWER (STRING)
Result type: STRING
Length of string:
INT_ERG = STRLEN (STRING)
Result type: INT
Search for character/string in string:
INT_ERG = INDEX (STRING, CHAR)
Result type: INT
INT_ERG = RINDEX (STRING, CHAR)
Result type: INT
INT_ERG = MINDEX (STRING, STRING)
Result type: INT
INT_ERG = MATCH (STRING, STRING)
Result type: INT
Selection of a substring:
STRING_ERG = SUBSTR (STRING, INT)
Result type: INT
STRING_ERG = SUBSTR (STRING, INT, INT)
Result type: INT
Selection of a single character:
CHAR_ERG = STRINGVAR [IDX]
Result type: CHAR
CHAR_ERG = STRINGFIELD [IDX_FIELD, IDX_CHAR]
Result type: CHAR
1)
"bel._Typ"
stands for variable types INT, REAL, CHAR, STRING and BOOL.