View Full Version : code help


nfl2k2
04-03-2006, 10:20 AM
Here is an mspaint diagram of a simple CNC project I'm working on.

http://img227.imageshack.us/img227/7741/untitled6ez.gif

I want to create a txt file with the proper G-code to punch out four .250 in holes through the workpiece. Tool#1 is a .250 in diameter twist drill. Never done something like this before, I've found a few documents on the web that offer help, but I'm still having a hard time putting everything together. Could you guys point me in the right direction as to where to start?

(ex: how do I define the origin at (0,0)? How do I move the machine part to the point (2, 1.5) and punch out a hole at that location? How do I tell the machine to bring the part up .1 in and move to the next point on the workpiece?)

Thanks for your help!

Switcher
04-03-2006, 01:22 PM
Run at your own risk ! :)

lakeside
04-03-2006, 07:30 PM
if you machine will take a G81 that a comand for drill cycle G83 is the comand for a peck drill cycl sample file attach i had posted wrong file early and just got back if you go on line and do a search for G and M code you'll find a lot of info the G80 at the end cancel the drill cycle R=rapid plane Q=peck amount

ger21
04-03-2006, 08:35 PM
Run at your own risk ! :)

Change all the Z0.0 to Z0.1 to avoid dragging the tip of the tool across your part. :eek:

Traceycnc300
04-03-2006, 08:40 PM
I dont know what kind of machine your running but this would be the codes for our machines.

T1M6
G00G90G54X2.Y1.5M03S1500
G43H1Z.1M08
G81Z-1.5R.1F5.
Y2.5
X6.
Y1.5
G80
G28G91Y0Z0
M30

Of course the feeds and speeds need to match the material your cutting.

Switcher
04-04-2006, 09:35 AM
Change all the Z0.0 to Z0.1 to avoid dragging the tip of the tool across your part.

Thanks, ger21

Text file updated (in post #2), hows "Z+0.5" :cheers: