587,338 active members*
3,564 visitors online*
Register for free
Login
Results 1 to 17 of 17
  1. #1
    Join Date
    Jul 2004
    Posts
    9

    Help teach G-code for rookie

    Guys, would you by any chance teach rookie how to understand G-code. I would like to learn and understand what those terms are. I obviously understood:

    X2.5 (from top view of cnc machine moving X-Axis {up/down} at 2.5")
    Y2.5 (from top view of cnc machine moving Y-Axis at {L/R} 2.5")
    Z6 (from side view of cnc machine moving Z- at{up/down} 6")


    But the only thing I don't understand is what G0, G1, G90, or whatever the letter and number that comes in first of each line. Perhaps, there are some websites that clearly explain that. Care to help or paste website that you would encourage a rookie to read?

    Your help is appreicated.
    Arthur Prather
    Pratec Copyright © 2004

  2. #2
    Join Date
    May 2005
    Posts
    1810
    Mr. Octane -

    The "G" represents a function - to get started, think of it as "Go". Once it is entered in a line of code, it will remain the modal code until another G-code is commanded. For example, if you write:

    G00 x0y0
    x5 y0.25

    - the machine will execute the second line in "G00" mode (rapid).

    G00 positioning (rapid traverse) (M,T)
    G01 linear interpolation (feed) (M,T)
    G02 circular Interpolation CW (M,T)
    G03 circular Interpolation CCW (M,T)
    G04 dwell, a programmed time delay (M,T)
    G05 unassigned
    G06 parabolic interpretation (M,T)
    G07 cylindrical diameter values (T)
    G08 programmed acceleration (M,T)
    G09 exact stop check (M,T)
    G10 - G12 unassigned or lock and unlock devices
    G13 computing line and circle intersect (M,T)
    G14 - G14.1 used for scaling (M,T)
    G15 - G16 polar coordinate programming (M)
    G15 - G16.1 cylindrical interpolation - c axis (T)
    G16.2 end face milling - c axis (T)
    G17 XY plane selection (M,T)
    G18 ZX plane selection (M,T)
    G19 YZ plane selection (M,T)
    G20 input in inch
    G21 input in mm
    G22 - G23 machine axis off limit area (M,T)
    G22.1 - G23.1 cutting tool off limit area (M,T)
    G24 single-pass rough facing cycle (T)
    G28 return to reference point (M,T)
    G29 return from reference point (M,T)
    G30 return to alternate home position (M,T)
    G31.1 - G31.4 external skip function (M,T)
    G33 thread cutting, constant lead (T)
    G34 thread cutting, increasing lead (T)
    G35 thread cutting, decreasing lead (T)
    G36 automatic accel. and deccel. (M,T)
    G37 used for tool gaging (M,T)
    G38 measure dia. and center of hole (M)
    G40 cutter compensation cancel (M)
    G41 cutter compensation left (M)
    G42 cutter compensation right (M)
    G43 cutter offset, inside corner (M,T)
    G44 cutter offset, outside corner (M,T)
    G45 tool offset decrease
    G46 tool offset double increase
    G47 tool offset double decrease
    G48 scaling off
    G49 tool length compensation cancel
    G50 tool offset increase
    G50.1 cancel mirror image (M,T)
    G51.1 program mirror image (M,T)
    G52 offset axis w/ respect to 0 point (M,T)
    G53 motion in machine coordinates (M,T)
    G54 work coordinate system 1 select
    G55 work coordinate system 2 select
    G56 work coordinate system 3 select
    G57 work coordinate system 4 select
    G58 work coordinate system 5 select
    G59 work coordinate system 6 select
    G60 single direction positioning
    G61 exact stop check mode (M,T)
    G62 reduce feed rate on inside corner (M,T)
    G64 cutting mode (M,T)
    G65 custom parametric macro (M,T)
    G66 custom macro for motion blocks (M,T)
    G66.1 custom macro for all blocks (M,T)
    G67 stops custom macro (M,T)
    G68 coordinate syslaim rotation ON (M)
    G69 coordinate syslaim rotation OFF (M)
    G70 inch programming (M,T)
    G71 metric programming (M,T)
    G72 circular interpolation CW (M)
    G72 finished cut along z-axis (T)
    G73 peck drilling cycle (T)
    G74 counter tapping cycle (M)
    G74 rough facing cycle (T)
    G74 cancel circular interpolation (M,T)
    G75 circular interpolation (M,T)
    G76 fine boring
    G80 canned cycle cancel
    G81 drilling cycle, no dwell (M,T)
    G82 drilling cycle, dwell (M,T)
    G83 deep hole, peck drilling cycle (M,T)
    G84 right hand tapping cycle (M,T)
    G84.1 left hand tapping cycle (M,T)
    G85 boring, no dwell, feed out (M,T)
    G86 boring, spindle stop, rapid out (M,T)
    G87 boring, manual retraction (M,T)
    G88 boring, spindle stop, manual ret. (M,T)
    G89 boring, dwell and feed out (M,T)
    G90 absolute dimension input (M,T)
    G91 incremental dimension input (M,T)
    G92 set absolute zero point (M,T)
    G93 inverse time feed rate (M,T)
    G94 per minute feed (M,T)
    G95 per revolution feed (M,T)
    G96 constant surface speed control (T)
    G97 stop constant surface speed control (T)
    G98 return to initial point in canned cycle
    G99 return to R point in canned cycle

    Also - follow this link for more info:
    http://prl.stanford.edu/documents/pdf/Gcodes.pdf

    This should get you started - and it sounds like you might already be familiar with the Cartesian coordinate plane. It really is a pretty easy thing once you practice.

    Have fun!!

    Scott
    Consistency is a good thing....unless you're consistently an idiot.

  3. #3
    Join Date
    Mar 2004
    Posts
    761
    Try this cool web site. It shows a graphic display of the commands as you move the mouse over the CNC code.

    http://www.cncezpro.com/gcodes.cfm
    Wayne Hill

  4. #4
    Join Date
    May 2005
    Posts
    1810
    Wayne -

    Nice! I've never seen that site.

    Where's Chunky?? - he might like that as a tutorial.

    Scott
    Consistency is a good thing....unless you're consistently an idiot.

  5. #5
    Join Date
    Jul 2004
    Posts
    9
    Thank you all guys for great help...

    Let me understand this
    G0 X0 Y0 (Home position)
    G1 Y5.0 (First line)
    G1 X5.0 (Second Line)
    G1 Y-5.0 (Third Line)
    G1 X-5.0 (4th Line)
    Z6 (Spindle get off the material)

    This code would have make a square? is that right?

    Okay here's situation... running AutoCAD 2000, I drew a square, then attach a printed letter inside the square. and convert it to G code. And my objective is for a machine to cut a wood in square shape, and then engrave the letter above the square shape how can I be able to identify that machine is going to cut square and engrave letter above when looking at G Code? Because as matter of fact, I tried that... and run it on CNC simulator It cuts square shape but not engrave it.

    Let me know
    Arthur
    Arthur Prather
    Pratec Copyright © 2004

  6. #6
    Join Date
    May 2005
    Posts
    1810
    The letter will not be recogized. It has to be in basic entities to process.

    More info this evening...sorry to be short.

    Your code needs a just a little bit of work. A simplified program to cut a square:

    G0 Z6 get Z out of the way!!!! - - make this a habit!!!!!
    X0.0 Y0.0 rapid to a starting point (G90)
    G1 Z0.0 F8
    Y5.0 F12
    X5.0
    Y0.0
    X0.0
    G0 Z6

    Oh - no need to repeat the G1 command for each line, but you can to keep it clear to yourself.

    G90 and G91 are not to be forgotten!

    Scott
    Consistency is a good thing....unless you're consistently an idiot.

  7. #7
    Join Date
    Apr 2003
    Posts
    361
    Download the FREE CNC Simulator and see what your codes will do. The site is http://www.cncsimulator.com/
    Stupid questions make me smarter...
    See how smart I've become at www.9w2bsr.com ;-P

  8. #8
    Join Date
    Jul 2004
    Posts
    9
    Thanks man, this is fun! could use it to learn ton of stuffs

    Arthur
    Arthur Prather
    Pratec Copyright © 2004

  9. #9
    Join Date
    Feb 2005
    Posts
    78

    Smile

    G'day
    Guys, those tips are the best I've seen in a long time.
    Thank you
    John

  10. #10
    Join Date
    Feb 2005
    Posts
    78

    Smile

    G'day
    I found this CNC editor Here
    AutoEditNC is a 32-bit Windows program to assist in the creation and testing of Numerical Control (NC) programs in the Fanuc/G&M-Code format. AutoEditNC is a specialized text editor with NC code creation tools. AutoEditNC will also simulate the movements of the machine tool so that the student can test his or her program for accuracy and reliablility.
    John

  11. #11
    Join Date
    Jun 2003
    Posts
    205

    CNC Training

    Hi ... take a look at Protalk ... www.KentechInc.com ... you can learn G code using either in-depth text explanations or code animations that show you the code in use. Protalk also comes with a learning Wizard that tests your programming skills using on-screen examples ... comes with an Operator Panel trainer that explains the "bells and whistles" of a CNC's operator panel ... also comes with a simple toolpath plotting software to use to test your G code programs which you can use for both milling or turning programs.

    One good aspect of Protalk is that it is not only a good training tool but it's design makes for a great reference tool anytime down the road and the toolpath plotting package can be used for some real programming on the job.

    Protalk comes in either turning or milling versions ... www.KentechInc.com

    Thanks to CNC Zone for the opportunity to post.

  12. #12
    Join Date
    Jun 2004
    Posts
    4

    It's a boon to newcomers!!

    Very good!!

  13. #13
    Join Date
    Jul 2005
    Posts
    100
    This is a program that was made in Ausrailia (it is in mm) but they do have an inch addition. http://www.cncsimulator.com/ This is what is teaching me for 2 weeks.

  14. #14
    Join Date
    Mar 2003
    Posts
    35538
    From my experience, it CNC Simulator doesn't work correctly in inch mode. Works fine if you work in mm, though.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  15. #15
    Join Date
    Dec 2004
    Posts
    174
    There is a text - The CNC Workshop by Nanfara/Ucello/Murphy that I have found to be pretty good for learning and reference. The version I have come bundled with CNCez simulator.

  16. #16
    Join Date
    Mar 2006
    Posts
    10

    Angry

    I have the same book with CNCez PRO 2004. The class i'm taking that uses it is sure as hell a lot longer that the damn 30 day evaluation they give you though. anybody have or know where i can find an "unlock code" for this version?

  17. #17
    Join Date
    Apr 2005
    Posts
    3634
    mxtras, nice list!



    --------------------------------------------------------------

    Also you should know, that when you get to things like "G01"
    It should be a zero, after the uppercase "G", and not an uppercase "O", then a number one.

    Example: "G01"

    Uppercase letter "G"
    Digit "0"
    Digit "1"

    G01 linear interpolation (feed) (M,T)
    --------------------------------------------------------------

    Also when you see the uppercase "F" that is how fast do you want the cnc/axis to move.

    Example: "F50" (Move the axis 50 [inch/mm/min])









    --------------------------------------------------------------

Similar Threads

  1. parametric programming
    By Karl_T in forum CamSoft Products
    Replies: 21
    Last Post: 05-24-2005, 08:58 PM
  2. Regarding G Code Interpreter
    By aran.nav in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 2
    Last Post: 01-08-2005, 12:10 AM
  3. I need sample G code program
    By bunalmis in forum G-Code Programing
    Replies: 1
    Last Post: 08-24-2004, 09:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •