
PROGRAMMING
15. CUSTOM MACRO
B–63514EN/01
320
O9110;
#1=#4001;
Stores G00/G01.
#3=#4003; Stores G90/G91.
#4=#4109; Stores the cutting feedrate.
#5=#5003; Stores the Z coordinate at the start of drilling.
G00 G90 Z#18; Positioning at position R
G01 Z#26 F#9; Cutting feed to position Z
IF[#4010 EQ 98]GOTO 1; Return to position I
G00 Z#18; Positioning at position R
GOTO 2;
N1 G00 Z#5; Positioning at position I
N2 G#1 G#3 F#4; Restores modal information.
M99;
By setting a G code number used to call a macro program in a parameter,
the macro program can be called in the same way as for a simple call
(G65).
O0001 ;
:
G81 X10.0 Y20.0 Z–10.0 ;
:
M30 ;
O9010 ;
:
:
:
N9 M99 ;
Parameter No.6050 = 81
By setting a G code number from 1 to 9999 used to call a custom macro
program (O9010 to O9019) in the corresponding parameter (N0.6050 to
No.6059), the macro program can be called in the same way as with G65.
For example, when a parameter is set so that macro program O9010 can
be called with G81, a user–specific cycle created using a custom macro
can be called without modifying the machining program.
O9010
O9011
O9012
O9013
O9014
O9015
O9016
O9017
O9018
O9019
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
Program number Parameter number
As with a simple call, a number of repetitions from 1 to 9999 can be
specified at address L.
As with a simple call, two types of argument specification are available:
Argument specification I and argument specification II. The type of
argument specification is determined automatically according to the
addresses used.
D Macro program
(program called)
15.6.3
Macro Call Using
G Code
Explanations
D Correspondence
between parameter
numbers and program
numbers
D Repetition
D Argument specification