586,565 active members*
3,785 visitors online*
Register for free
Login
Results 1 to 16 of 16
  1. #1
    Join Date
    Mar 2016
    Posts
    9

    Need help with following NC G-code

    %
    O12345
    N5 G90 G80 G17 G40
    N10 T10 M6
    N85 G54 G0 X-0.5 Y-0.5 S2000 M3
    N90 G0 G43 H10 Z0.5
    N95 G1 Z-0.5 F15.0
    N100 G41 D10 X0.5
    N105 X0.5 Y0.5
    N110 G2 Y3.5 R5.0
    N115 X5.5 R8.0
    N120 Y0.5 R5.0
    N125 X0.5 R8.0
    N126 G1 X0.0 Y0.5
    N127 G49 H10
    N128 G0 Z0.5
    N130 G40 G0 X-0.5 Y-0.5
    N135 G91 G0 G28 Z0 M5
    N140 G28 X0.0 Y0.0
    N145 G90 G80 G17 G40
    N150 T10 M6
    N155 G54 G0 X2.0 Y2.0 S2000 M3
    N160 G0 G43 H10 Z0.5
    N165 G1 Z-0.35 F15.0
    N170 G42 D10 X2.0
    N175 X1.5 Y1.25
    N180 G2 Y2.75 R0.75
    N185 X4.5 R2.0
    N190 Y1.25 R0.75
    N200 X1.5 R2.0
    N202 G1 X2.0 Y2.0
    N203 G49 H10
    N204 G0 Z0.5
    N205 G40 G0 X-0.5 Y-0.5
    N210 G91 G0 G28 Z0 M5
    N215 G28 X0.0 Y0.0
    N220 G90 G80 G17 G40
    N222 T5 M6
    N225 G0 X1.5 Y2.0 S1000 M3
    N230 G43 H5 Z0.5
    N235 G99 G81 Z-0.5 R0.5 F10.0
    N240 X3.0 Y2.75
    N245 X4.5 Y2.0
    N250 X3.0 Y1.25
    N252 G49 H5
    N255 G91 G0 G28 Z0 M5
    N260 G28 X0.0 Y0.0
    N265 M30
    %

    I am unable to cut the inner profile correctly (lines N145 to N215).

    For some reason, it cuts outside the prescribed tool path. Cannot figure out the reason.

    Can anybody help?

  2. #2
    Join Date
    Mar 2016
    Posts
    9

    Re: Need help with following NC G-code

    Attachment 312776

    FYI, this is how the part is supposed to look like.

  3. #3
    Join Date
    Aug 2012
    Posts
    63

    Re: Need help with following NC G-code

    Need more info. But just a guess is that it is in right cutter comp(G42). If you are climb cutting the inside pocket it would be left comp.(G41)

  4. #4
    Join Date
    Mar 2016
    Posts
    9

    Re: Need help with following NC G-code

    Quote Originally Posted by Tony T View Post
    Need more info. But just a guess is that it is in right cutter comp(G42). If you are climb cutting the inside pocket it would be left comp.(G41)
    Hi,

    Thanks for your reply. Can you elaborate what you mean by "climb cutting"?

    Let me know what additional info you need.

    If I use G41 (left tool diameter compensation), then I thought, it would make the pocket bigger by cutting outside.

    Since, it is an inside pocket, and I am cutting clockwise, I am using it has to be offset to the right?

    Do you need dimensions for the profile?

  5. #5
    Join Date
    Mar 2016
    Posts
    9

    Re: Need help with following NC G-code

    Still trying to find the problem.

    G41 will keep the cutter to the left of the programmed tool path.
    G42 will keep the cutter to the right of the programmed tool path.

    I am always cutting clockwise (start at bottom-left corner).

    For outer profile, I thought it would then be G41.
    For inner profile, it would be G42.

    Correct me if I am wrong.

    Thanks,

  6. #6
    Join Date
    Mar 2016
    Posts
    9

    Re: Need help with following NC G-code



    The radius of the highlighted surface is 0.75 inch.

    I am using a 3/4 = 0.75 inch diameter tool to mill the pocket.

    Could there be any issue due to the dimensions?

  7. #7
    Join Date
    Mar 2016
    Posts
    9

    Re: Need help with following NC G-code

    Can someone try simulating the G-code (full code in the very first post) with a 3/4" end mill and comment if they are getting the part profile as shown in the attached picture?

    Thanks.

  8. #8
    Join Date
    Mar 2016
    Posts
    58

    Re: Need help with following NC G-code

    I have sections of my Cutter Comp DVD on youtube, put in my name, Heinz Putz, to see it.
    Your program looks right, but its good for you to learn a lot more.
    Heinz, doccnc.

  9. #9
    Join Date
    Oct 2006
    Posts
    38

    Re: Need help with following NC G-code

    It backplots "ok", would help to see a dimensional print or know much comp you are using.

    Try splitting N175 into two lines, first move N175 X1.5 N176 Y1.25

    Next would be give it a different H offset and flip the comp value sign.

  10. #10
    Join Date
    Mar 2016
    Posts
    9

    Re: Need help with following NC G-code

    Attachment 312880

    This is how it looks like in HSM Editor.

    It appears that tool radius compensation is not working in my case.

  11. #11
    Join Date
    Feb 2006
    Posts
    1792

    Re: Need help with following NC G-code

    N155 G54 G0 X2.0 Y2.0 S2000 M3
    N160 G0 G43 H10 Z0.5
    N165 G1 Z-0.35 F15.0
    N170 G42 D10 X2.0

    The two Xs are same. Allow some movement for incorporating radius compensation correctly at the start point of the cutting.

  12. #12
    Join Date
    Jan 2005
    Posts
    15362

    Re: Need help with following NC G-code

    Quote Originally Posted by atiwari View Post
    Attachment 312776

    FYI, this is how the part is supposed to look like.
    Why are you even using cutter comp in your program, in general your program is a mess, 90% of the time cutter comp is miss used, and misunderstood, how it should be used
    Mactec54

  13. #13
    Join Date
    Jan 2005
    Posts
    15362

    Re: Need help with following NC G-code

    Quote Originally Posted by sinha_nsit View Post
    N155 G54 G0 X2.0 Y2.0 S2000 M3
    N160 G0 G43 H10 Z0.5
    N165 G1 Z-0.35 F15.0
    N170 G42 D10 X2.0

    The two Xs are same. Allow some movement for incorporating radius compensation correctly at the start point of the cutting.
    To the rescue again sinha_nsit , it is as I said in my last post if they don't understand how cutter comp works they should not even attempt to use it

    Does HSM support Cutter Comp, it may not that is why it is showing what you are seeing,there may be something to turn on like checking a box to activate cutter comp
    Mactec54

  14. #14
    Join Date
    Mar 2016
    Posts
    9

    Re: Need help with following NC G-code

    Thank you all for your comments.

    I have continued to make my G-code work.

    Finally, after much effort, I think I was able to get it to work correctly. I am using CutViewer Mill for simulation.

    AutoDesk Inventor HSM is crap. There is an option to disable radius compensation. I removed it, it was still not able to show the part correctly. I have therefore concluded that Inventor HSM is not a good tool for simulating CNC G-codes.

    NCViewer is good, but I could not find a way to get a rendered stock.
    CutViewer Mill - although very basic - did my job.

    Here is how it looks like.
    Attachment 313072
    Attachment 313074

    Here is my G-code (it still may not be perfect - but it is apparently working - I welcome comments to improve my G-code).
    %
    N005 G90 G80 G17 G40
    N010 T10 M6
    N015 G54 G0 X-1.0 Y-1.0 S2000 M3
    N020 G0 G43 H10 Z0.5
    N025 G1 Z-0.25 F10.0
    N030 G41 G1 D10 X1.0 Y-1.0
    N035 G1 X0.5 Y0.5
    N040 G2 Y3.5 R5.0
    N045 X5.5 R8.0
    N050 Y0.5 R5.0
    N055 X0.5 R8.0
    N060 G1 X-1.5 Y1.0
    N065 G0 Z0.5
    N070 G40 G0 X0.0 Y0.0
    N075 G91 G0 G28 Z0 M5

    N080 G90 G80 G17 G40
    N085 T10 M6
    N090 G54 G0 X3.0 Y2.0 S2000 M3
    N095 G0 G43 H10 Z0.5
    N100 G1 Z-0.35 F10.0
    N105 G42 G1 D10 X2.0 Y2.0
    N110 X1.5 Y1.25
    N115 G2 Y2.75 R0.75
    N120 X4.5 R2.0
    N125 Y1.25 R0.75
    N130 X1.5 R2.0
    N140 G0 Z0.5
    N145 G40 G0 X0.0 Y0.0
    N150 G91 G0 G28 Z0 M5

    N155 G90 G80 G17 G40
    N160 T5 M6
    N165 G0 X1.5 Y2.0 S1000 M3
    N170 G43 H5 Z0.5
    N175 G99 G81 Z-0.5 R0.5 F10.0
    N180 X3.0 Y2.75
    N185 X4.5 Y2.0
    N190 X3.0 Y1.25
    N195 G0 Z0.5
    N200 G0 X0.0 Y0.0
    N205 G91 G0 G28 Z0 M5
    N210 M30
    %

    Thanks,

  15. #15
    Join Date
    Mar 2016
    Posts
    9

    Re: Need help with following NC G-code

    Quote Originally Posted by mactec54 View Post
    To the rescue again sinha_nsit , it is as I said in my last post if they don't understand how cutter comp works they should not even attempt to use it

    Does HSM support Cutter Comp, it may not that is why it is showing what you are seeing,there may be something to turn on like checking a box to activate cutter comp
    Yes, you are correct. By default, Inventor HSM does not show cutter compensation, There is a checkbox that needs to be unchecked.
    However, Inventor HSM does not render my G-code correctly (I have posted the full code in my previous comment).

  16. #16
    Join Date
    Feb 2015
    Posts
    6

    Re: Need help with following NC G-code

    Climb cutting is like a wheel rolling on the ground. The direction it is spins pulls the material towards it. Conventional cutting is the other way around. If you're on a commercial cnc mill, you probably want to be climb cutting. If you're not on a commercial machine, then look into it because backlash can jack up your tool.

    HSMWorks has issues with cutter compensation. It'll show the tool paths correctly, but I don't trust the solid model. Sometimes the tool paths in the backplotter are weird too, particularly during helical interpolation. It's good enough though, and I write all my code in it, including Haas canned cycles that it doesn't show correctly. Surprisingly it correctly runs M97 local subprograms, and correctly loops G91 movements, canned cycles and subprograms, and G01 radius and chamfers.

    You don't really need a movement to engage and disable cutter compensation, at least with a Haas, but it's a good idea. You can engage cutter compensation to the exact edge of the tool, but no less, so as ridiculous as it'd be, you could helix down into a hole the same size as the mill, which is functionally the exact same as drilling.

    If you're using cutter comp, it doesn't matter what size mill you use so long as it fits, like you can't stick a 1 inch radius mill into a corner with a .25 inch radius.

    I'm still getting used to cutter compensation too, and lately I've preferred to engage cutter comp above the material, and then helix down into the cut, and I'll do the opposite when I lead out. Even at the bottom of a hole, I'll arc to just shy of the other side of the hole while coming out of the hole. At least this way if I get an unexpected movement during g41/g42/g40, I'm just cutting air.

Similar Threads

  1. Replies: 51
    Last Post: 09-16-2020, 01:28 AM
  2. mach3 crashing with run of code/drilling holes through table with other code
    By normalform in forum Mach Software (ArtSoft software)
    Replies: 1
    Last Post: 07-28-2014, 03:38 AM
  3. corel.hpgl > sheetcam.tap > pronterface.g-code > slic3r.g.code> ramps 1.4 > H-BOT
    By thesignworks in forum Uncategorised CAM Discussion
    Replies: 0
    Last Post: 05-25-2014, 02:11 PM
  4. Converting Fanuc G code to Seimens 840D G code
    By Jasbinder in forum SIEMENS -> Sinumerik 802D/808D/810D/828D/840D
    Replies: 2
    Last Post: 02-20-2011, 05:02 PM
  5. Replies: 8
    Last Post: 12-15-2010, 09:32 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
  •