/ nc_files / probe / basic_probe / macros / touch_plate.ngc
touch_plate.ngc
 1  o<touch_plate> sub
 2  
 3  #<max_probe> = #<_ini[TOOLSENSOR]maxprobe>
 4  #<search_vel> = #<_ini[TOOLSENSOR]search_vel>
 5  #<probe_vel> = #<_ini[TOOLSENSOR]probe_vel>
 6  #<touch_height> = #<_ini[TOOLSENSOR]touch>
 7  
 8  (print, max_probe is #<max_probe>)
 9  (print, search vel is #<search_vel>)
10  (print, probe vel is #<probe_vel>)
11  (print, touch height is #<touch_height>)
12  
13  G21 (use metric units)
14  G49 (cancel tool offset)
15  G10 L20 P0 Z0 (clear current offsets)
16  G91 (switch to incremental mode)
17  
18  ; this section commented out for sim
19  ;G38.2 Z[-#<max_probe>] F#<search_vel>  (probe down)
20  ;G1 Z1.0  (go up 1 mm)
21  ;G4 P0.5 (pause 0.5 sec.)
22  ;G38.2 Z-2 F#<probe_vel> (probe down slower)
23  
24  ; this section used for sim, comment out otherwise
25  G1 Z-10 F#<search_vel>
26  
27  G10 L20 P0 Z#<touch_height>  (store offset in offset table)
28  G90 (absolute distance mode)
29  G53 G0 Z0 (move Z up to 0)
30  o<touch_plate> endsub
31  M2