
13. Program Support Functions
13.5 User Macro Specifications
325
Tool compensation
Tool data can be read and set using the variable numbers.
Variable number range
Type 1
Type 2
#10001 to #10000 + n
#2001 to #2000 + n
(Length dimension)
#11001 to #11000 + n
#2201 to #2200 + n
(Length wear)
#16001 to #16000 + n
#2401 to #2400 + n
(Radius dimension)
#17001 to #17000 + n
#2601 to #2600 + n
(Radius wear)
"n" in the table indicates the tool No.
The maximum value of "n" matches the number of tool offset sets.
Numbers in the #10000 order have the equivalent function to that in the #2000 order, however, the
maximum value of "n" for #2000 order is "200".
When the number of tool offset sets is larger than "200", use the variables of #10000 order.
The tool compensation data are configured as data with a decimal point in the same way as for
other variables. Consequently, programming as "#10001 = 1000;" results the setting "1000.000" in
the tool compensation data.
#101=1000;
#10001=#101;
#102=#10001;
#101=1000.0
#102=1000.0
H1=1000.000
After
execution
Programming example
Common variables
Tool compensation data
(Example 1)
Calculation and tool offset data setting
# 1
H 1
#5063
Sensor
G31
G00
Reference position return
Tool change (spindle T01)
Start point memory
Rapid traverse to safety
position
Skip measurement
Measured distance
calculation and tool
compensation data setting
G28 Z0 T01 ;
M06 ;
#1=#5003 ;
G00 Z-500. ;
G31 Z-100. F100;
#10001=#5063-#1 ;
(Note)
In this example, no consideration is given to the delay in the skip sensor signal.
#5003 is the Z axis start point position and #5063 is the Z axis skip coordinates, and
indicated is the position at which the skip signal is input while G31 is being executed.