Q&A · G-code & programming

How do subprograms work (M98 and M99)?

Frequently asked · G-code & programming · Dec 1, 2026

1 answer

✔ Expert answer cnccode

M98 P1000 calls program O1000; M99 at the end returns to the caller. Add L (or the P-prefix repeat format) to run it several times. With G91 moves inside, each call can step deeper or move to the next part.

Your answer

Be kind and specific. No advertising. See the guidelines.