Conversion To Lower/Upper Case; Length Of The String - 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.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)
STRING_ERG = TOLOWER (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)
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
1-30
Result type: STRING
Result type: STRING
Result type: INT
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Job planning

Advertisement

Table of Contents
loading

Table of Contents