13. Program Support Functions
(2) The local variables can be used freely in that subprogram.
Main program
G65 L1 A100. B50. J10. F500;
Example of front surface milling
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.
To subprogram
J
A
317
13.5 User Macro Specifications
Subprogram (1)
#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 ;
Local variables set by argument
Local variable data table
A (#1) 100.000
B (#2)
50.000
F (#9)
500
J (#5)
10.000
(#30)
The local variables
can be changed in
the subprogram.
The local variables
can be changed in
the subprogram.
8.333
3