23 lines
447 B
Plaintext
23 lines
447 B
Plaintext
o<touch_x> sub
|
|
|
|
#<set_mt_x> = #1 (current x axis position)
|
|
#<gage_thickness> = #2 (=0.0000)(gage thickness, gage block or paper thickness etc.)
|
|
|
|
G8
|
|
|
|
#<total_x_position> = [#<set_mt_x> + #<gage_thickness>]
|
|
|
|
#<current_tool_x_position> = #5420
|
|
|
|
#<touch_x> = [#<current_tool_x_position> - #<total_x_position>]
|
|
|
|
G10 L1 P #5400 X [#<touch_x>] (5400 = tool number)
|
|
|
|
T #5400 G43 (enable tool length offset)
|
|
|
|
G7
|
|
|
|
o<touch_x> endsub
|
|
|
|
M2 (end program)
|