aboutsummaryrefslogtreecommitdiffstats
path: root/nc_files/probe/basic_probe/macros/tool_sensor.ngc
blob: 4f9b4c8bafe6fa358578b10312faad82ca938c80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
o<tool_sensor> sub

#<max_probe> = #<_ini[TOOLSENSOR]maxprobe>
#<search_vel> = #<_ini[TOOLSENSOR]search_vel>
#<probe_vel> = #<_ini[TOOLSENSOR]probe_vel>
#<sensor_height> = #<_ini[TOOLSENSOR]height>
#<zero_height> = #1

(print, max_probe is #<max_probe>)
(print, search vel is #<search_vel>)
(print, probe vel is #<probe_vel>)
(print, sensor height is #<sensor_height>)
(print, zero height is #<zero_height>)

G21 (use metric units)
G53 G0 Z0 (raise spindle to Z0)
G53 G0 X#<_ini[TOOLSENSOR]x> Y#<_ini[TOOLSENSOR]y>
G49 (cancel tool offset)
G10 L20 P0 Z0 (clear current offsets)
G91 (switch to incremental mode)

; this section commented out for sim
;G38.2 Z[-#<max_probe>] F#<search_vel> (probe down)
;G1 Z4.0 (move up 4 mm)
;G4 P0.5 (pause for 0.5 sec.)
;G38.2 Z-6.0 F#<probe_vel> (probe down slower)

; this section used for sim, comment out otherwise
G1 Z-10 F#<search_vel>

G10 L20 P0 Z[#<sensor_height> - #<zero_height>]
G90 (absolute distance mode)
G53 G0 Z0 (move Z up to 0)
o<tool_sensor> endsub
M2
bues.ch cgit interface