CNC Machinist Calculator Ultra

Home › M-codes › Mach3 Mach4 › M98

M98 Subprogram call

Mach3 Mach4 M-code · Mill

Jumps to the block with the given O number, runs it and comes back at M99. Mach4 also looks in the Subroutines folder. Mach3 can also call a file by name.

Format

M98 P [Q] [L] or M98 (FILE NAME) [L]

Addresses

AddressWhat it does
PO number of the subprogram
LRepeat count, default 1
QMach4 start sequence number in the sub, Mach3 another repeat word
(FILE NAME)Mach3 only, a separate file in parentheses

How it works

Non modal.

Example program

(MAIN PROGRAM)
G0 G20 G90 G54 G17 G40 G49 G80 (SAFE START, INCH)
T1 M6 (TOOL CHANGE)
S6000 M3 (SPINDLE ON)
…

The full 10-line example is in the app. Example is in inch. Check offsets and clearances first.

Watch out for

Related codes

M99 · G65 · G52

M98 on other controls

The same number can mean something different on another control.

ControlMeaning
FanucSubprogram call
Haas NGCSubprogram call
Doosan (Fanuc)Sub program call
DMG Mori MAPPS (Fanuc)Sub-program call in NC memory
Mazak (EIA)EIA → EIA Subprogram call
Okuma OSPSubprogram call (Lathes & Mills)
Mitsubishi M70 M80Subprogram call
Brother SpeedioSubprogram call
Heidenhain TNC (ISO)Machine open contours completely
LinuxCNC TormachFanuc style subprogram call
Centroid CNC12 AcornCall subprogram
Hurco WinMax (NC)Subprogram call
FadalExecute subprogram
Swiss (Citizen Star)Subprogram call

Every M-code for Mach3 Mach4 in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.

Open M98 in the app All Mach3 Mach4 M-codes

App Store Google Play