Skip to content

Commit 50c869a

Browse files
committed
Qtvcp -improve basic/versa probe based on testing/feedback
Squashed a bunch of commits: qtvcp -probe routines: don't add extra depth to down probing extra depth should be only for side probing qtvcp -probe routines: add better error messaging, common timeout variable can set MDI timeout in one place - im future maybe from screen code. can mow send error messages with more context - probe_down is an example can pass linuxcnc error to screen ie command timeout/probe finished without contact Neesa lots of error message context added for other probe functions but this is a start qtvcp -versa probe help: larger images, more use details qtvcp -probe routines: fix reporting of outside diameter of probed boss couldn't calculate diameter because outsie boss probing used other probe function which did not report lengths back in a way we could have used. or at least I think so - some data uses global reference so maybe it woulda worked. this is just easier on my brain. really just copied probe_outside_length_x and probe_outside_lenmgth_y code into a new function that adds the diameter calculation qtvcp -probe routines: adjust numeric format on inch/metric machines inch needs 4 places, metric need 3 qtvcp -versa/basic probe: report details in statusbat if available qtvcp -probe routines: improve hole probe error messages and small hole probing. in small holes it will skip the rapid positioning if required. Does some basic error calculation checks, such as probe diameter vrs hole diameter and max probe travel vrs hole diameter. qtvcp -probe routines: add checks for missing required hints
1 parent c04df77 commit 50c869a

18 files changed

Lines changed: 905 additions & 337 deletions

lib/python/qtvcp/widgets/basic_probe.py

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,12 @@ def start_probe(self, cmd):
175175
LOG.info("Probe Routine processor is busy")
176176
return
177177
if int(self.lineEdit_probe_tool.text()) != STATUS.get_current_tool():
178-
LOG.error("Probe tool not mounted in spindle")
178+
msg = "Probe tool not mounted in spindle"
179+
if not self.set_statusbar(msg):
180+
STATUS.emit('update-machine-log', msg, 'TIME')
181+
ACTION.SET_ERROR_MESSAGE(msg)
179182
return
183+
180184
self.start_process()
181185
string_to_send = cmd + '$' + json.dumps(self.send_dict) + '\n'
182186
#print("String to send ", string_to_send)
@@ -203,27 +207,40 @@ def process_finished(self, exitCode, exitStatus):
203207

204208
def parse_input(self, line):
205209
line = line.decode("utf-8")
206-
if "INFO" in line:
207-
print(line)
210+
if "ERROR INFO" in line:
211+
ACTION.SET_ERROR_MESSAGE(line)
208212
elif "ERROR" in line:
209213
#print(line)
210214
STATUS.unblock_error_polling()
211215
ACTION.SET_ERROR_MESSAGE('Basic Probe process finished in error')
212-
elif "DEBUG" in line:
213-
print(line)
216+
elif "INFO" in line:
217+
pass
218+
elif "PROBE_ROUTINES" in line:
219+
if LOG.getEffectiveLevel() < LOG.INFO:
220+
print(line)
214221
elif "COMPLETE" in line:
215222
STATUS.unblock_error_polling()
216223
LOG.info("Basic Probing routine completed without errors")
217224
return_data = line.rstrip().split('$')
218225
data = json.loads(return_data[1])
219226
self.show_results(data)
220227
elif "HISTORY" in line:
221-
temp = line.strip('HISTORY$')
222-
STATUS.emit('update-machine-log', temp, 'TIME')
223-
LOG.info("Probe history updated to machine log")
228+
if not self.set_statusbar(line,1):
229+
STATUS.emit('update-machine-log', line, 'TIME')
230+
elif "DEBUG" in line:
231+
pass
224232
else:
225233
LOG.error("Error parsing return data from sub_processor. Line={}".format(line))
226234

235+
# return false if failed so other ways of reporting can be used.
236+
# there might not be a statusbar in main screen.
237+
def set_statusbar(self, msg, priority = 2):
238+
try:
239+
self.QTVCP_INSTANCE_.add_status(msg, priority)
240+
return True
241+
except:
242+
return False
243+
227244
# Main button handler routines
228245
def probe_help_clicked(self):
229246
self.dialog.show()

0 commit comments

Comments
 (0)