Work preparation
3.1 Flexible NC programming
Meaning
<any_type>:
<< :
For example, such a message or a command can be configured from text lists and parameters
can be inserted (for example a block name):
MSG(STRG_TAB[LOAD_IDX]<<BLOCK_NAME)
Note
The intermediate results of string concatenation must not exceed the maximum string length.
Note
The FRAME and AXIS types cannot be used together with the operator "<<".
Examples
Example 1: Concatenation of strings
Program code
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)
NO_MSG:
Example 2: Explicit type conversion with <<
Program code
DEF REAL VALUE=3.5
<<VALUE
3.1.4.4
Conversion to lower/upper case letters (TOLOWER, TOUPPER)
The "conversion to lowercase/uppercase letters" function allows all of the letters of a string to
be converted into a standard representation.
Syntax
<STRING_RES>=TOUPPER("<string>")
450
Variable, type CHAR, BOOL, INT, REAL or STRING
Operator to chain variables (<any_type>) to configure a character string (type
STRING).
This operator is also available alone as a so-called "unary" variant. This can be used
for explicit type converter to STRING (not for FRAME and AXIS):
<< <any_type>
Comment
; The specified REAL type variable is converted into a
STRING type.
Comment
; Display:
"Index:2/value:9.654"
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
NC programming