M98 Subprogram Call

Next Generation Control Mill 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
P - The subprogram number to run
L - Repeats the subprogram call (1-99) times.
() - The Subprogram’s directory path

M98 calls a subprogram in the format M98 Pnnnn, where Pnnnn is the number of the program to call, or M98 (/Onnnnn), where is the device path that leads to the subprogram.

The subprogram must contain an M99 to return to the main program. You can add an Lnn count to the M98 block M98 to call the subprogram nn times before continuing to the next block.

When your program calls an M98 subprogram, the control looks for the subprogram in the main program’s directory. If the control cannot find the subprogram, it then looks in the location specified in Setting 251. Refer to page 5 for more information. An alarm occurs if the control cannot find the subprogram.

When your program calls an M98 subprogram, the control looks for the subprogram in the main program’s directory. If the control cannot find the subprogram, it then looks in the location specified in Setting 251. Refer to page 5 for more information. An alarm occurs if the control cannot find the subprogram.

M98 Example:

The subprogram is a separate program (O00100) from the main program (O00002).

% O00002 (PROGRAM NUMBER CALL); M98 P100 L4 (CALLS O00100 SUB 4 TIMES) ; M30 ; % % O00100 (SUBPROGRAM); M00 ; M99 (RETURN TO MAIN PROGRAM) ; %
% O00002 (PATH CALL); M98 (USB0/O00001.nc) L4 (CALLS O00100 SUB 4 TIMES) ; M30 ; % % O00100 (SUBPROGRAM); M00 ; M99 (RETURN TO MAIN PROGRAM) ; %

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