Flexible NC programming
1.9 String operations
Job planning
74 Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
1.9 String operations
Sting operations
In addition to the classic operations "assign" and "comparison" the following string
operations are possible:
● Type conversion to STRING (AXSTRING)
● Type conversion from STRING (NUMBER, ISNUMBER, AXNAME)
● Concatenation of strings (<<)
● Conversion to lowercase/uppercase letters (TOLOWER, TOUPPER)
● Define string length (STRLEN)
● Search for character/string in a string (INDEX, RINDEX, MINDEX, MATCH)
● Select a partial string (SUBSTR)
● Select an individual character (STRINGVAR, STRINGFELD)
Special significance of the 0 character
Internally, the 0 character is interpreted as the end identifier of a string. If a character is
replaced with the 0 character, the string is truncated.
Example:
Program code Comments
DEF STRING[20] STRG="axis . stationary"
STRG[6]="X"
MSG(STRG) ; Supplies the message "axis X
stationary".
STRG[6]=0
MSG(STRG) ; Supplies the message "axis".