Machsupport Forum
G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: Loui on February 24, 2010, 03:38:33 PM
-
I have manually added these lines to my program and they work great. I have a floating head with a micro switch. This is on a plasma table that I just added an auto THC to.
G31 Z-1
G91 Z.3
G90
But when I have tried to do a subroutine (M98) with this it gives me an error on the G31 Z-1 line
G31 Z-1
G91 Z.3
G90
M99
%
Any idea of what I did wrong?
Thanks, Greg
-
how did you write the sub ?
it should look something like this
%
g21g40
m98p1(call sub)
m30
o1
g31z1.f100
g91z.3
m99
%
Graham
-
This is my test program.
N001 G70
N002 G90
N003 G00 X-0.037 Y0.0
N004 M98 (Pierce.tap) I added the P1 behind the M98 to try it but then it skipped the subroutine
N005 M03
N006 G01 Y1.0
N007 M05 G00 Z .25
N008 G40
N009 M30
This is my subroutine.
G31 Z-1 F30 When it checks the program it stops on this line.
G91 Z.3
G90
M99
%
Thanks, Greg
-
I just tried this on the computer in the office and it works fine. No motors hooked up but it goes through the program and I am using the same profile and screen set in the office as out in the shop.
Greg
-
Do you have the sub program stored in the subprogram folder inside mach3 folder, if not you should or you need to specify the full path in the m98 call.
Graham
-
I found the problem. I had a G41 in the line before the M98 on my original program and that is what was messing it up. All is working now.
Greg