585,662 active members*
3,291 visitors online*
Register for free
Login

Thread: g-code hangs

Results 1 to 13 of 13
  1. #1
    Join Date
    Dec 2006
    Posts
    22

    g-code hangs

    I am having a problem with a g-code program and it's driving me bonkers.

    You run a graphic simulation, and the program runs through with no errors, everything looks fine. You run the program, the machine gets to line 440 and stops (just before it Z ups). No error messages, no warnings, nothing, just stops moving. What's really weird is that it does 2 pockets before this one that are basically the same and it runs through those fine.

    Line 330 is basically the same thing, and runs through with no issues.

    Code is below. I truncated it just for brevity.

    Any ideas?

    %
    O1000


    N100 G20
    N110 G0 G17 G40 G49 G80 G90
    ( ROUGH AND FINISH THE POCKETS )
    N120 T1 M6
    N130 G0 G90 G56 X.6177 Y-.7875 A0. S8000 M3
    N140 G43 H1 Z2.
    N150 Z.1
    N160 G1 Z-1.1436 F32.5
    N170 G41 D1 Y-.3125
    N180 G3 X.6172 Y-.312 I-.0005 J0.
    N190 X.6167 Y-.3125 I0. J-.0005
    N200 G1 Y-.7875
    N210 G3 X.6172 Y-.788 I.0005 J0.
    N220 G40 X.6177 Y-.7875 I0. J.0005
    N230 G0 Z.8564
    N240 Z2.
    N250 X1.2603
    N260 Z.1
    N270 G1 Z-.8786
    N280 G41 D1 Y-.3125
    N290 G3 X1.2598 Y-.312 I-.0005 J0.
    N300 X1.2593 Y-.3125 I0. J-.0005
    N310 G1 Y-.7875
    N320 G3 X1.2598 Y-.788 I.0005 J0.
    N330 G40 X1.2603 Y-.7875 I0. J.0005
    N340 G0 Z1.1214
    N350 Z2.
    N360 X1.9235
    N370 Z.1
    N380 G1 Z-.6704
    N390 G41 D1 Y-.3125
    N400 G3 X1.923 Y-.312 I-.0005 J0.
    N410 X1.9225 Y-.3125 I0. J-.0005
    N420 G1 Y-.7875
    N430 G3 X1.923 Y-.788 I.0005 J0.
    N440 G40 X1.9235 Y-.7875 I0. J.0005
    N450 G0 Z1.3296
    N460 Z2.
    N470 X2.6022
    N480 Z.1
    N490 G1 Z-.5206
    N500 G41 D1 Y-.3125
    N510 G3 X2.6017 Y-.312 I-.0005 J0.
    N520 X2.6012 Y-.3125 I0. J-.0005
    N530 G1 Y-.7875
    N540 G3 X2.6017 Y-.788 I.0005 J0.
    N550 G40 X2.6022 Y-.7875 I0. J.0005
    N560 G0 Z1.4794
    N570 Z2.

  2. #2
    Join Date
    Mar 2010
    Posts
    1852

    Re: g-code hangs

    You can not start or stop Cutter Comp (g41, g42 or g40) in a circular move. Must be in a straight line move. Lucky it gets that far.

    Mike
    Two Haas VF-2's, Haas HA5C, Haas HRT-9, Hardinge CHNC 1, Bother HS-300 Wire EDM, BobCAD V23, BobCAD V28

  3. #3
    Join Date
    Jan 2005
    Posts
    15362

    Re: g-code hangs

    baldysm

    If you are not using the cutter comp, in the program, then turn it off in your cam program, the cutter comp off/cancel ( G40 ) is being used incorrectly
    Mactec54

  4. #4
    Join Date
    Feb 2008
    Posts
    586

    Re: g-code hangs

    Definitely turn off comp with a straight line, preferably perpendicular. My Haas had a few times where the tool table got corrupted, and the machine would lock up. If fixing the program doesn't do it for you, I'd write down all my tool and fixture offsets, clear both tables and re-enter the values. That solved my problem 6 months ago, with no recurrence.

  5. #5
    Join Date
    Nov 2007
    Posts
    479

    Re: g-code hangs

    add a G00 or G01 in the G40 line.

  6. #6
    Join Date
    Mar 2010
    Posts
    1852

    Re: g-code hangs

    Quote Originally Posted by djr76 View Post
    add a G00 or G01 in the G40 line.
    The G40 line is a circular move with I and J. ?????????
    Two Haas VF-2's, Haas HA5C, Haas HRT-9, Hardinge CHNC 1, Bother HS-300 Wire EDM, BobCAD V23, BobCAD V28

  7. #7
    Join Date
    Sep 2014
    Posts
    18

    Re: g-code hangs

    I agree with first response, our try a g41 on the next z move after block 440.

  8. #8
    Join Date
    Nov 2007
    Posts
    479

    Re: g-code hangs

    Quote Originally Posted by Machineit View Post
    The G40 line is a circular move with I and J. ?????????

    I said to add a linear move within the G40 line, in which it would cancel out the circular move and the cutter comp.

  9. #9
    Join Date
    Feb 2005
    Posts
    303

    Re: g-code hangs

    My $0.02:
    You have some extremely small (.0005") moves in this program, which tells me your tool must be almost exactly the same size as the slots you are milling.
    This is undoubtedly the source of the error... (I also agree with previous statements... cancelling cutter comp on arc moves is a bad thing!)
    However... having so little room to move means the cutter comp never has time to "activate." Generally speaking, you should always have enough of a ramp-in for the control to be able to comp the tool. I usually use a linear move that is 2X the maximum expected comp.
    If the program is being generated by a CAM program, then my guess is that the post is having an issue with little or no lead-in because the tool and pocket are nearly the same size.
    If you remove the G41 and G40 calls completely, everything should work fine, but this will not allow you to comp your tool.
    I would recommend going with a smaller diameter tool, so you are able to make moves that are larger than .0005"!
    I don't know the sizes you are cutting, but the 8000RPM tells me it is a fairly small tool (~.093"?)
    If possible, I would go with a tool that is at least .015" smaller than the slot, and then as suggested above, ramp in and ramp out with linear moves, and call the G41 and G40 commands ONLY on those linear moves.

  10. #10
    Join Date
    Sep 2014
    Posts
    18

    Re: g-code hangs

    I very much agree with the Gyman response, also there is a online site called G WIZARD for a basic explanation of g and m codes for cnc programing. It could shed some light on this hang up.

  11. #11
    Join Date
    Sep 2014
    Posts
    18

    Re: g-code hangs

    Please reply, on how things end up, so the head banging can stop.

  12. #12
    Join Date
    Mar 2014
    Posts
    8

    Re: g-code hangs

    im having thie exact same issue as above ^^ ( baldsym )

  13. #13
    Join Date
    Mar 2003
    Posts
    2932

    Re: g-code hangs

    Quote Originally Posted by MachinistDan View Post
    im having thie exact same issue as above ^^ ( baldsym )
    Are you running the exact same program? If not, please post it here.

Similar Threads

  1. Mitsubishi Controler Hangs at Wait Code
    By avgjoe in forum Mazak, Mitsubishi, Mazatrol
    Replies: 0
    Last Post: 02-28-2014, 02:33 PM
  2. M03 hangs up CT4500MT
    By OdessaSlim in forum Mazak, Mitsubishi, Mazatrol
    Replies: 6
    Last Post: 08-24-2012, 10:51 PM
  3. madCAM hangs.
    By Odd Egeland in forum MadCAM
    Replies: 7
    Last Post: 03-19-2010, 01:00 PM
  4. Program Hangs!
    By WOODKNACK in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 9
    Last Post: 07-18-2003, 05:19 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
  •