13. Program Support Functions
13.5 User Macro Specifications
365
13.5.10 Actual Examples of Using User Macros
The following three examples will be described.
(Example 1)
SIN curve
(Example 2)
Bolt hole circle
(Example 3)
Grid
(Example 1) SIN curve
G65 Ll1 Aa1 Bb1 Cc1 Ff1 ;
a1 ; Initial value 0
°
b1 ; Final value 360
°
c1 ; R of %
∗
SIN
θ
f1 ; Feedrate
(SIN
θ
) Y
X
100.
-100.
0
90.
270.
360.
180.
Local variable
set by argument
To
subprogram
(Note 1)
Commanding with one block is possible when
G90G01X#1Y [#3
∗
SIN [#1]] F#9 ; is issued.
G65L9910A0B360.C100.F100;
#1=0
#2=360.000
#3=100.000
#9=100.000
WHILE [#1LE#2] DO1;
#101=#3
∗
SIN [#1] ;
G90G01X#1Y#10F#9;
#1=#1+10.;
END1;
G23;
~~
Main program
L9910 (Subprogram)
(Note 1)