586,655 active members*
2,356 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2013
    Posts
    56

    G-code modification

    I have completed the job and was able to solve my problem.

    I am making a part and I need to take the G-code that is generated by the system and modify it so that I can do a more advanced operation then the software allows. If you look at the attached picture, it shows a block of wood(Finished) and the cutter. The programming I have now is able to start at the top of the wood block and cut straight down to make a straight shaft. But now I need the cutter to move into the wood to make a section of the shaft thinner. So my plan was to take the G-code that is generated by the software and modify it so that it does what I need. At the moment the code starts at the top of the shaft and cuts the full length of the shaft to make a square block round, The problem is that the code places the bit where it needs it and goes straight down. I need to make it so that it goes down to the proper depth and then moves into the part and then cut around it. Then when the cut is complete, move away from the part and up. Then back to home. Hope this makes sense. Below is the g-code that I plan to work off of. Please let me know if any additional info is required to help me out. Thanks in advance.

    Sorry about the picture as it is upside down

    (Tools used in this file: )
    (0 = End Mill {9.38mm} Key Hole)
    N100G00G20G17G90G40G49G80
    N110G70G91.1
    N120T0M06
    N130 (End Mill {9.38mm} Key Hole)
    N140G00G43Z0.3937H0
    N150S10000M03
    N160(Toolpath:- Profile 1 [7])
    N170()
    N180G94
    N190X0.0000Y0.0000F59.1
    N200G00X2.3051Y0.6235Z0.1969
    N210G1Z-0.2891F23.6
    N220G2X2.7103Y0.2184I0.0000J-0.4051F59.1
    N230G2X2.3051Y-0.1867I-0.4051J0.0000
    N240G2X1.9000Y0.2184I0.0000J0.4051
    N250G2X2.3051Y0.6235I0.4051J0.0000
    N260G1Z-0.3683F23.6
    N270G2X2.7103Y0.2184I0.0000J-0.4051F59.1
    N280G2X2.3051Y-0.1867I-0.4051J0.0000
    N290G2X1.9000Y0.2184I0.0000J0.4051
    N300G2X2.3051Y0.6235I0.4051J0.0000
    N310G1Z-0.4475F23.6
    N320G2X2.7103Y0.2184I0.0000J-0.4051F59.1
    N330G2X2.3051Y-0.1867I-0.4051J0.0000
    N340G2X1.9000Y0.2184I0.0000J0.4051
    N350G2X2.3051Y0.6235I0.4051J0.0000
    N360G1Z-0.5268F23.6
    N370G2X2.7103Y0.2184I0.0000J-0.4051F59.1
    N380G2X2.3051Y-0.1867I-0.4051J0.0000
    N390G2X1.9000Y0.2184I0.0000J0.4051
    N400G2X2.3051Y0.6235I0.4051J0.0000
    N410G1Z-0.6060F23.6
    N420G2X2.7103Y0.2184I0.0000J-0.4051F59.1
    N430G2X2.3051Y-0.1867I-0.4051J0.0000
    N440G2X1.9000Y0.2184I0.0000J0.4051
    N450G2X2.3051Y0.6235I0.4051J0.0000
    N460G1Z-0.6852F23.6
    N470G2X2.7103Y0.2184I0.0000J-0.4051F59.1
    N480G2X2.3051Y-0.1867I-0.4051J0.0000
    N490G2X1.9000Y0.2184I0.0000J0.4051
    N500G2X2.3051Y0.6235I0.4051J0.0000
    N510G1Z-0.7645F23.6
    N520G2X2.7103Y0.2184I0.0000J-0.4051F59.1
    N530G2X2.3051Y-0.1867I-0.4051J0.0000
    N540G2X1.9000Y0.2184I0.0000J0.4051
    N550G2X2.3051Y0.6235I0.4051J0.0000
    N560G1Z-0.8437F23.6
    N570G2X2.7103Y0.2184I0.0000J-0.4051F59.1
    N580G2X2.3051Y-0.1867I-0.4051J0.0000
    N590G2X1.9000Y0.2184I0.0000J0.4051
    N600G2X2.3051Y0.6235I0.4051J0.0000
    N610G00Z0.1969
    N620G00Z0.3937
    N630G00X0.0000Y0.0000
    N640M09
    N650M30
    %


    I have modified the code and hoping that someone can now check my work and see it they see any problems with what I have changed. All the changes I made are in red and I have changed the numbers at the beginning of each line so the sequence was correct. I have placed brackets with the description of what I hope would happen. Thanks

    ( Drill 1 )
    ( File created: Monday, April 13, 2015 - 07:22 PM)
    ( for Mach2/3 from Vectric )
    ( Material Size)
    ( X= 24.016, Y= 22.047, Z= 1.693)
    ()
    (Toolpaths used in this file
    (Profile 1 [7])
    (Tools used in this file: )
    (0 = End Mill {9.38mm} Key Hole)
    N100G00G20G17G90G40G49G80
    N110G70G91.1
    N120T0M06
    N130 (End Mill {9.38mm} Key Hole)
    N140G00G43Z0.3937H0
    N150S10000M03
    N160(Toolpath:- Profile 1 [7])
    N170()
    N180G94
    N190X0.0000Y0.0000F59.1
    N200G00X2.3051Y0.8000Z0.1069(Move to part with extra Y axis)
    N210G1Z-0.2891F23.6(drop to first cutting depth)
    N220G00X2.3051Y0.6235(Move to start of cut)
    N230G2X2.7103Y0.2184I0.0000J-0.4051F59.1(continue program to cut shaft)

    N240G2X2.3051Y-0.1867I-0.4051J0.0000
    N250G2X1.9000Y0.2184I0.0000J0.4051
    N260G2X2.3051Y0.6235I0.4051J0.0000
    N270G1Z-0.3683F23.6
    N280G2X2.7103Y0.2184I0.0000J-0.4051F59.1
    N290G2X2.3051Y-0.1867I-0.4051J0.0000
    N300G2X1.9000Y0.2184I0.0000J0.4051
    N310G2X2.3051Y0.6235I0.4051J0.0000
    N320G1Z-0.4475F23.6
    N330G2X2.7103Y0.2184I0.0000J-0.4051F59.1
    N340G2X2.3051Y-0.1867I-0.4051J0.0000
    N350G2X1.9000Y0.2184I0.0000J0.4051
    N360G2X2.3051Y0.6235I0.4051J0.0000
    N370G1Z-0.5268F23.6
    N380G2X2.7103Y0.2184I0.0000J-0.4051F59.1
    N390G2X2.3051Y-0.1867I-0.4051J0.0000
    N400G2X1.9000Y0.2184I0.0000J0.4051
    N410G2X2.3051Y0.6235I0.4051J0.0000
    N420G1Z-0.6060F23.6
    N430G2X2.7103Y0.2184I0.0000J-0.4051F59.1
    N440G2X2.3051Y-0.1867I-0.4051J0.0000
    N450G2X1.9000Y0.2184I0.0000J0.4051
    N460G2X2.3051Y0.6235I0.4051J0.0000
    N470G1Z-0.6852F23.6
    N480G2X2.7103Y0.2184I0.0000J-0.4051F59.1
    N490G2X2.3051Y-0.1867I-0.4051J0.0000
    N500G2X1.9000Y0.2184I0.0000J0.4051
    N510G2X2.3051Y0.6235I0.4051J0.0000
    N520G1Z-0.7645F23.6
    N530G2X2.7103Y0.2184I0.0000J-0.4051F59.1
    N540G2X2.3051Y-0.1867I-0.4051J0.0000
    N550G2X1.9000Y0.2184I0.0000J0.4051
    N560G2X2.3051Y0.6235I0.4051J0.0000
    N570G1Z-0.8437F23.6
    N580G2X2.7103Y0.2184I0.0000J-0.4051F59.1
    N590G2X2.3051Y-0.1867I-0.4051J0.0000
    N600G2X1.9000Y0.2184I0.0000J0.4051
    N610G2X2.3051Y0.6235I0.4051J0.0000
    N200G00X2.3051Y0.8000Z-0.8437(Move away from part before rising Z axis)
    N620G00Z0.1969
    N630G00Z0.3937
    N640G00X0.0000Y0.0000
    N650M09
    N660M30
    %

  2. #2
    Join Date
    Jun 2014
    Posts
    13

    Re: G-code modification

    I think you have num or acramatic or something like this control because I saw G70 (inch mode). You need a helix operation I think.
    You start from X0.0 Y0.0 Z0.0 to z-0.850"
    I don't know the final hole size diameter
    After LOAD TOOL try this

    N14 G00 X0. Y0. Z0.6
    N15 G00 Z0.039
    N16 G0 X-0.816 Y0. Z0.039 X axis position
    N17 F60 federate 60in/min
    N18 G1 Z0.
    N19 G3 X-0.816 Y0.000 Z0.000 I0.000 J0.000 X axis calculated= final diameter/2 - tool diameter/2
    N20 G3 X-0.816 Y0.000 Z-0.200 I0.000 J0.000 X axis calculated for 2in hole diameter
    N21 G3 X-0.816 Y0.000 Z-0.400 I0.000 J0.000
    N22 G3 X-0.816 Y0.000 Z-0.600 I0.000 J0.000
    N23 G3 X-0.816 Y0.000 Z-0.800 I0.000 J0.000
    N24 G1 X-0.816 Y0.000 Z-0.850
    N25 G3 X-0.816 Y0.000 Z-0.850 I0.000 J0.000 final Z-0.850"
    N26 G1 Z0.039
    N27 (--- END OF CIRCULAR MILL ---)
    N28 (--- CYCLE END ---)
    N29 G00 Z0.1
    N30 G00 Z0.6 Return to initial Z
    N31 M09
    N32 M05
    N33 (END OF TOOL T0)
    This is for num control. If you have something else let me know

Similar Threads

  1. Replies: 4
    Last Post: 06-03-2014, 01:39 AM
  2. code needs some modification
    By Thomas Korena in forum Post Processors for MC
    Replies: 3
    Last Post: 08-29-2013, 06:03 AM
  3. g-code format modification app
    By Peter H in forum G-Code Programing
    Replies: 13
    Last Post: 03-02-2012, 01:11 AM
  4. need help with modification
    By ironofeden in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 12-23-2011, 06:21 PM
  5. New MCG's need modification
    By Swede in forum Servo Motors / Drives
    Replies: 3
    Last Post: 01-12-2005, 03:46 PM

Tags for this Thread

Posting Permissions

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