M97 Local Subprogram Call

Classic Control - Lathe Operator's Manual

The Online Interactive Operator's Manual is currently available in English only.

A PDF version of the Operator's Manual is available for download in multiple languages. Click the link below to view the Operator's Manual in your language. Click "Continue" to view the online version in English.

Get a translated PDF Download Continue

M97 Local Subprogram Call

This code calls a subprogram (subroutine) referenced by a line number (N) within the same program. A Pnn code is required and must match a line number within the same program. This is useful for subroutines within a program as it does not require a separate program. The subroutine must end with an M99. An Lnn code in the M97 block will repeat the subroutine call nn times.

% O69701 (M97 LOCAL SUBPROGRAM CALL) ; M97 P1000 L2 (L2 will run the N1000 line twice) ; M30 ; N1000 G00 G90 G55 X0 Z0 (N line that will run after M97 P1000 is run) ; S500 M03 ; G00 Z-.5 ; G01 X.5 F100. ; G03 ZI-.5 ; G01 X0 ; Z1. F50. ; G91 G28 X0 ; G28 Z0 ; G90 ; M99 ; %

Be aware: Many service and repair procedures should be done only by authorized personnel. The service technicians at your Haas Factory Outlet (HFO) have the training, experience, and are certified to do these tasks safely and correctly. You should not do machine repair or service procedures unless you are qualified and knowledgeable about the processes.

Danger: Some service procedures can be dangerous or life-threatening. DO NOT attempt a procedure that you do not completely understand. Contact your Haas Factory Outlet (HFO) and schedule a service technician visit if you have any doubts about doing a procedure.