View Full Version : Gcode


frankg521
07-25-2007, 05:28 PM
Hi can anybody help me understand g code
i need gcde for a 5" square

Frank

John3
07-25-2007, 05:46 PM
G01 (set linear moves - assume starting point is 0,0 for your square)

F10.0 (feed rate is 10 ipm)

X5.000 (first edge 0,0 to 5,0)
Y5.000 (second edge 5,0 to 5,5)
X0.000 (third edge 5,5 to 0,5)
Y0.000 ( fourth edge and back to start 0,5 to 0,0)

M30 (end of program)

frankg521
07-25-2007, 05:51 PM
ok is this correct

G01
F10
X5.00
Y5.000
X0.000
Y0.000

Switcher
07-25-2007, 05:51 PM
G90 (absolute)
G01
F10

X5.0
Y5.0
X0.0
Y0.0

M30

frankg521
07-25-2007, 06:03 PM
that only made an L

Frank

frankg521
07-25-2007, 06:07 PM
sorry i didn't zero the dro's that did it

Switcher
07-25-2007, 06:12 PM
G90 (absolute)

G00
X0.0 Y0.0 (zero out X-axis & Y-axis)

G01
F10

X5.0
Y5.0
X0.0
Y0.0

M30

frankg521
07-25-2007, 06:23 PM
ok what about 5" circule what would be the gcode for that

frankg521
07-25-2007, 06:39 PM
i think its time to buy Mach and use the wizards

Switcher
07-25-2007, 06:48 PM
With the g-code already posted, you will still need to compensate for tool offset.


.

frankg521
07-25-2007, 07:01 PM
thanks switcher like th ecurley pic

HIRAH
07-26-2007, 06:16 AM
personnally, i like to program from center when possible. it just makes things easier imho.
so say x0 y0 is the center of the part
no cutter comp, 1/2 endmill

g0 g90 x-2.75y-3.
g01z__f___
g01y2.75
g01x2.75
g01y-2.75
g01x-3.
g0z1.

ed/man
07-29-2007, 05:31 PM
i think he wanted a 5" square not a 5" pocket you all are going CCW

HIRAH
07-30-2007, 05:25 AM
i think he wanted a 5" square not a 5" pocket you all are going CCW

not me.:D
i think programming from center is easiest.

John3
07-30-2007, 07:18 AM
Frankg521,

For your 5" circle you would use G02 if you wanted the cutter to travel in a clockwise path, and G03 for counter-clockwise.

What HIRAH said about being easier to start from the center is even more true for doing circles.

I typically use two G02's or two G03's to do a full circle, each one traveling 180 degrees. You will have to input the center of the circle via I and J values for each G02/G03.

-John

HIRAH
07-30-2007, 07:30 AM
for a circle, i would go this way with no cutter comp, 1/2" endmill,5" diameter.
x0 y0 is the center of the circle

g0x-2.75y-3.25(enough to be off the part)
g01z-____f_____
g01y0
g02I2.75
g01y.3( to get past center of the starting point of the circle)
g0z1.

or split it up into 2 like John3said

g0x-2.75y-3.25(enough to be off the part)
g01z-____f_____
g01y0
g02x2.75y0r2.75
g02x-2.75y0r2.75
g01y.3( to get past center of the starting point of the circle)
g0z1.

ed/man
07-30-2007, 05:30 PM
G02 is for O.D. G03 is for I.D. programming from center is great in G91 for Sub
Routing

HIRAH
07-31-2007, 11:07 AM
[QUOTE][/G02 is for O.D. G03 is for I.D.QUOTE]

only if you are climb milling.
you can use either g02 or g03, but 1 way will be conventional mill.

turmite
07-31-2007, 01:44 PM
Before you can had code for a 5" sq you first need to know your starting position, how the material is going to be oriented on the machine and the bit size. To just randomly write code is fun......but it ain't gonna work!

Material is 6X6"
Lower left hand corner is x0y0. Set the bit .250" over the material thickness.

using a .5" bit
absolute G90
G00X.250Y.250
G01Z-.........WHATEVER YOU NEED
G01Y5.75
G01X5.75
G01Y.250
G01X.250
G00Z0.00
G00X0.00Y0.00

This will leave nothing outside the cut of the bit for clamping but it is for example anyway. This is for a clockwise cut which will be a climb cut on the part.

Mike

Swizz_mill
07-31-2007, 03:38 PM
wee

turmite
07-31-2007, 11:34 PM
wee

???

Are wee having fun yet?

dertsap
07-31-2007, 11:44 PM
http://www.majosoft.com/engraving/html/lessons_-_how_to_work_with_g-c.html

this may help , if you google you can find tons of info on g coding

Switcher
08-01-2007, 01:26 AM
More Random Code...



Offset the 5.0 square per tool.

G90 (Absolute)

G00 (Rapid)
Z0.5 (Raise the Z-axis 0.5mm/inch above the part)
X0.0 Y0.0 (Zero out X-axis & Y-axis)

X10.0 Y10.0 (X-axis & Y-axis New Starting Point)

G91 (Incremental)
G01 (Feed)
F10 (Feedrate)

Z-0.25 (Lower the Z-axis -0.25mm/inch Below the part surface)

X5.0 (Move 5.0 mm/inch in "+X" Direction)
Y5.0 (Move 5.0 mm/inch in "+Y" Direction)
X-5.0 (Move 5.0 mm/inch in "-X" Direction)
Y-5.0 (Move 5.0 mm/inch in "-Y" Direction)

Z0.5 (Raise the Z-axis 0.5mm/inch above the part)

G90 (Absolute)
G00 (Rapid)
X0.0 Y0.0 (Zero out X-axis & Y-axis)

M30 (End Program)



.

turmite
08-01-2007, 08:56 AM
Hey guys......way before this time......I have already pulled out the cam system, but "wee" will stay here as long as necessary to help someone out!:D

Mike

frankg521
08-01-2007, 12:02 PM
Hi Guys this thread has helped me greatly it helped me get started in understanding G-Code... I'm sure it will take me a long time to master it

Frankie G :D