Home › M-codes › Centroid CNC12 Acorn › M98
M98 Call subprogram
Centroid CNC12 Acorn M-code · Mill and lathe
Calls a subprogram file Onnnn.cnc, 9100 to 9999, or a quoted file name. L is the repeat count. End the subprogram with M99.
Format
M98 P or "FILE" [L]
Addresses
| Address | What it does |
|---|---|
P | Program number 9100 to 9999 |
FILE | File name in quotes |
L | Repeat count |
How it works
One shot.
Example program
G20 G17 G40 G49 G80 G90 ; INCH, SAFE START
T1 M6 ; LOAD TOOL 1, Z GOES HOME FIRST
G54 G0 X0 Y0 ; WORK OFFSET 1
S2500 M3
…
T1 M6 ; LOAD TOOL 1, Z GOES HOME FIRST
G54 G0 X0 Y0 ; WORK OFFSET 1
S2500 M3
…
The full 9-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- A subprogram embedded in the main file between O9xxx and M99 must come before the first call.
- Up to 20 nesting levels are allowed.
Machine builders set many M codes, and they change by model and options. Check the M code list for your machine.
Related codes
M98 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Subprogram call |
| Haas NGC | Subprogram call |
| Doosan (Fanuc) | Sub program call |
| DMG Mori MAPPS (Fanuc) | Sub-program call in NC memory |
| Mazak (EIA) | EIA → EIA Subprogram call |
| Okuma OSP | Subprogram call (Lathes & Mills) |
| Mitsubishi M70 M80 | Subprogram call |
| Brother Speedio | Subprogram call |
| Heidenhain TNC (ISO) | Machine open contours completely |
| LinuxCNC Tormach | Fanuc style subprogram call |
| Mach3 Mach4 | Subprogram call |
| Hurco WinMax (NC) | Subprogram call |
| Fadal | Execute subprogram |
| Swiss (Citizen Star) | Subprogram call |
Every M-code for Centroid CNC12 Acorn 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 Centroid CNC12 Acorn M-codes