M98 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

M98 Subprogram Call

This code is used to call a subprogram. The format is M98 Pnnnn (Pnnnn is the number of the program being called). The subprogram must be in the program list and contain M99 to return to the main program. An Lnn count can be put on the line containing M98 causing the subprogram to be called nn times before continuing to the next block.

When an M98 subprogram is called, the control looks for the subprogram on the active drive, and then in memory if the subprogram cannot be located. The active drive may be memory, USB drive, or hard drive. An alarm occurs if the control does not find the subprogram on either the active drive or in memory.

Example: This is the program that calls the subprogram to loop (4) times.

%O69801 (M98 SUBPROGRAM CALL) ;M98 P100 L4 (L4 repeats subprogram 4 times) ;M30 (End of program) ;%

This is the subprogram itself.

% O69800 (SUBPROGRAM FOR M98 EX o69801) ; G00 G90 G55 X0 Z0 ; S500 M03 ; G00 Z-.5 ; G01 X.5 F100. ; G03 ZI-.5 ; G01 X0 ; Z1. F50. ; G91 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.

Feedback