Flexible NC programming
1.2 Indirect programming
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>[...]:
<index>:
Examples
Example 1: Indirectly programming a spindle number
Direct programming:
Program code
S1=300
Indirect programming:
Program code
DEF INT SPINU=1
S[SPINU]=300
56
Fixed address with extension (index)
Index variable, e.g., spindle number, axis, ....
Comments
; Speed in rpm for the spindle number 1.
Comments
; Defining variables, type INT and value assignment.
; Speed 300 rpm for the spindle, whose number is saved in the
SPINU variable (in this example 1, the spindle with the
number 1).
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Job planning