Program code Comment
N40 $TC_DP2[1,1]=2 ; Cutting edge position
N50 $TC_DP3[1,1]=3. ; Geometry - length 1
N60 $TC_DP4[1,1]=4. ; Geometry - length 2
N70 $TC_DP5[1,1]=5. ; Geometry - length 3
N80 _CORVAL[0]=1.
N90 _CORVAL[1]=1.
N100 _CORVAL[2]=1.
N110 T1 D1 G18 G0 X0 Y0 Z0 ; ==> MCS position X1.5 Y5 Z4
N120 R1=SETTCOR(_CORVAL,"G",1,1)
N130 T1 D1 X0 Y0 Z0 ; ==> MCS position X2.5 Y6 Z5
N140 R3=$TC_DP3[1,1] ; = 5. = (3.000 + 2.*1.000)
N150 R4=$TC_DP4[1,1] ; = 5. = (4.000 + 1.000)
N160 R5=$TC_DP5[1,1] ; = 6. = (5.000 + 1.000)
N170 M30
In each axis, the tool length compensation should be 1 mm (N80 to N100). 1 mm is thus added
to the original length in lengths L2 and L3. Twice the compensation value (2 mm) is added to
the original tool length in L1, in order to change the total length by 1 mm as required. If the
positions approached in blocks N110 and N130 are compared, it can be seen that each axis
position has changed by 1 mm.
3.13.14 Read the assignment of the tool lengths L1, L2, L3 to the coordinate axes
(LENTOAX)
The LENTOAX function provides information about the assignment of tool lengths L1, L2 and
L3 of the active tool to the abscissa, ordinate and applicate. The assignment of abscissa,
ordinate and applicate to the geometry axes is affected by frames and the active plane (G17 -
G19).
Only the geometry component of a tool ($TC_DP3[<t>,<d>] to $TC_DP5[<t>,<d>]) is
considered, i.e. a different axis assignment for other components (e.g. wear) has no effect on
the result.
Syntax
<Status> = LENTOAX(<AxInd>, <Matrix>[, <Coord>])
Principle
LENTOAX(...): Predefined function to read the assignment of tool lengths L1, L2 and L3 of the
active tool to the coordinate axes
Alone in the block: Yes
Work preparation
3.13 Tool offsets
NC programming
830 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0