Fanuc Series 15i/150i-MA (Programming) Operators Manual

B-63324EN/03 PROGRAMMING 17.CUSTOM MACRO
- 651 -
- Program that calls a macro program
O0001;
T01 M06;
M03;
:
M05;.................................... Changes #501.
T02 M06;
M03;
:
M05;.................................... Changes #502.
T03 M06;
M03;
:
M05;.................................... Changes #503.
T04 M06;
M03;
:
M05; .................................... Changes #504.
T05 M06;
M03;
:
M05;.................................... Changes #505.
M30;
Macro program (program called)
O9001(M03); Macro to start counting
M01;
IF[#4120 EQ 0]GOTO 9;............No tool specified
IF[#4120 GT 5]GOTO 9;............Out-of-range tool number
#3002=0;....................................Clears the timer.
N9 M03; Rotates the spindle in the forward direction
M99;
O9002(M05); ....................................Macro to end counting
M01;
IF[#4120 EQ 0]GOTO 9;............No tool specified
IF[#4120 GT 5]GOTO 9;............Out-of-range tool number
#[500+#4120]=#3002+#[500+#4120]; Calculates
cumulative time.
N9 M05; ....................................Stops the spindle.
M99;

Leave a Reply

Your email address will not be published. Required fields are marked *