
PROGRAMMING
B–63664EN/02
13. CUSTOM MACRO
263
S Because system variable #3002 is used as the timer for time
measurement, the time during which the cycle start lamp is lit is
measured. However, the stop time due to single–block operation and
feed hold is excluded.
Set 15 for parameter No. 6080.
Set ”0” for variables #501 to #503.
M15 Aa Bb;
A: Assist gas type (#1). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B: Flow pattern (#2). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
O0001;
M15 A1 B1; Selects assist gas type 1 and flow pattern 1.. .
. . . .
M15 A2 B1; Se
lects assist gas type 2 and flow pattern 1.. .
. . . .
M15 A3 B1; Selects assist gas type 3 and flow pattern 1.. .
. . . .
M15 A0; D
eselects the assist gas.. . . .
. . . .
M30;
O9020;
IF [#100 EQ 0] GOTO 10;
IF [#100 GT 3] GOTO 10;
# [500 + #100] = #3002 + # [500 + #100];
Updates the time that the assist gas is used.. . . . . . . . . . . . . . . . . . . . . . .
N10 #100 = #1;
#3002 = 0;
IF [#1 EQ 0] GOTO 15; Checks the selected assist gas type.. .
IF [#1 EQ 3] GOTO 15;
IF [#2 EQ 0] GOTO 15; Checks the selected flow pattern.. .
IF [#2 EQ 3] GOTO 15;
G32 P#1 Q#2; Selects the assist gas.. . . . . . . . . . .
M99;
M15 G32 P0; aa Stops the assist gas.. . . . . . . . .
M99;
D Parameter specification
D Variable value setting
D Calling format
D Program that calls a
macro program
D Macro program (program
called)