CNC Programming

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

G40, G41 AND G42 - CUTTER RADIUS COMPENSATION

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:
To turn cutter radius compensation off, program: G40. It is OK to turn compensation off when it is already off.
Cutter radius compensation may be performed only if the XY-plane is active.
To turn cutter radius compensation on left (i.e., the cutter stays to the left of the programmed path when the tool radius is positive), program: G41 D~. To turn cutter radius compensation on right (i.e., the cutter stays to the right of the programmed path when the tool radius is positive), program: G42 D~. The D word is optional; if there is no D word, the radius of the tool currently in the spindle will be used. If used, the D number should normally be the slot number of the tool in the spindle, although this is not required. It is OK for the D number to be zero; a radius value of zero will be used.
G41 and G42 can be qualified by a P-word. This will override the value of the diameter of the tool (if any) given in the current tool table entry. It is an error if:
  • The D number is not an integer, is negative or is larger than the number of carousel slots;
  • The XY-plane is not active;
  • Cutter radius compensation is commanded to turn on when it is already on.
The behavior of the machining system when cutter radius compensation is ON is described in the chapter on Cutter Compensation. Notice the importance of programming valid entry and exit moves.
Note: The tool offsets must have been applied with a G43 H~ for compensation to work.

logoblog

No comments:

Post a Comment