Skip to content

Commit c04df77

Browse files
committed
qtvcp -fix max_z_travel setting in basic/versa probe
basic probe ignored max_Z_travel, versa never offered it. Both honour it now when probe_down is run
1 parent 793f147 commit c04df77

6 files changed

Lines changed: 377 additions & 312 deletions

File tree

lib/python/qtvcp/widgets/basic_probe.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def __init__(self, parent=None):
6767
# these parameters are sent to the subprogram
6868
self.parm_list = ['probe_diam',
6969
'max_travel',
70+
'max_z_travel',
7071
'xy_clearance',
7172
'z_clearance',
7273
'extra_depth',
@@ -125,7 +126,7 @@ def homed_on_status():
125126
self.lineEdit_probe_vel.setText(self.PREFS_.getpref('Probe feed', '10', str, 'PROBE OPTIONS'))
126127
self.lineEdit_search_vel.setText(self.PREFS_.getpref('Probe search', '10', str, 'PROBE OPTIONS'))
127128
self.lineEdit_max_travel.setText(self.PREFS_.getpref('Probe max travel', '10', str, 'PROBE OPTIONS'))
128-
self.lineEdit_max_z.setText(self.PREFS_.getpref('Probe max z', '2', str, 'PROBE OPTIONS'))
129+
self.lineEdit_max_z_travel.setText(self.PREFS_.getpref('Probe max z', '2', str, 'PROBE OPTIONS'))
129130
self.lineEdit_extra_depth.setText(self.PREFS_.getpref('Probe extra depth', '0', str, 'PROBE OPTIONS'))
130131
self.lineEdit_latch_return_dist.setText(self.PREFS_.getpref('Probe step off', '10', str, 'PROBE OPTIONS'))
131132
self.lineEdit_xy_clearance.setText(self.PREFS_.getpref('Probe xy clearance', '10', str, 'PROBE OPTIONS'))
@@ -145,7 +146,7 @@ def _hal_cleanup(self):
145146
self.PREFS_.putpref('Probe feed', self.lineEdit_probe_vel.text(), str, 'PROBE OPTIONS')
146147
self.PREFS_.putpref('Probe search', self.lineEdit_search_vel.text(), str, 'PROBE OPTIONS')
147148
self.PREFS_.putpref('Probe max travel', self.lineEdit_max_travel.text(), str, 'PROBE OPTIONS')
148-
self.PREFS_.putpref('Probe max z', self.lineEdit_max_z.text(), str, 'PROBE OPTIONS')
149+
self.PREFS_.putpref('Probe max z', self.lineEdit_max_z_travel.text(), str, 'PROBE OPTIONS')
149150
self.PREFS_.putpref('Probe extra depth', self.lineEdit_extra_depth.text(), str, 'PROBE OPTIONS')
150151
self.PREFS_.putpref('Probe step off', self.lineEdit_latch_return_dist.text(), str, 'PROBE OPTIONS')
151152
self.PREFS_.putpref('Probe xy clearance', self.lineEdit_xy_clearance.text(), str, 'PROBE OPTIONS')
@@ -255,7 +256,7 @@ def probe_help_next_clicked(self):
255256

256257
def probe_btn_clicked(self, button):
257258
cmd = button.property('probe')
258-
# print("Button clicked ", cmd)
259+
#print("Button clicked ", cmd)
259260
self.get_parms()
260261
self.start_probe(cmd)
261262

@@ -307,6 +308,7 @@ def clear_all(self):
307308
# Helper functions
308309
def get_parms(self):
309310
self.send_dict = {key: self['lineEdit_' + key].text() for key in (self.parm_list)}
311+
#print(self.send_dict)
310312
for key in ['allow_auto_zero', 'allow_auto_skew', 'cal_avg_error', 'cal_x_error', 'cal_y_error']:
311313
val = '1' if self[key].isChecked() else '0'
312314
self.send_dict.update( {key: val} )

lib/python/qtvcp/widgets/probe_routines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ def probe_outside_xy_center(self):
753753
# End at Z_clearance above workpiece
754754
def probe_down(self):
755755
ACTION.CALL_MDI("G91")
756-
c = "G38.2 Z-{} F{}".format(self.data_max_travel, self.data_search_vel)
756+
c = "G38.2 Z-{} F{}".format(self.data_max_z_travel, self.data_search_vel)
757757
if self.CALL_MDI_WAIT(c, 30) == -1: return -1
758758
c = "G1 Z{} F{}".format(self.data_latch_return_dist, self.data_rapid_vel)
759759
if self.CALL_MDI_WAIT(c, 30) == -1: return -1

lib/python/qtvcp/widgets/probe_subprog.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def __init__(self):
3838
self.parm_list = ['probe_diam',
3939
'latch_return_dist',
4040
'max_travel',
41+
'max_z_travel',
4142
'search_vel',
4243
'probe_vel',
4344
'rapid_vel',
@@ -66,6 +67,7 @@ def __init__(self):
6667
self.data_probe_vel = 10.0
6768
self.data_rapid_vel = 10.0
6869
self.data_max_travel = 10.0
70+
self.data_max_z_travel = 10.0
6971
self.data_side_edge_length = 1.0
7072
self.data_xy_clearance = 1.0
7173
self.data_z_clearance = 1.0

lib/python/qtvcp/widgets/versa_probe.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __init__(self, parent=None):
6565
self.send_dict = {}
6666
# these parameters are sent to the subprogram
6767
self.parm_list = ['adj_x', 'adj_y', 'adj_z', 'adj_angle',
68-
'probe_diam', 'max_travel', 'latch_return_dist',
68+
'probe_diam', 'max_travel','max_z_travel', 'latch_return_dist',
6969
'search_vel', 'probe_vel', 'rapid_vel',
7070
'side_edge_length', 'tool_probe_height', 'tool_block_height',
7171
'xy_clearance', 'z_clearance']
@@ -145,6 +145,7 @@ def homed_on_test():
145145
self.input_probe_vel.installEventFilter(self)
146146
self.input_z_clearance.installEventFilter(self)
147147
self.input_max_travel.installEventFilter(self)
148+
self.input_max_z_travel.installEventFilter(self)
148149
self.input_latch_return_dist.installEventFilter(self)
149150
self.input_probe_diam.installEventFilter(self)
150151
self.input_xy_clearance.installEventFilter(self)
@@ -162,6 +163,7 @@ def homed_on_test():
162163
self.input_probe_vel.setText(str(self.PREFS_.getpref( "ps_probevel", 10.0, float, 'VERSA_PROBE_OPTIONS')) )
163164
self.input_z_clearance.setText(str(self.PREFS_.getpref( "ps_z_clearance", 3.0, float, 'VERSA_PROBE_OPTIONS')) )
164165
self.input_max_travel.setText(str(self.PREFS_.getpref( "ps_probe_max", 1.0, float, 'VERSA_PROBE_OPTIONS')) )
166+
self.input_max_z_travel.setText(str(self.PREFS_.getpref( "ps_probe_max_z_travel", 1.0, float, 'VERSA_PROBE_OPTIONS')) )
165167
self.input_latch_return_dist.setText(str(self.PREFS_.getpref( "ps_probe_latch", 0.5, float, 'VERSA_PROBE_OPTIONS')) )
166168
self.input_probe_diam.setText(str(self.PREFS_.getpref( "ps_probe_diam", 2.0, float, 'VERSA_PROBE_OPTIONS')) )
167169
self.input_xy_clearance.setText(str(self.PREFS_.getpref( "ps_xy_clearance", 5.0, float, 'VERSA_PROBE_OPTIONS')) )
@@ -202,6 +204,7 @@ def _hal_cleanup(self):
202204
self.PREFS_.putpref( "ps_probevel", float(self.input_probe_vel.text()), float, 'VERSA_PROBE_OPTIONS')
203205
self.PREFS_.putpref( "ps_z_clearance", float(self.input_z_clearance.text()), float, 'VERSA_PROBE_OPTIONS')
204206
self.PREFS_.putpref( "ps_probe_max", float(self.input_max_travel.text()), float, 'VERSA_PROBE_OPTIONS')
207+
self.PREFS_.putpref( "ps_probe_max_z_travel", float(self.input_max_z_travel.text()), float, 'VERSA_PROBE_OPTIONS')
205208
self.PREFS_.putpref( "ps_probe_latch", float(self.input_latch_return_dist.text()), float, 'VERSA_PROBE_OPTIONS')
206209
self.PREFS_.putpref( "ps_probe_diam", float(self.input_probe_diam.text()), float, 'VERSA_PROBE_OPTIONS')
207210
self.PREFS_.putpref( "ps_xy_clearance", float(self.input_xy_clearance.text()), float, 'VERSA_PROBE_OPTIONS')

share/qtvcp/widgets_ui/basic_probe.ui

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ HELP</string>
666666
</widget>
667667
</item>
668668
<item>
669-
<widget class="QLineEdit" name="lineEdit_max_z">
669+
<widget class="QLineEdit" name="lineEdit_max_z_travel">
670670
<property name="sizePolicy">
671671
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
672672
<horstretch>0</horstretch>
@@ -1136,7 +1136,7 @@ HELP</string>
11361136
<item>
11371137
<widget class="StatusLabel" name="statuslabel_motiontype">
11381138
<property name="text">
1139-
<string/>
1139+
<string>100.0</string>
11401140
</property>
11411141
<property name="alignment">
11421142
<set>Qt::AlignCenter</set>
@@ -6149,12 +6149,12 @@ Y ERROR</string>
61496149
<resources/>
61506150
<connections/>
61516151
<buttongroups>
6152-
<buttongroup name="outside_buttonGroup"/>
6153-
<buttongroup name="skew_buttonGroup"/>
61546152
<buttongroup name="clear_buttonGroup"/>
6155-
<buttongroup name="inside_buttonGroup"/>
61566153
<buttongroup name="cal_buttonGroup"/>
6157-
<buttongroup name="boss_pocket_buttonGroup"/>
61586154
<buttongroup name="ridge_valley_buttonGroup"/>
6155+
<buttongroup name="boss_pocket_buttonGroup"/>
6156+
<buttongroup name="outside_buttonGroup"/>
6157+
<buttongroup name="inside_buttonGroup"/>
6158+
<buttongroup name="skew_buttonGroup"/>
61596159
</buttongroups>
61606160
</ui>

0 commit comments

Comments
 (0)