Hello Guest it is March 29, 2024, 01:47:51 AM

Author Topic: Subprogram not found  (Read 1946 times)

0 Members and 1 Guest are viewing this topic.

Subprogram not found
« on: June 05, 2019, 08:08:12 PM »
Could i get a dummies version of "how to use a subprogram from the subprogram folder"?
This is making me crazy.. I've tried so many times. Ive found threads on this and am unable to affect a solution no matter what i try!

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Subprogram not found
« Reply #1 on: June 05, 2019, 10:45:43 PM »
M98 (subtest.tap) L2
Re: Subprogram not found
« Reply #2 on: June 06, 2019, 04:25:54 AM »
M98 (subtest.tap) L2

Where does this go?
None of the subtest files work.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Subprogram not found
« Reply #3 on: June 06, 2019, 08:20:48 AM »
The M98 is used in the gcode file to call the sub program that is in the sub directory. It is used in Mach3. What version of mach are you using Mach4 is different.

Re: Subprogram not found
« Reply #4 on: June 06, 2019, 08:39:24 AM »
Subprogram not found solution
Subprogram not found solved.
Subprogram not found problem solved.

In an effort to help others looking for this in the future...Here's how!
Formatting is everything.

In Main program loaded into the G-code viewer or MDI- call your subprogram.
Leading zeros here are okay
ex.>      M98 P0300

In subprograms folder...
Build a text file with no extension and without any leading zeros
Name it
ex.>      O301

Regardless of body of G-code content, this file must have the subprogram name as its first line without leading zeros.
ex.>     O301

After the body of G-code content it must have an M99 WITH a carriage return following that.
As apparently the last line is not read; so it better be a "do nothing" carriage return.
ex. below
M99
          <<extra carriage return or two here

I hope this helps!
Re: Subprogram not found
« Reply #5 on: June 06, 2019, 08:45:26 AM »
This solution is for mach4 Hobby.