G-Code tutorial - Avoiding Obstacles Using G98 and G99 Codes

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.ย. 2024
  • In this G-code tutorial, the ‪@GCodeTutor‬ Marc Cronin explains how to avoid obstacles, such as clamps, using G98 and G99 codes.
    Not all parts can be held in a vise. Sometimes, the best way you keep your part locked to the table is by using a clamp.
    Depending on the features of your part, that clamp might turn out to be an obstacle for your tool and when that happens, you will want to make sure that you take that into account while you are programming your machining cycle, or the results might be a broken tool or worse.
    A typical example of this situation is a part that features multiple holes like the one shown in the video.
    When the clamp is positioned between two holes, you'll need to make sure that the tool retracts enough to avoid the clamp, and the best way to do it is by using the G98 and G99 commands within our drilling cycle (G81).
    By adding G98 to the drilling cycle, the program will tell the machine to retract to a safe position while the tool is moving between two holes to avoid the obstacle in the middle. Once the collision is avoided, you can add the G99 command to go back to the original Z value written in the first line of the drilling cycle.
    To learn more about canned cycles or improve your CNC programming skills, visit Gcodetutor.com (rb.gy/7yzqfn).
    Stay tuned for more machining videos!
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Recommended CNC programming books:
    Fanuc CNC Custom Macros - amzn.to/370yX0P
    CNC Programming Handbook - amzn.to/2MPxT9g
    CNC Programming Techniques - amzn.to/3aTS4el
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Practical Machinist is the largest and most engaged metalworking community across the web. With more than 160,000 registered members and 300,000+ social media followers, Practical Machinist is the easiest way to learn new techniques, get answers quickly, and discuss common challenges with your peers. Visit Practical Machinist today to join the community and start connecting with your peers.
    Become a Practical Machinist member (www.practicalm...)
    Like us on Facebook ( / practicalmachinist )
    Follow us on Instagram ( / practicalmachinist )
    Follow us on Twitter ( / prac_machinist )
    Connect with us on LinkedIn ( / practical-machinist )
    #Gcode #CNCprogramming #machining

ความคิดเห็น • 3

  • @Ddabig40mac
    @Ddabig40mac 3 ปีที่แล้ว +2

    The G98 requires the full Z-axis retract (to 15.0mm in this example) BEFORE the rapid traverse to the next hole location? Instead of the Z-axis retract to the R value (1.0mm) and then rapid traverse Z15.0 X50.0, because that could still crash, I want to clarify the machine behavior.

    • @LuisLopez-sp2kh
      @LuisLopez-sp2kh 3 ปีที่แล้ว

      that was exactly my experience when switching from G99 to G98 in the program, even though I switched before calling the next position (not saying this video is wrong or anything, i had that accident before watching this). what fixed it was cancelling the cycle when i was done with G99, call the next position which was higher and then start a new canning cycle. works great

  • @user-qw2rn6pb6h
    @user-qw2rn6pb6h 8 หลายเดือนก่อน

    The code is wrong. G98 should be on the line with the first X50, then G99 should be on the line with the second X50. G98 and G99 describe what happens AFTER the hole is drilled. The code should be as follows:
    G81 G91 G99 Z-12.0 R1.0 F50.0 (Drill first hole at X20.0, Y20.0, then return to R plane -> Z1.0mm)
    X50.0 G98 (Move +X50.0 at current height, 1.0, drill hole, then return to Initial plane -> Z15.0)
    X50.0 G99 (Move +X50.0 at current height 15.0, drill hole, then return to Retract plane -> Z1.0)
    Y40.0 ( Move +40.0 at current height, 1.0, drill hole, then return to retract plane)
    G80