Home › M-codes › Siemens 808D ISO › M98
M98 Subprogram call
Siemens 808D ISO M-code · Mill, Lathe
On mills: Subprogram call
Calls a subprogram from memory. P holds the repeat count and the 4 digit program number, or the number with L for repeats.
Format
Addresses
| Address | What it does |
|---|---|
P | Up to 4 digit repeat count then 4 digit program number |
L | Repeat count |
How it works
Non-modal.
Example program
M98 P30021 (RUN 0021 THREE TIMES)
M98 P123 L2 (RUN 0123 TWICE)
M30 (END)
Example is in inch. Check offsets and clearances first.
Watch out for
- Name subprograms with 4 digits. M98 P20012 runs 0012 twice; M98 P123 L2 runs 0123 twice.
- With MD20734 bit 6 set, P takes up to 8 digits and repeats must use L. That is not compatible with standard ISO.
- Up to 16 levels of nesting. M98 cannot pass arguments; use G65 for that.
On lathes: Subprogram call
Calls a subprogram from memory. P holds the program number and, in front of it, the repeat count, or the count goes in L. The subprogram ends with M99.
Format
Addresses
| Address | What it does |
|---|---|
P | Up to 4 digits repeat count then 4 digits program number |
L | Repeat count, as an alternative to packing it in P |
How it works
Non-modal.
Example program
M98 P30021 (RUN 0021 THREE TIMES)
G00 X150.0 Z100.0 (RETRACT)
Example is in inch. Check offsets and clearances first.
Watch out for
- Name the subprogram with 4 digits, padded with zeros. M98 P20012 runs 0012 twice.
- With MD20734 bit 6 = 1 the program number can have 8 digits, no zeros are added, and the count must go in L. Not compatible with the ISO original.
- Up to 16 levels of nesting. M98 has no arguments; use G65 to pass values.
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 |
| Centroid CNC12 Acorn | Call subprogram |
| Hurco WinMax (NC) | Subprogram call |
| Fadal | Execute subprogram |
| Swiss (Citizen Star) | Subprogram call |
Every M-code for Siemens 808D ISO 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 Siemens 808D ISO M-codes