Smithy CNC Mills User Manual
Page 86

Throughout this unit you will find ocasional references to cannonical functions
where these are necessary for the reader to understand how a tool offset works
in a specific situation. These references are intended to give the reader a sense
of sequence rather than requiring the reader to understand the way that
cannonical functions themselves work within the EMC.
9.3 Tool Length Offsets
Tool length offsets are given as positive numbers in the tool table. A tool length
offset is programmed using G43 Hn, where n is the desired table index. It is
expected that all entries in the tool table will be positive. The H number is
checked for being a non-negative integer when it is read. The interpreter
behaves as follows.
1. If G43 Hn is programmed, A USE_TOOL_LENGTH_OFFSET(length) function
call is made (where length is the value of the tool length offset entry in the
tooltable whose index is n), tool_length_offset is reset in the machine settings
model, and the value of current_z in the model is adjusted. Note that n does
not have to be the same as the slot number of the tool currently in the spindle.
2. If G49 is programmed, USE_TOOL_LENGTH_OFFSET(0.0) is called,
tool_length_offset is reset to 0.0 in the machine settings model, and the value
of current_z in the model is adjusted. The effect of tool length compensation is
illustrated in the screen shot below. Notice that the length of the tool is sub-
tracted from the z setting so that the tool tip appears at the programmed set-
ting.† You should note that the effect of tool length compensation is immediate
when you view the z position as a relative coordinate but it does affect actual
machine position until you program a z move.
Test tool length program.
Tool #1 is 1 inch long.
N01 G1 F15 X0 Y0 Z0
N02 G43 H1 Z0 X1
N03 G49 X0 Z0
N04 G0 X2
N05 G1 G43 H1 G4 P10 Z0 X3
N06 G49 X2 Z0
N07 G0 X0
SmithyCNC Programmer’s Reference Manual: Tool File & Compensation
SmithyCNC Programmer’s Reference Manual: Tool File and Compensation
9-4
Figure 9-1 Test Tool Length Program