Tnnn/Pnnn
This code allows you to measure the Tool offset and diameter compensation* from a tool in any turret position and save that data to a different tool number and allows you to measure diameters of very short tooling (minimum of 0.010 inches).
​
This allows you to have more tools length and diameter offsets saved than there are turret positions. This comes in handy when you have more tools than turret positions (9+1 probe) such as on our TM1P.
​
This can be fully implemented in G-Code generates simply by using an M06 Tnnn call for the turrent postion, then a G43 Hnnn call for the offset saved for that tool ie for turrent postion 2 tool 30.
M06 T02 (call up the tool in turret position 2)
G43 H30 (Use the length offset from tool number 30)
​
*note for this to work modification to a P9000 (enable setting 23) code must be made, or it will try to make a tool change mid process for the diameter measurement. This is why I added a #10010=666. line. I added a condition that if that variable equals 666 then skip the tool change, otherwise continue as normal. I chose that number because there is no reason for me to ever use it otherwise!
O01000(This files is designed to measure a tool in one turret postion)
(and store the data in a different tools station)
(user input)
#10001 = 1 (tool in what turret postion)
#10002 = 11 (tool number to store data)
#10003 = 4.4 (estimated tool length)
#10004 = 0.375 (estimated tool diameter)
#10005 = 0.01 (estimated edge height, min 0.01)
#10006 = 4 (tool type,1 DRILL, 2 TAP, 3 SHELL, 4 ENDMILL,5 SPOT,6 BALL)
#10007 = 3 (measurment type, 1-NON ROTATING LENGTH, 2 ROTATING LENGTH, 3-LENGTH AND DIAMETER)
​
(End user input)
​
IF[#10007 EQ 1.0] GOTO10
IF[#10007 EQ 2.0] GOTO20
IF[ #10007 EQ 3.0] GOTO30
N10( SET TOOL LENGTH, NON-ROTATING )
G00 G17 G40 G49 G80 G90
T#10001 M06
G65 P9995 A0. B#10006 C2. T#10002 E#10003 D#10004
M30
​
N20( PROBE TOOL HEIGHT, ROTATING )
G00 G17 G40 G49 G80 G90
T#10001 M06
G65 P9995 A0. B#10006 C1. T#1002 E#10003 D#10004
M30
​
N30( PROBE TOOL LENGTH AND DIAMETER - ROTATING )
G00 G17 G40 G49 G80 G90
T#10001 M06
#10010= 666.
G65 P9995 A0. B#10006 C3. T #10002 E#10003 D#10004 K#10005
#10010= 0.
M30