G-codes for milling
G-codes are codes used in CNC control systems that guide the movements and functions of machine tools. They are essential in programming machine tools and enable precision machining of complex geometries. It's important to note that there might be differences between various control systems, so some G-codes might vary depending on the specific machine tool.
Common G-Codes in Milling
G00 – Rapid Movement
- Allows the machine tool to move quickly to a desired location without the tool touching the material. It is usually used to move the tool from one place to another as quickly as possible.
G01 – Linear Feed Movement
- The tool moves linearly in a desired direction at a defined feed rate. Generally used in the actual machining process, such as cutting or engraving.
G02 – Circular Arc Movement Clockwise
- Enables the tool to move in a curved path clockwise to a defined level of a circular segment.
G03 – Circular Arc Movement Counterclockwise
- Enables the tool to move in a curved path counterclockwise to a defined level of a circular segment.
G04 – Dwell
- A programmed stop or pause before continuing machining. Used to stop the machine for a specific time during a particular part of machining.
G09 – Exact Stop
- Stops the tool completely and precisely at the desired point before executing the next command.
G10 – Setting Correction Values
- Used for automatically setting tool compensation values or coordinate values.
G17 – XY Plane Selection
- Specifies that the machining plane is in the XY plane.
G18 – ZX Plane Selection
- Specifies that the machining plane is in the ZX plane.
G19 – YZ Plane Selection
- Specifies that the machining plane is in the YZ plane.
G20 – Inch Units
- Specifies that all units used in programming are in inches.
G21 – Metric Units
- Specifies that all units used in programming are in millimeters.
G27 – Reference Position Return Check
- Checks and ensures the tool's correct return to the reference position.
G28 – Return to Reference Position
- Automatically guides the tool to the machine's reference position.
G29 – Return from Reference Position
- Returns the tool to its previous location after leaving the reference position.
G30 – Return to 2nd, 3rd, and 4th Reference Position
- Allows the tool to return to the machine's second, third, or fourth programmed reference position.
G33 – Threading
- Used in programmable threading.
G40 – Tool Radius Compensation Cancellation
- Cancels tool radius compensation.
G41 – Tool Radius Compensation Left
- Enables tool radius compensation to the left during machining.
G42 – Tool Radius Compensation Right
- Enables tool radius compensation to the right during machining.
G43 – Tool Length Offset + Direction
- Used to add tool length compensation.
G44 – Tool Length Offset - Direction
- Used to reduce tool length compensation.
G49 – Tool Length Offset Cancellation
- Cancels tool length offset.
G53 – Return to Machine Coordinate System
- Returns the tool directly to the machine's original coordinate system.
G54 – G59 – Work Piece Coordinate System Selection
- Enables selection and use of workpiece-specific coordinate systems.
G65 – Subprogram Call
- Calls a pre-programmed subroutine to be executed.
G73 – Drilling Cycle, Deep Hole Drilling
- Programmable deep hole drilling cycle.
G74 – Left-Hand Threading
- Used in left-hand threading.
G76 – Fine Boring Cycle
- Fine boring machining cycle.
G80 – Cancel Canned Cycle
- Cancels the active canned cycle.
G81 – Drilling Cycle, Drilling
- Simple drilling cycle.
G82 – Drilling Cycle, Countersinking
- Drilling cycle with tool stop.
G83 – Drilling Cycle, Deep Hole Drilling
- Deep hole drilling cycle with interruptions.
G84 – Drilling Cycle, Tapping
- Drilling cycle with tapping.
G85 – Drilling Cycle, Boring
- Boring cycle without interruption.
G86 – Drilling Cycle, Boring with Spindle Stop
- Boring cycle with spindle stop.
G87 – Drilling Cycle, Back Boring
- Drilling cycle with back cutting.
G88 – Drilling Cycle, Boring with Dwell
- Boring cycle with tool dwell.
G89 – Drilling Cycle, Boring with Dwell
- Boring cycle with tool dwell.
G90 – Absolute Programming
- Program movements are defined in relation to a single absolute zero point.
G91 – Incremental Programming
- Program movements are defined in relation to the previous point, making each command independent.
G92 – Zero Point Setting
- Defines a new zero point for programming.
G94 – Feed in mm/min
- Specifies feed rate in millimeters per minute.
G95 – Feed in mm/rev
- Specifies feed rate in millimeters per spindle revolution.
G96 – Constant Cutting Speed
- Enables maintaining a constant cutting speed.
G97 – Constant Spindle Speed
- Enables maintaining a constant spindle speed.
G98 – Return to Safety Level during Cycle Movements (Initial Level)
- Returns the tool to a safety level during a cycle.
G99 – Return to Raise Level during Cycle Movements (R-Level)
- Returns the tool to the raise level during a cycle.
Attention
It's important to note that there can be differences in the use and meanings of G-codes between different control systems and machine tools. Any specific machining task may require specialized, tailored control signals and parameter settings to precisely match the machine and software characteristics. Therefore, it is advisable to always check the specific machine's manual and documentation to make sure you're using the correct codes and methods.