Home › M-codes › LinuxCNC Tormach › M98
M98 Fanuc style subprogram call
LinuxCNC Tormach M-code · Mill and lathe
Calls a numbered subprogram, Fanuc style. Native LinuxCNC programs use O-word CALL instead.
Verify on your machine. This entry could not be fully checked against the maker manual. Check your machine manual before you run it.
Format
M98 P [L]
Addresses
| Address | What it does |
|---|---|
P | Subprogram number |
L | Repeat count |
How it works
Non modal.
Example program
O100 SUB (NATIVE LINUXCNC SUBROUTINE)
G1 Z-0.1 F10
G0 Z0.1
O100 ENDSUB
…
G1 Z-0.1 F10
G0 Z0.1
O100 ENDSUB
…
The full 5-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Support for Fanuc style M98 depends on the LinuxCNC version. The 2.9 manual does not list it. Test before use.
- The native way is O100 SUB, O100 ENDSUB and O100 CALL.
- Tormach PathPilot may support M98. Check the PathPilot manual.
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 |
| Mach3 Mach4 | Subprogram call |
| Centroid CNC12 Acorn | Call subprogram |
| Hurco WinMax (NC) | Subprogram call |
| Fadal | Execute subprogram |
| Swiss (Citizen Star) | Subprogram call |
Every M-code for LinuxCNC Tormach 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 LinuxCNC Tormach M-codes