CNC Programming

CNC | C | C++ | Assembly | Python | R | Rust | Arduino | Solidworks | Embedded Systems

Table Of Contents:
  1. G-code Table
  2. G00 - Rapid Linear Motion
  3. G01 - Linear Motion at Feed Rate
  4. G02 and G03 - Arc at Feed Rate
  5. G04 - Dwell
  6. G10 - Coordinate System Data Tool and Work Offset Tables
  7. G17, G18 and G19 - Plane Selection
  8. G20 and G21 - Length Units
  9. G28 and G30 - Return to Home
  10. G28.1 - Reference Axes
  11. G40, G41 and G42 - Cutter Radius Compensation
  12. G43, G44 and G49 - Tool Length Offsets
  13. G47 - Engrave Sequential Serial Number
  14. G53 - Move in Absolute Coordinates
  15. G54 to G59 and G59 P~ - Select Work Offset Coordinate System
  16. G61 and G64 - Set Path Control Mode
  17. G73 - Canned Cycle - High Speed Peck Drill
  18. G80 - Cancel Modal Motion
  19. G81 to G89 - Canned Cycles
  20. G90 and G91 - Distance Mode
  21. G92, G92.1, G92.2 and G92.3 - G92 Offsets
  22. G93, G94 and G95 - Set Path Control Mode
  23. G98 and G99 - Canned Cycle Return Level 
Details:
(a) For linear motion at feed rate (for cutting or not), program: G01 X~ Y~ Z~ A~, where all the axis words are optional, except that at least one must be used. The G01 is optional if the current motion mode is G01. This will produce coordinated linear motion to the destination point at the current feed rate (or slower if the machine will not go that fast).


Example:
  • G01 Example
    (Sample Program G01EX2:)
    (Workpiece Size: X4, Y3, Z1)
    (Tool: Tool #3, 3/8" Slot Drill)
    (Tool Start Position: X0, Y0, Z1)

    N2 G90 G80 G40 G54 G20 G17 G50 G94 G64 (safety block)
    N5 G90 G20 (Block #5, absolute in inches)
    N10 M06 T3 G43 H3 (Tool change to Tool #3)
    N15 M03 S1250 (Spindle on CW at 1250 rpm)
    N20 G00 X1.0 Y1.0 (Rapid over to X1,Y1)
    N25 Z0.1 (Rapid down to Z0.1)
    N30 G01 Z-0.125 F5 (Feed down to Z–0.125 at 5 ipm)
    N35 X3 Y2 F10 (Feed diagonally to X3,Y2 at 10 ipm)
    N40 G00 Z1.0 (Rapid up to Z1)
    N45 X0.0 Y0.0 (Rapid over to X0,Y0)
    N50 M05 (Spindle off)
    N55 M30 (Program end)

    In the sample program, several different examples of the G01 command are shown:
    1. The first G01 command (in N30) instructs the machine to plunge feed the tool below the surface of the part by 0.125 in. at a feedrate of 5 in./min.
    2. N35 is a two-axis (X and Y) diagonal feed move, and the linear feedrate is increased to 10 ipm.
    Note: Because there is contact between the cutting tool and the workpiece, it is imperative that the proper spindle speeds and feedrates be used. It is the programmer's responsibility to ensure acceptable cutter speeds and feeds.

logoblog

No comments:

Post a Comment