Flexible NC programming
1.10 String operations
Job planning
1-30 Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
1.10.4 Conversion to lower/upper case
Function
This functionality permits conversion of all letters of a string to standard capitalization.
Syntax
STRING_ERG = TOUPPER (STRING) Result type: STRING
STRING_ERG = TOLOWER (STRING) Result type: STRING
Semantics
All lower case letters are converted to either upper or lower case letters.
Example
Because user inputs can be initiated on the HMI, they can be given standard capitalization
(upper or lower case):
DEF STRING [29] STRG
…
IF "LEARN.CNC" == TOUPPER (STRG) GOTOF LOAD_LEARN
1.10.5 Length of the string
Function
This functionality sets the length of a string.
Syntax
INT_ERG = STRLEN (STRING) Result type: INT
Semantics
It returns a number of characters that are not the 0 character, counting from the beginning of
the string.
Example
This can be used to ascertain the end of the string, for example, in conjunction with the
single character access described below:
IF(STRLEN (MODULE_NAME) > 10) GOTOF ERROR