Go to Post To find something they are so passionate about that it oozes into everything they do, and others can't help but want to follow them into this Counter-Culture where good is not good enough, Great is all they strive for. - Kims Robot [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-02-2004, 03:23
Guest
 
Posts: n/a
G-code and other machining stuff

I just came back from an awesome day at our partner machine shop, Birdwell Machine (http://www.birdwellmachine.com/)!

Anyway, since I'm a programmer, I was naturally curious about the G-code used on the CNC machines. So, I'm looking for some general tutorials or know-how. Any ideas?
  #2   Spotlight this post!  
Unread 18-02-2004, 04:25
sanddrag sanddrag is offline
On to my 16th year in FRC
FRC #0696 (Circuit Breakers)
Team Role: Teacher
 
Join Date: Jul 2002
Rookie Year: 2002
Location: Glendale, CA
Posts: 8,507
sanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond repute
Re: G-code and other machining stuff

HAAS Has a really good manual on it and a quick reference card. Also, there is CNC Machining magazine which is really cool. If you have any basic questions on CNC operation or programming, let me know and I'll try to help.
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004
  #3   Spotlight this post!  
Unread 18-02-2004, 09:50
Austin's Avatar
Austin Austin is offline
Go TechnoKats!
FRC #0045 (TechnoKats Robotics Team)
Team Role: Alumni
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Kokomo, In
Posts: 159
Austin is a name known to allAustin is a name known to allAustin is a name known to allAustin is a name known to allAustin is a name known to allAustin is a name known to all
Send a message via AIM to Austin
Re: G-code and other machining stuff

NC Codes
-Block Number (N)
-Preparatory Codes (G)
-Miscellaneous Codes (M)
-Priamary X Motion (X)
-Priamary Y Motion (Y)
-Priamary Z Motion (Z)
-For Circular interpolations--- I=X J=Y and K=Z
-Feed rate (F)
-Spindle speed (S)
-Tool Type (T)

Preparatory Codes:
G90 - Absolute Coordinates
G91 - Relative Coordinates
G00 - Rapid Traverse (non-cutting move)
G01 - Straight Line Interpolation (cutting move
G02 - Circle Interpolation (cw)
G03 - Circle Interpolation (ccw)
G04 - Dwell (wait) Pause between motions on all axes.Time in seconds -
example: G04F2 -pause for 2 sec.
G05 - Pause - waits for user intervention

M Codes - Miscellaneous
M00 - Pause
M01 - Optional stop
M02 - End of Program
M03 - Spindle on
M05 - Spindle off
M06 - Tool Change
M08 / M09 - Accessory # 1 on / off
M10 / M11 - Accessory # 2 on / off


I hope that this has helped a little bit...here's some sample code...

N00 G90 ;
N01 M06T1 ;
N02 M03 S3000 ;
N03 G00 Z .1;
N04 G00 X.5Y.5 ;
N05 G01 Z-.0625F9 ;
N06 G01 X.5Y1.5;
N07 G01 X.875Y1;
N08 G01 X1.25Y1.5;
N09 G01 X1.25Y.5;
N10 G01 Z.1;
N11 G00 X1.75Y1.5;
N12 G01 Z-.0625F9;
N13 G01 X1.75Y.5;
N14 G03 X1.75Y1.5I1.75J1;
N15 G01Z.1;
N16 M05;
N17 M06T00;
N18 G00X4Y3Z3;
N19 M02;

As an excercise, it helps you to learn by writing in what each line of code means to the right of the semicolon.
__________________
Austin Butler| Mac Addict | Purdue AAE | President, Sigma Gamma Tau | ENS USN/Student Naval Aviator
2002-2005 driver | 2004 Lead Mechanical | 2004-2005 Co-Student Leader | TechnoKats Robotics Team 45

Need a gearbox? Omniwheels? Check out AndyMark.biz
  #4   Spotlight this post!  
Unread 18-02-2004, 14:07
patrickrd's Avatar
patrickrd patrickrd is offline
Registered User
AKA: Patrick Dingle
no team
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1999
Location: Medford, MA
Posts: 349
patrickrd is a splendid one to beholdpatrickrd is a splendid one to beholdpatrickrd is a splendid one to beholdpatrickrd is a splendid one to beholdpatrickrd is a splendid one to beholdpatrickrd is a splendid one to beholdpatrickrd is a splendid one to behold
Send a message via AIM to patrickrd
Re: G-code and other machining stuff

G-Code is one of my favorite programming languages! I learned it from a manual that came with the CNC machine that I used, but I found the following web site which looks like a good overview:

http://www.linuxcnc.org/handbook/gcode/g-code.html

Good luck! By the way, it is rather uncommon to write G-Code by hand. Lots of CAD programs are available with manufacturing packages as well, and these manufacturing packages can generate G-Code for your CAD drawing automatically. You simply have to tell it which surfaces you want to machine with what tools, how your stock is mounted, specify some parameters (such as feedrates, spindle speeds, and tool properties), and it will generate the G-Code automatically for you. In any case, it is still pretty important to know the main G-Code commands if you are going to operate a CNC machine.

- Patrick

And here is some of the G-Code used to machine an omni-wheel. This is G-Code that I generated automatically from I-DEAS:

(OPERATION CATEGORY & TYPE: Milling Volume Clear)
M05
(TOOL IDENTIFIER: End Mill 01/16)
(POST TOOL ID: 0)
(TOOL DESCRIPTION: 1/16 End Mill (2 flute))
(TOOL STATION NUMBER: 11)
(Start Region 1 -- Depth: 0.304375)
T11 M06
M01
G56 H11 D01 Z.72
M08
S8000. M03
G00 X1.7454 Y1.1004
Z.42
G01 Z.3044 F7.5
X1.7385 Y1.099
X1.7527 Y1.0322
G03 X1.757 Y1.0271 I.0069 J.0015
G01 X1.7594 Y1.025
X1.7601 Y1.0238
X1.7621 Y1.0264
X1.7653 Y1.0294
G03 X1.7665 Y1.0351 I-.0057 J.0043
G01 X1.7523 Y1.1019
X1.7454 Y1.1004
Z.4044
G00 Z.72


Can you guess which part of the omniwheel this is for??? Interestingly, CNC machines used to read programs off of a roll of tape (holes were punched out in rows and columns to encode the commands). The above program, if I had pasted the whole thing, would require a roll of tape over one mile long in distance!!
__________________
Systems Engineer - Kiva Systems, Woburn MA
Alumni, Former Mechanical Team Leader - Cornell University Robocup - 1999, 2000, 2002, 2003 World Champions
Founder - Team 639 - Ithaca High School / Cornell University
Alumni - Team 190 - Mass Academy / WPI

Last edited by patrickrd : 18-02-2004 at 15:43.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
And once more from the top... GLORIA! GEFORCE 3! AND OTHER CARDS... Robby O 3D Animation and Competition 1 24-01-2002 20:12


All times are GMT -5. The time now is 20:19.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi