Flexible NC programming
1.2 Indirect programming
Job planning
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
55
1.2 Indirect programming
1.2.1 Indirectly programming addresses
Function
When indirectly programming addresses, the extended address (index) is replaced by a
variable with a suitable type.
Note
It is not possible the indirectly program addresses for:
• N (block number)
• L (subprogram)
• Settable addresses
(e.g. X[1] instead of X1 is not permissible)
Syntax
<ADDRESS>[<Index>]
Significance
<ADDRESS>[...]: Fixed address with extension (index)
<index>: Index variable, e.g., spindle number, axis, ....
Examples
Example 1: Indirectly programming a spindle number
Direct programming:
Program code Comments
S1=300 ; Speed in rpm for the spindle number 1.
Indirect programming:
Program code Comments
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).