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-50
SINUMERIK 840D/840Di/810D/FM-NC Programming Guide Advanced (PGA)
−
04.00 Edition
The intermediate results of a string chaining must
not exceed the maximum string length.
Programming examples
DEF INT IDX = 2
DEF REAL VALUE = 9.654
DEF STRING[20]STRG = "INDEX:2"
IF STRG == "Index:" <<IDX GOTOF NO_MSG
MSG ("Index:" <<IDX <<"/Value:"
<<VALUE)
;Display: "Index: 2/value: 9.654"
NO_MSG:
1.10.3 Conversion to lower/upper case
This functionality can be used to convert all letters in
a string to a uniform case.
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
case or lower case letters.
Example:
Since user inputs can also be activated on the MMC, it
is possible to achieve uniform representation of text
(i.e. upper case or lower case):
DEF STRING [29] STRG
…
IF "LEARN.CNC" == TOUPPER (STRG) GOTOF LOAD_LEARN