Machsupport Forum
General CNC Chat => Share Your GCode => Topic started by: Kai on October 19, 2010, 08:04:12 PM
-
please dont think I'm stupid I have trouble reading things and understanding.
I have gone back to school so to speek to learn cnc more as a hobby I always wanted to do.
we have to write the code in word or note pad. this bit of code is used to do the job.
this is a snipet of code we used to cut a small nameplate
Start
%
O0020(Rik outer name plate)
N10 G90 G21 G54
N20 G40 80
N30 T10 M06
N40 G0 X0
N50 G0 X-20 Y-20 S1000 M13
N60 G43 H10 G0 z3
N70 G0 Z-3 F50
N80 G41 G01 X-5 Y-3 D10 F75
N90 G01 X-5 Y3
N100 G01 X-3 Y5
N110 G01 X33 Y5
N120 G01 X35 Y3
N130 G01 X33 Y-3
N140 G01 X33 Y-5
N150 G01 X-3 Y-5
N160 G01 X-5 Y-3
N170 G0 Z50
N180 G40 G0 X-20 Y20
N190 M05
N200 M09
N210 G28 G0 Z100
N220 G28 G0 Y100
N230 M30
%
Iam reading the manual I am strugling a little to get my head round it. I know this bit of code ref to offsets etc in the machine we are using but my main question is sort of I know
the program we use at college is alphacam and this outputs the code to the machine we use there.What do I need to do to get the code to output to a format that mach3 understands?
Or am I comming at this from thw wrong way, please tell me if I am being dumb on this I jst have not got my head round how things go, Hood did a bit of code for me and I was very greatfull for the pointers I get that I dont need the line numbers I think but the rest at the moment is I think over my head or I am just slooooow at this lol
-
This will run in Mach so you can see what it is doing.
M98 P0020
O0020 (Rik outer name plate)
N10 G90 G21 G54
N20 G40
N30 T10 M06
N40 G0 X0
N50 G0 X-20 Y-20 S1000 M13
N60 G43 H10 G0 z3
N70 G0 Z-3 F50
N80 G41 G01 X-5 Y-3 D10 F75
N90 G01 X-5 Y3
N100 G01 X-3 Y5
N110 G01 X33 Y5
N120 G01 X35 Y3
N130 G01 X33 Y-3
N140 G01 X33 Y-5
N150 G01 X-3 Y-5
N160 G01 X-5 Y-3
N170 G0 Z50
N180 G40 G0 X-20 Y20
N190 M05
N200 M09
N210 G28 Z100
N220 G28 Y100
N230 M30
%
From the worlds worst programmer........, :D
RICH
-
Is that M13 supposed to be M3?
-
On my M-code list m13 is coolant on spindle CW
-
What do I need to do to get the code to output to a format that mach3 understands?
Like any language, Gcode has "dialects". The attached file is a listing of Mach M & G codes ( you can find them in the Mach directory ).
Do a quick review to determine those not supported by Mach or different than the program your using.
Clicking the G & M code buttons while in Mach provides a description of each.
The M13 is a good example that was pointed out by Gerry.
BTW, the post processor specific for say Mach, if there is one for your CAM program, is set-up to modify code posting such that you don't have problems.
Fanuc is very close. I remember Brian saying that Mach would be modified over time,in general, to agree with programming as shown in Peter Smid's
Handbooks.
RICH
-
thanks for that I will have a look to see what the translation looks like many thanks for the help.