G43 G-Code Command
G43 is a tool length offset command used in CNC machining. It tells the machine to adjust the position of the tool based on its length, ensuring that the tool is at the correct height above the workpiece. This is important because even small variations in tool length can result in significant errors in the finished part. G43 is typically used at the beginning of a machining program to set the tool length offset for each tool that will be used in the program.
How G43 G-Code Command Is Used
Here’s an example of G43 being used in a G-code program with comments and a spindle on command for 2000 rpm:
G00 X0 Y0 Z0 ; Rapid move to home position
M03 S2000 ; Spindle on at 2000 RPM
G43 H01 Z10 ; Tool length offset for tool 1, adjust Z position by 10mm [H01 refers to the tool number]
G01 X10 Y10 Z5 ; Linear move to starting position, with tool at correct height
G01 X20 Y20 Z-5; Linear move to first cutting position
G01 X30 Y30 Z-10; Linear move to second cutting position
M05 ; Spindle off
G00 X0 Y0 Z0 ; Rapid move back to home position
In this example, G43 is used to set the tool length offset for tool 1 (H01). This adjusts the Z position by the amount stored in the tool length offset page. This value is set by the operator when the tool is first loaded into the machine.
The program also shows the spindle being turned on at 2000 RPM with the M03 command, and turned off with the M05 command. The program then moves the tool to various cutting positions using G01 commands, and finally returns to the home position with a rapid move using G00.