Page 1 of 2 12 LastLast
Results 1 to 12 of 13

Thread: Any insight as to why this NC code caused a crash?

  1. #1
    Registered
    Join Date
    Sep 2011
    Location
    United Kingdom
    Posts
    9
    Downloads
    0
    Uploads
    0

    Any insight as to why this NC code caused a crash?

    Hello all,

    We have a Hurco VMX50 and on a recent job the centre drill gouged the part. Upon inspection we noticed that the G99 didn't return to the R-plane. The NC was generated by our SolidCAM post.

    The suspect NC code is:

    Code:
    G90 G54 G71
    T2 M6
    M01
    T2
    /(NEXT OP D-DRILL1)
    G0 X51. Y0. S1000 M03
    G0 Z50.
    M8
    G0 Z10.
    G99 G81 Z5. R75. F90
    G98 X0. Y51.
    G98 X-51. Y0.
    G98 X0. Y-51.
    G80
    M9
    M25
    G0 X0. Y150.
    M2
    We use Hurco's Basic NC rather than industry standard. I've gone through the code line by line (I'm an engineer rather than machine operator so NC isn't 2nd nature to me) and as far as I can tell it looks like it should work correctly. The part is essentially top-hat shaped and we're drilling around the rim so it needs to retract quite far before positioning to the next hole but it took a short cut and gouged the side. The remaining three holes positioned by G98's retracted to the R-plane correctly though.

    We've had several modifications to our machining centre; our WinMax software updated to the latest a few (minor) revisions to our SolidCAM post and its the first job where we've needed such a large retract so my first objective is to determine where the problem lies as it could be with the Hurco, parameter settings, the post or operator error (incorrect tool height etc!).

    The only thing that looks suspect to me, is the G98's in the G99 canned cycle for the 3 remaining hole positions. However I've checked the generated NC against a post we had from 6 months ago and it produced the same code so I'm guessing this is correct?

    Of course, our operator is on holiday today (I on'y found that out this morning!) so I won't be able to try anything on the machine until tomorrow but if the NC code is correct then we at least know where to focus our efforts.

    Thanks in advance,
    David


  2. #2
    Registered
    Join Date
    Oct 2008
    Location
    USA
    Posts
    19
    Downloads
    0
    Uploads
    0

    G99 & G98 programming

    Hello,

    If this Hurco has a Fanuc CNC or programs using Fanuc type code

    G0 Z10. <=== Initial height Z10.
    G99 G81 Z5. R75. F90 <=== G99 retract to R level of 75.
    G98 X0. Y51. <=== G98 retract to initial height of Z10.
    G98 X-51. Y0. <=== G98 "
    G98 X0. Y-51. <=== g98 "
    G80

    G98 & G99 can be used in the drill cycle to switch between Initial height
    retract (G99) R75. and reference height retract (G99) Z10.

    Most Hurco CNCs use multiple Z codes in the CYCLE block for depths

    Example Hurco deep hole cycle with
    DEPTH = Z-.5
    INCR = Z.1
    REF = Z.25

    N26G83X.5Y.5Z-.5Z.1Z.25F12.

    Best regards,
    Larry
    larry@NCDataServices.com


  3. #3
    Registered
    Join Date
    Oct 2008
    Location
    USA
    Posts
    19
    Downloads
    0
    Uploads
    0
    David,

    P.S. You canfix the problem two ways:

    1) Change the initial approach move from Z10. to Z75. (same as the R plane)

    2) Remove the G98 from the drill positions or change them to G99

    Best regards,
    Larry
    Larry@NCDataServices.com


  4. #4
    Registered
    Join Date
    Sep 2011
    Location
    United Kingdom
    Posts
    9
    Downloads
    0
    Uploads
    0
    Hi, Its just gone 5:30 so I'm about to be kicked out the office, but thanks for the reply. I believe that with Basic NC the Hurco interprets the G99 slightly differently to the industry standard.

    I'll single step through the code on the Hurco tomorrow with our operator and report exactly what the machine is doing.

    Thanks for the reply


  • #5
    Registered
    Join Date
    May 2004
    Location
    United States
    Posts
    4,519
    Downloads
    0
    Uploads
    0
    Why switch between G99 and G98? If you know G98 is working correctly, use it.
    http://www.kirkcon.com/


  • #6
    Registered
    Join Date
    Sep 2011
    Location
    United Kingdom
    Posts
    9
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by txcncman View Post
    Why switch between G99 and G98? If you know G98 is working correctly, use it.
    We didn't write the post-processor that generates the NC code, SolidCAM did so I don't know why they switch between G98 and G99. Its been working ok for a year and a half (we've done lots of drill operations in that time) so I'm trying to track down what has changed.

    Our machinist refuses to talk with SolidCAM, only Hurco support, so I'm stuck in the middle playing Chinese whispers with everyone trying to work out what happened.

    The original post solidCAM provided didn't have that G0 Z10, so it calculated the R values based on the 10mm clearance height (defined in the CAM software) but its initial point was actually the tool start position (Z50) so it drilled everything 40mm too high.

    I've just realised that the help files I've been using have been from the old software too! I'll go get the new ones and see if it handles the G-codes differently. - EDIT: They're exactly the same

    Basic NC (BNC) is a Hurco specific variant of standard Fanuc NC I believe so they could have made changes to it between revisions of their software I guess? Unlikely though.

    Thanks for your suggestions so far

    More info on the part with the SolidCAM toolpath shown:
    Last edited by Brushtec_DB; 05-30-2012 at 04:08 AM. Reason: more info on problem


  • #7
    Registered
    Join Date
    May 2004
    Location
    United States
    Posts
    4,519
    Downloads
    0
    Uploads
    0
    This is why programmers need to learn to write G-code by hand, correctly, BEFORE relying on software to do it incorrectly.
    http://www.kirkcon.com/


  • #8
    Registered
    Join Date
    Sep 2011
    Location
    United Kingdom
    Posts
    9
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by txcncman View Post
    This is why programmers need to learn to write G-code by hand, correctly, BEFORE relying on software to do it incorrectly.
    haha, agreed, you pay for a post to be written, you expect it to be correct! We've worked with SolidCAM quite a lot to fix the problems but you can only fix them when you come across them as they don't provide an exemplar suite of routines to check that everything works as it should out the box. Another problem is that I only have to get my hands dirty with NC when things go wrong and since it works most of the time I tend to forget the exact definition of a BNC G98 vs a ISNC G98 etc.

    Anyway, we've worked out that the Hurco Basic NC canned cycles can't handle jumping over areas (you need the industry standard for that) or you have to end the cycle, re position and start again. It was all there in the manual pages, but I had some preconceptions that I think clouded my interpretation of it!

    We must have just been lucky that this hasn't happened before now as most of our jobs are mould tools so the drilling operations are all done first into virgin stock so the retract height is always the same.

    Since we're using a computer generated NC program anyway and some of the 3D moulds have over 1,500,000 lines of code anyway (you can't manually check that many!) I see no reason for us to even use canned cycles. Instead of G98's and G99's with R planes I plan on getting the post modified to put in rapid moves to the heights we want then call our G81 drilling cycle from our safety height (usually +2mm off the job). It also means any simulator will display the correct tool path as G0's and G81's are universal.

    Our machinist seems against this approach, but can't give a good reason why! He'd rather we switch to industry standard but we're then essentially starting over again and I don't want to be solving the same NC problems again but this time for ISNC rather then BNC!

    Does this seem reasonable? The Canned cycle from before would then become similar to this:


    [quote]
    Code:
    G0 X51. Y0 S1000 M03    <- rapid to position and set up spindle
    G0 Z50                         <- rapid to tool start position
    M8                                         <- coolant on
    G0 Z10.                                 <- rapid to clearance plane Z +10mm
    G0 Z-65.                               <- rapid to safety height (+2mm off the job)
    G81 Z5. F90                         <- drill operation
    G0 Z10                                  <-rapid to clearance plane
    G0 X0. Y51.                          <- rapid to next hole position
    G0 Z-65.                               <- rapid to safety height (+2mm off the job)
    G81 Z5. F90                         <- drill operation
    G0 Z10                                  <- rapid to clearance plane
    G0 X-51. Y0.                        <- rapid to next hole position
    G0 Z-65.                               <- rapid to safety height (+2mm off the job)
    G81 Z5. F90                         <- drill operation
    G0 Z10                                  <- rapid to clearance plane
    G0 X0. Y-51.                        <- rapid to next hole position
    G0 Z-65.                               <- rapid to safety height (+2mm off the job)
    G81 Z5. F90                         <- drill operation
    G0 Z10                                  <- rapid to clearance plane
    M9                                         <- coolant off
    certainly not as efficient as the previous one but from programming the CAM job, its exactly the same, and the physical moves of the machine are then exactly what we want.

    Thanks.
    David


  • #9
    Registered
    Join Date
    May 2004
    Location
    United States
    Posts
    4,519
    Downloads
    0
    Uploads
    0
    To officially end a canned drill cycle in common G-code, G80 must be commanded. Otherwise, each line before G80 will execute another drill point. So, where you put Z10., the machine will rapid to Z10 then drill again. Try:

    G81 Z5. F90
    G80
    G0 Z10
    G0 X0. Y51.
    G0 Z-65.
    G81 Z5. F90
    G80
    G0 Z10
    G0 X-51. Y0.
    G0 Z-65.
    G81 Z5. F90
    G80
    G0 Z10
    G0 X0. Y-51.
    G0 Z-65.
    G81 Z5. F90
    G80
    G0 Z10

    But even that is still wonky because you have it rapid to negative Z-65. then drilling to positive Z5. If the original code was working except for the G99 on the first line, why not just change that G99 to G98?

    Your original code did not even look right to me:

    G0 Z50. <Rapids to 50. above part zero
    M8
    G0 Z10. <Rapids to 10. above part zero
    G99 G81 Z5. R75. F90 <Rapids to 75. above part zero (R) and drills to 5. above part zero

    Do you have part zero set as the bottom of the part?

    If your part zero is the bottom and your part (obstacle) is 70 above zero, then I think the code should read:

    G0 Z75.
    M8
    G98 G81 Z5. R10. F90
    http://www.kirkcon.com/


  • #10
    Registered
    Join Date
    Jan 2012
    Location
    US
    Posts
    182
    Downloads
    0
    Uploads
    0
    "Our machinist refuses to talk with SolidCAM, only Hurco support, so I'm stuck in the middle playing Chinese whispers with everyone trying to work out what happened".



    And who is the boss??


  • #11
    Registered
    Join Date
    Sep 2011
    Location
    United Kingdom
    Posts
    9
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by txcncman View Post
    To officially end a canned drill cycle in common G-code, G80 must be commanded. Otherwise, each line before G80 will execute another drill point.
    Thanks, I'll make sure to check that with the new post.

    Quote Originally Posted by txcncman View Post

    Your original code did not even look right to me:

    Do you have part zero set as the bottom of the part?
    Our part 0 is usually (and was in this case) top centre, its a caveat of the Basic NC (BNC) for hurco, you described the Industry Standard behaviour I think. Form the Hurco NC manual,

    "For BNC, the R parameter is an incremental distance from the initial Z level. Use this code to reduce the returned distance between locations during canned cycles"

    "For ISNC, the R parameter is an absolute Z level when in G90 mode or an incremental negative Z distance in G91 mode".

    Don't ask my why, but BNC doesn't permit signed numbers in canned cycles so this is maybe why its done like that, or possibly just historic before they adopted the standardised approach.

    The original code did work, it just retracted to the R-plane at Z-65 which crashed into the job moving between holes.

    Thanks again for your help and suggestions.

    Dak1, its really not a great situation and the boss is getting steadily more annoyed with his insubordination but the machinist is close to retirement and the work still gets done so he's somewhat sympathetic towards his cause think!


  • #12
    Registered
    Join Date
    Sep 2003
    Location
    chester,england.uk
    Posts
    158
    Downloads
    0
    Uploads
    0
    I've got an old hurco with ultimax 3 and come accross similar problems when drilling holes in pockets where I have to jump over a web to go to the next hole and so on. I've always got round it by treating each hole as an individual cycle. Effectively ending up with a series of canned cycles, one for each hole, as opposed to just one canned cycle and a series of X Y positions to go to. It's a bit of a faf but it works.

    Programming offline I would set the reference height to 2mm above the job and then the material top to 2mm above the start of the hole to be drilled then just add 2mm to the drill depth. Granted mines a much older version than yours that doesn't support G54 or G98 but it does sort the problem out.

    Maybe this will help.


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. Looking for advice and insight on some machines
      By silverdrgn in forum General Metal Working Machines
      Replies: 11
      Last Post: 06-07-2012, 09:57 PM
    2. Damage caused by crash
      By partsman in forum Haas Mills
      Replies: 6
      Last Post: 03-02-2012, 02:59 PM
    3. Any insight greatly appreciated!
      By JKane66 in forum Servo Motors and Drives
      Replies: 0
      Last Post: 06-17-2011, 02:43 PM
    4. the straw that caused the camel to go cnc...
      By headsmess in forum I.C. Engines
      Replies: 3
      Last Post: 03-27-2011, 12:24 AM
    5. Newbie- Looking for electronic insight
      By xtremein in forum General Electronics Discussion
      Replies: 8
      Last Post: 06-26-2008, 08:55 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.