• Recent Posts

  • Categories





  • Pages

  • « | Home | »

    Example of the G-Code program

    By OnTopic | January 1, 2009

    g-code

    Next, we are going to go through an example of cutting out a 2” square with a CNC Plasma Cutter.  Then we will look at the G-Code to see what is happening.

    2” Square G-Code:
    The numbers on the left of the G-Code are the sequence numbers of the code and the order it will be executed in.  I have added notes after different actions to let you know what that line of code means.  My note starts with a “-“ then continues.  A “-“ means nothing in G-Code.

    N0000 (Filename: 2INSquare.txt) – Name of File
    N0010 (Post processor: Plasma.post) – Name of Post Processor Used
    N0020 (Date: 8/1/2007) – Date G-Code was generated
    N0030 G20 (Units: Inches) – Measurement Units Used
    N0040 G53 – Machine co-ordinate system
    N0050 G90 – Absolute Programming
    N0060 G40 – Tool radius compensation off
    N0070 F1 – Feedrate of 1” per min
    N0090 (Part: Square) – name of the part
    N0100 (Process: Plasma,  DEFAULT, Plasma, 0.01 in kerf) – Tool to be used
    N0110 G00 – Go to Home
    N0120 X0.1113 Y-0.0904 – Move to this exact X, Y position
    N0130 G04 P2000 – Pause for 2 seconds, this is in milliseconds
    N0140 M03 – Fire the plasma torch
    N0150 G04 P500 – Pause for .5 seconds, this is in milliseconds
    N0160 G03 X0.0000 Y-0.0050 I-0.1113 J-0.0298 F40.0 – move to this X, Y position in an arcing movement at a feedrate of 40 inches per min
    N0180 G01 Y2.0000 – Travel in the Y+ direction for 2 inches to X0, Y2
    N0200 G01 X2.0000 – Travel in the X+ direction for 2 inches to X2, Y2
    N0220 G01 Y0.0000 – Travel in the Y- direction for 2 inches to X2, Y0
    N0240 G01 X0.0000 – Travel in the X- direction for 2 inches to X0, Y0
    N0250 G03 X-0.1113 Y-0.0904 I0.0000 J-0.1152 – move to this X, Y position in an arcing movement
    N0260 M05 – Turn off the plasma torch
    N0270 G04 P2000 – Pause for 2 seconds, this is in milliseconds
    N0280 G00 – Move to Home
    N0300 M30 – End Program

    CNC Information Free Community Site:
    If you want to know more about CNC come over to http://www.cncinformation.com
    You can join for Free and you get two free CNC ebooks. One is a GCode Quick Guide and the other is the CNC Info Site eBook. You also get access to the Free Video Series…Image to CNC Art when you join the community.

    Share and Enjoy:
    • Digg
    • Sphinn
    • del.icio.us
    • Facebook
    • Mixx
    • Google Bookmarks
    If you enjoyed this post, make sure you subscribe to my RSS feed!

    Topics: Computers And Technology | No Comments »

    Comments