Indirect programming:
Program code Comment
DEF AXIS AXVAR1 AXVAR2 ; Defining two type AXIS variables.
AXVAR1=(X1) AXVAR2=(X2) ; Assigning the axis names.
AX[AXVAR1]=100 AX[AXVAR2]=200 ; Traversing the axes whose address names are
saved in the variables with the names AXVAR1
and AXVAR2
Example 5: Indirectly programming an axis
Direct programming:
Program code
G2 X100 I20
Indirect programming:
Program code Comment
DEF AXIS AXVAR1=X ; Defining a variable, type AXIS and value assignment.
G2 X100 IP[AXVAR1]=20 ; Indirect programming the center point data for the axis,
whose address name is saved in the variable with the name
AXVAR1.
Example 6: Indirectly programming array elements
Direct programming:
Program code Comment
DEF INT ARRAY1[4,5] ; Defining array 1
Indirect programming:
Program code Comment
DEFINE DIM1 AS 4 ; For array dimensions, array sizes must be specified as
fixed values.
DEFINE DIM2 AS 5
DEF INT ARRAY[DIM1,DIM2]
ARRAY[DIM1-1,DIM2-1]=5
Example 7: Indirect subprogram call
Program code Comment
CALL "L" << R10 ; Call the program, whose number is located in R10 (string
cascading).
3.1.2.2 Indirectly programming G commands
Indirectly programming G commands (Page 1247) permits cycles to be effectively programmed.
Work preparation
3.1 Flexible NC programming
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0 435