1
General Mach Discussion / Re: Mach 3, M98 can get it to work, Please Help
« on: April 03, 2020, 08:56:12 AM »
I had this same issue. I was not calling a program from a file but as a subroutine
Below is a piece of sample code from my program.
The " title line" of the sub program ( 0 1234 ) must have a space after the numbers or the system will not recognize it as a sub program and it will pass right through the M98 line as if it were a comment.
G00 X 50.000 Y 100.000
M98 P1234
M30 ( End of program.)
%
o 1234
G00 Z 5.000
code and stuff here
M99
M98 P1234
there can be a space between the P and the numbers P 1234 or P1234 these will work either way
o 1234
The O 1234 can have a space between the O and the numbers O 1234 or O1234 this works either way
the O1234 <- must have a space here.
M99
Must have a line feed or carriage return after it or you will receive a " subprogram not found error"
Below is a piece of sample code from my program.
The " title line" of the sub program ( 0 1234 ) must have a space after the numbers or the system will not recognize it as a sub program and it will pass right through the M98 line as if it were a comment.
G00 X 50.000 Y 100.000
M98 P1234
M30 ( End of program.)
%
o 1234
G00 Z 5.000
code and stuff here
M99
M98 P1234
there can be a space between the P and the numbers P 1234 or P1234 these will work either way
o 1234
The O 1234 can have a space between the O and the numbers O 1234 or O1234 this works either way
the O1234 <- must have a space here.
M99
Must have a line feed or carriage return after it or you will receive a " subprogram not found error"