Machsupport Forum
G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: Kai on October 07, 2010, 07:33:59 PM
-
Ok I am trying to get with it on mach3.
the help I need is that at college and yes I am a first year mature student.
I have tried to enter the G code we used, but getting errors I thought alll code format was standard but now I am thinking not.
Start ( S:Spindle Speed: T:Tool Number: R:Arc radius: T:Tool Number: )
% (handshake with machine) ( %: Start or end of program )
O0040(Rik Hutchcroft Name Plate) ( O:Subroutine label number:0040 )
N10 G90 G21 G54 (set absolute, metric & datum) ( G90:Absolute prog G21:Prog in mm G54:Zero offset #1 )
N20 G40 G80 (cutter compensation& canned cycle cancel) ( G40:Tool radius comp off G80:Cancel canned cycle )
N30 T03 M06 (tool change 3mm slot) ( T:Tool Number:03 M06:Tool change )
N40 G0 X0 (rapid move to safe position) ( G00:Rapid positioning X:0
Wher ehave I gone wrong? Please I have to use alphacam at college and its nothing like this where the hell do I start.
Sorry for rant but getting frustrated now
N50 G0 X0 M13 S2000 (rapid to first hole spindle c/w 2000 rpm coolant on) ( G00:Rapid positioning X:0 M13:?? S:Spindle Speed:2000 )
N60 G43 G0 Z3 H03 (tool length comp +ve rapid to 3mm above surface) ( G43:Tool offset compensation positive G00:Rapid positioning Z:3 H:Tool length offset index:03 )
N70 G81 X0 Y0 Z-5 R3 F50 (drill cycle x0 y0 z-5 retract 3 feed 50) ( G81:Drilling to final depth canned cycle X:0 Y:0 Z:-5 R:Arc radius:3 F:Feedrate:50 )
N80 X30 Y0 (drill second hole co’ds only needed ( X:30 Y:0 )
N90 G80 (canned cycle cancle) ( G80:Cancel canned cycle )
N100 M05 (spindle stop) ( M05:Spindle Stop )
N110 M09 (coolant stop) ( M09:Mist Coolant Device Off )
N120 G28 G0 Z100 (return to ref point rapid to z100 1st) ( G28:Return to home pos G00:Rapid positioning Z:100 )
N130 G28 G0 Y100 (return to ref point rapid to y100 1st) ( G28:Return to home pos G00:Rapid positioning Y:100 )
N140 M30 (end of program (tape rewind)) ( M30:End program...rewind stop )
% (end handshake) ( %: Start or end of program )
-
Try this.
If you read the error messages, they tell you what's wrong.
In the first line, mach3 doesn't understand "Start". Put it in the parenthesis and it becomes a comment. Or, just get rid of it.
You have nested comments on a few lines, Mach3 doesn't allow them. You can have (comment)(comment), but not (comment(comment))
You can't have G28 and G0 on the same line.
Not sure if it mattered, but the M6 is usually called before the T03.
(Start S:Spindle Speed: T:Tool Number: R:Arc radius: T:Tool Number: )
% (handshake with machine) ( %: Start or end of program )
O0040(Rik Hutchcroft Name Plate) ( O:Subroutine label number:0040 )
N10 G90 G21 G54 (set absolute, metric & datum) ( G90:Absolute prog G21:Prog in mm G54:Zero offset #1 )
N20 G40 G80 (cutter compensation& canned cycle cancel) ( G40:Tool radius comp off G80:Cancel canned cycle )
N30 M06 T03 (tool change 3mm slot) ( T:Tool Number:03 M06:Tool change )
N40 G0 X0 (rapid move to safe position) ( G00:Rapid positioning X:0 )
N50 G0 X0 M13 S2000 (rapid to first hole spindle c/w 2000 rpm coolant on) ( G00:Rapid positioning X:0 M13:?? S:Spindle Speed:2000 )
N60 G43 G0 Z3 H03 (tool length comp +ve rapid to 3mm above surface) ( G43:Tool offset compensation positive G00:Rapid positioning Z:3 H:Tool length offset index:03 )
N70 G81 X0 Y0 Z-5 R3 F50 (drill cycle x0 y0 z-5 retract 3 feed 50) ( G81:Drilling to final depth canned cycle X:0 Y:0 Z:-5 R:Arc radius:3 F:Feedrate:50 )
N80 X30 Y0 (drill second hole co’ds only needed )( X:30 Y:0)
N90 G80 (canned cycle cancle) ( G80:Cancel canned cycle )
N100 M05 (spindle stop) ( M05:Spindle Stop )
N110 M09 (coolant stop) ( M09:Mist Coolant Device Off )
N120 G28 Z100 (return to ref point rapid to z100 1st) ( G28:Return to home pos G00:Rapid positioning Z:100 )
N130 G28 Y100 (return to ref point rapid to y100 1st) ( G28:Return to home pos G00:Rapid positioning Y:100 )
N140 M30 (end of program )(tape rewind) ( M30:End program...rewind stop )
% (end handshake) ( %: Start or end of program )
-
thanks for that looks like the format of mach3 is differant to alphacam so looks like I will end up pulling my hair out with this, college being one way and mach3 the other lol
-
AlphaCAM(and almost all CAM programs) can output code in any format for any machine control. The format is determined by the post processor your using. You'll need to create or find a post processor for mach3.
-
Ah right thank you I will know more then I get the machines and get a chance to play with them sorry Work on them lol