Examples
Example 1: Indirectly programming a spindle number
Direct programming:
Program code Comment
S1=300 ; Speed 300 rpm for the spindle number 1.
Indirect programming:
Program code Comment
DEF INT SPINU=1 ; Defining variables, type INT and value assignment.
S[SPINU]=300 ; Speed 300 rpm for the spindle, whose number is saved in
the SPINU variable (in this example 1, the spindle with the
number 1).
Example 2: Indirectly programming an axis
Direct programming:
Program code Comment
FA[U]=300 ; Feedrate 300 for axis "U".
Indirect programming:
Program code Comment
DEF AXIS AXVAR2=U ; Defining a variable, type AXIS and value assignment.
FA[AXVAR2]=300 ; Feedrate of 300 for the axis whose address name is saved
in the variables with the name AXVAR2.
Example 3: Indirectly programming an axis
Direct programming:
Program code Comment
$AA_MM[X] ; Read probe measured value (MCS) of axis "X".
Indirect programming:
Program code Comment
DEF AXIS AXVAR3=X ; Defining a variable, type AXIS and value assignment.
$AA_MM[AXVAR3] ; Read probe measured value (MCS) whose name is saved in
the variables AXVAR3.
Example 4: Indirectly programming an axis
Direct programming:
Program code
X1=100 X2=200
Work preparation
3.1 Flexible NC programming
NC programming
434 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0