
13. Program Support Functions
13.5 User Macro Specifications
317
(2) The local variables can be used freely in that subprogram.
Main program
Subprogram (1)
Local variables set by argument
Local variable data table
The local variables
can be changed in
the subprogram.
G65 L1 A100. B50. J10. F500;
#30=FUP [#2/#5/2] ;
#5=#2/#30/2 ;
G22 H100 P#30 ;
X#1 ;
G23 ;
N100 G1 X#1 F#9 ;
Y#5 ;
X-#1 ;
Y#5 ;
G23 ;
A (#1) 100.000
B (#2) 50.000
F (#9)
500
J (#5) 10.000 8.333
(#30) 3
Example of front surface milling
To subprogram
The local variables
can be changed in
the subprogram.
J
A
B
In the front surface milling example, argument J is programmed as the milling pitch 10.mm.
However, this is changed to 8.333mm to create an equal interval pitch.
The results of the No. of reciprocation data calculation is set in local variable #30.