# How to call up sub programs in G code

**URL:** <https://forum.onefinitycnc.com/t/how-to-call-up-sub-programs-in-g-code/34248>\
**Category:** Elite Series (Masso & Redline) (Gen 1)\
**Created:** [July 1, 2025, 5:03pm UTC](https://forum.onefinitycnc.com/t/how-to-call-up-sub-programs-in-g-code/34248 "2025-07-01T17:03:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Derf](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@Derf](https://forum.onefinitycnc.com/u/Derf)\
**Post date:** [July 1, 2025, 5:03pm UTC](https://forum.onefinitycnc.com/t/how-to-call-up-sub-programs-in-g-code/34248/1 "2025-07-01T17:03:36Z")

</div>

I have several programs from a prior machine that were written in conversational programming. All these can be converted to G code simply,but when it comes to sub routines, the protocol is different than G code. I know that M98 calls the sub and m99 is the end of the sub, but where is the file actually placed? What would the correct syntax look like?

---

<div class="post-metadata">

**Author:** ![3D-CNC](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.onefinitycnc.com/3d-cnc/32/33076_2.png) [@3D-CNC](https://forum.onefinitycnc.com/u/3D-CNC)\
**Post date:** [July 1, 2025, 5:39pm UTC](https://forum.onefinitycnc.com/t/how-to-call-up-sub-programs-in-g-code/34248/2 "2025-07-01T17:39:18Z")

</div>

I know that the subs for the ATC have to be in the same folder as the program you are trying to run.

I pulled this off of the Masso Rapid change info. Not sure if it helps

 ![image](https://us1.discourse-cdn.com/flex022/uploads/onefinitycnc/original/3X/5/b/5b74d4570ddb5f2dcc717b23f0c152104b801a9c.png)

---

<div class="post-metadata">

**Author:** ![3D-CNC](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.onefinitycnc.com/3d-cnc/32/33076_2.png) [@3D-CNC](https://forum.onefinitycnc.com/u/3D-CNC)\
**Post date:** [July 1, 2025, 5:45pm UTC](https://forum.onefinitycnc.com/t/how-to-call-up-sub-programs-in-g-code/34248/3 "2025-07-01T17:45:18Z")

</div>

You should be able to name it “600.nc” naming and then edit your program where it calls up your sub to the new name.

---

<div class="post-metadata">

**Author:** ![TMToronto](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@TMToronto](https://forum.onefinitycnc.com/u/TMToronto)\
**Post date:** [July 1, 2025, 11:30pm UTC](https://forum.onefinitycnc.com/t/how-to-call-up-sub-programs-in-g-code/34248/4 "2025-07-01T23:30:52Z")

</div>

Additionally, make sure the main .nc and required sub program .nc files are in the same folder on the USB.

[https://docs.masso.com.au/supported-m-codes/m98-and-m99-sub-program-call](https://docs.masso.com.au/supported-m-codes/m98-and-m99-sub-program-call)

---

<div class="post-metadata">

**Author:** ![Derf](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@Derf](https://forum.onefinitycnc.com/u/Derf)\
**Post date:** [July 2, 2025, 12:26am UTC](https://forum.onefinitycnc.com/t/how-to-call-up-sub-programs-in-g-code/34248/5 "2025-07-02T00:26:45Z")

</div>

Thanks, that helped a lot. I couldn’t get it to work because I didn’t use the "P"to call up the file, so it just skipped those lines.

---

<div class="post-metadata">

**Author:** ![Derf](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@Derf](https://forum.onefinitycnc.com/u/Derf)\
**Post date:** [July 29, 2025, 10:59pm UTC](https://forum.onefinitycnc.com/t/how-to-call-up-sub-programs-in-g-code/34248/6 "2025-07-29T22:59:07Z")

</div>

Still having trouble. After putting all the files in the right place, the main program will not come up. I get an error that says “no sub programs found”. I don’t follow…..any thoughts?
