Skip to content

Commit 05047ee

Browse files
committed
qtvcp -probe routines - add back 'probe material z' function
Not sure how I remoived it last time
1 parent dc003a4 commit 05047ee

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

lib/python/qtvcp/widgets/probe_routines.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,41 @@ def probe_tool_z_diam(self):
529529
except Exception as e:
530530
return '{}'.format(e)
531531

532+
########################
533+
# material
534+
########################
535+
def probe_material_z(self):
536+
537+
try:
538+
# basic sanity checks
539+
if self.data_ts_max is None:
540+
return'Missing toolsetter setting: data_ts_max'
541+
542+
cmdList = []
543+
cmdList.append('G49')
544+
cmdList.append('G92.1')
545+
cmdList.append('G10 L20 P0 Z[#<_abs_z>]')
546+
cmdList.append('G91')
547+
cmdList.append('F {}'.format(self.data_search_vel))
548+
cmdList.append('G38.2 Z-{}'.format(self.data_ts_max))
549+
cmdList.append('G1 Z{} F{}'.format(self.data_latch_return_dist, self.data_rapid_vel))
550+
cmdList.append('F{}'.format(self.data_probe_vel))
551+
cmdList.append('G38.2 Z-{}'.format(self.data_latch_return_dist*1.2))
552+
cmdList.append('G1 Z{} F{}'.format(self.data_z_clearance, self.data_rapid_vel))
553+
cmdList.append('G90')
554+
555+
# call each command - if fail report the error and gcode command
556+
rtn = self.CALL_MDI_LIST(cmdList)
557+
if rtn != 1:
558+
return rtn
559+
h=STATUS.get_probed_position()[2]
560+
self.status_bh = h
561+
self.add_history('Probe Material Top',"Z",0,0,0,0,0,0,0,0,h,0,0)
562+
# report success
563+
return 1
564+
except Exception as e:
565+
return '{}'.format(e)
566+
532567
####################
533568
# Z rotation probing
534569
####################

0 commit comments

Comments
 (0)