Results 1 to 6 of 6

Thread: I need a very very simple g-code file please.

  1. #1
    Registered
    Join Date
    Oct 2008
    Location
    USA
    Posts
    72
    Downloads
    0
    Uploads
    0

    I need a very very simple g-code file please.

    I have no idea how to write g-code. I would like a file to make keyholes. I just need something that starts at X0, Y0, Z0.2, lowers Z to Z-0.35, then moves to Y0.6, then returns to Y0, then returns Z to Z0.2. I will just put the bit where I need it and zero X and Y before running it. I will post a file that I think is close to what I need. If someone can tell me what to add, I would really appreciate it.

    Thanks, Jeff

    (BEGIN PREDATOR NC HEADER)
    (MACH_FILE=3AXVMILL.MCH)
    (MTOOL T1 S1 D.125 H2.125 DIAM_OFFSET 1 = .0625) (don't believe this will matter(wrong bit)
    (SBOX X0. Y0. Z-1. L0. W.5 H1.)
    (END PREDATOR NC HEADER)

    %
    O100
    (PROGRAM NUMBER)
    (PROGRAM NAME - KEYHOLE UP.TAP)
    (POST - MACH 3 MILL NO ATC)
    (DATE - MON. 08/31/2009)
    (TIME - 07:07PM)

    N01 G20 G40 G49 G54 G80 G90 G91.1
    N02 G53 Z0.2


    N03 T1 M06
    N04 S10000 M03
    N05 G00 G43 H1 Z.2 M08
    N06 G90 G54 X0. Y0.
    N07 G01 Z-.350 F20.
    N08 Y.5 need something added here please to return Y to 0
    N09 G00 Z.2
    N10 M09
    N11 M05
    N12 G53 Z0.2
    N13 G53 Y0.
    N14 M02

    (END OF PROGRAM)

    N15 M30
    %


  2. #2
    Registered
    Join Date
    Oct 2008
    Location
    USA
    Posts
    72
    Downloads
    0
    Uploads
    0
    Between lines N08 and N09 can't I just add an N08.5. Does it need to be just a Y0 or do I need to make it a G53 Y0 to make it move? Thanks, Jeff


  3. #3
    Registered Superman's Avatar
    Join Date
    Dec 2008
    Location
    Krypton
    Posts
    1,768
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by Ranscon View Post
    lowers Z to Z-0.35, then moves to Y0.6, then returns to Y0, then returns Z to Z0.2. I will just put the bit where I need it and zero X and Y before running it. I will post a file that I think is close to what I need. If someone can tell me what to add, I would really appreciate it.

    %
    O100
    (PROGRAM NUMBER)
    (PROGRAM NAME - KEYHOLE UP.TAP)
    (POST - MACH 3 MILL NO ATC)
    (DATE - MON. 08/31/2009)
    (TIME - 07:07PM)

    N1 G20 G40 G49 G54 G80 G90 G91.1
    N2 G53 Z0.2
    N3 T1 M06
    N4 S10000 M03
    N5 G00 G43 H1 Z.2 M08
    N6 G90 G54 X0. Y0.
    N7 G01 Z-.350 F20.
    N8 Y0.6 ( G1 is already active -so not needed )
    N8 Y0. ( this is to go back to the 'descend in' point )

    N9 G00 Z.2
    N10 M09
    N11 M05
    N12 G53 Z0.2
    N13 G53 Y0.
    N14 M30
    %


  4. #4
    Registered
    Join Date
    Apr 2008
    Location
    USA
    Posts
    837
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by Ranscon View Post
    Between lines N08 and N09 can't I just add an N08.5. Does it need to be just a Y0 or do I need to make it a G53 Y0 to make it move? Thanks, Jeff
    You can just repeat N08 or N09 like Superman did if hand editing. If Mach doesn't like the duplicate line, just use Predator to resequence the file.

    And just to verify, feed rates are usually modal (meaning the control will keep using it unless you give it something else). You would need to add an F on the same line as your first Y move if you want it to feed at a rate different than F20.


  • #5
    Registered
    Join Date
    Apr 2008
    Location
    USA
    Posts
    837
    Downloads
    0
    Uploads
    0
    It looks like you are using BobCAD. If you are, try this little trick.

    Make a copy of the line on a different Z level, I made one at Z-0.5, then connect one of the ends. Make a contour. Then use a Profiling function and select this little contour. BobCAD will completely ignore the Z level and the toolpath will reverse itself. It might not seem worth it for a single line, but if you want to reverse direction without lifting Z on a long profile without hand editing, this is the easiest way I've found. See the code output in the pic.
    Attached Thumbnails Attached Thumbnails I need a very very simple g-code file please.-tricky_contour.jpg  


  • #6
    Registered
    Join Date
    Oct 2008
    Location
    USA
    Posts
    72
    Downloads
    0
    Uploads
    0

    Thumbs up

    Thanks all, I started out with Superman's mod and it works just fine.
    Jeff


  • Similar Threads

    1. Need help with simple G code
      By Step by Step in forum Coding
      Replies: 2
      Last Post: 10-24-2008, 09:49 PM
    2. Simple G-Code program?
      By N4NV in forum G-Code Programing
      Replies: 10
      Last Post: 03-24-2006, 07:35 PM
    3. Need help with simple .DXF file
      By Idle hands in forum DeskCNC Controller Board
      Replies: 0
      Last Post: 05-29-2005, 04:40 PM
    4. Mill file for SS simple 5804 PCB driver
      By pminmo in forum General Electronics Discussion
      Replies: 4
      Last Post: 06-17-2004, 08:06 AM
    5. Perhaps a bug in simple one line code??
      By thuffner3 in forum TurboCNC
      Replies: 3
      Last Post: 02-02-2004, 09:21 PM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.