Home › M-codes › Hurco WinMax (NC) › M98
M98 Subprogram call
Hurco WinMax (NC) M-code · Mill
Calls a subprogram. The last four digits of P are the program number and leading digits are the repeat count, up to 9999.
Format
M98 P
Addresses
| Address | What it does |
|---|---|
P | Repeats then 4 digit program number. P60050 runs O0050 six times |
How it works
Non modal.
Example program
G90 G54 G00 X0. Y0. (START)
M98 P30100 (RUN O0100 THREE TIMES)
M30 (END)
O0100 (SUBPROGRAM)
…
M98 P30100 (RUN O0100 THREE TIMES)
M30 (END)
O0100 (SUBPROGRAM)
…
The full 6-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Program numbers under 1000 need leading zeros when a repeat count is used. P100001 runs O0001 ten times.
- M98 does not get new local variables. Changes to locals carry over.
- Subprograms start with O or a colon and a 4 digit number and end with M99.
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 |
| Fadal | Execute subprogram |
| Swiss (Citizen Star) | Subprogram call |
Every M-code for Hurco WinMax (NC) 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 Hurco WinMax M-codes