Skip to content

Commit e2f089d

Browse files
committed
qtplasmac: add z-motion watchdog to GUI to catch any state-change hang ups not caught by monitoring motion.eoffset-limited
1 parent d179009 commit e2f089d

File tree

2 files changed

+52
-2
lines changed

2 files changed

+52
-2
lines changed

share/qtvcp/screens/qtplasmac/qtplasmac_handler.py

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = '015.082'
1+
VERSION = '016.083'
22
LCNCVER = '2.10'
33

44
'''
@@ -336,7 +336,7 @@ def __init__(self, halcomp, widgets, paths):
336336
self.ARC_OK = 7
337337
self.PIERCE_DELAY = 8
338338
self.PUDDLE_JUMP = 9
339-
self.CUT_HEGHT = 10
339+
self.CUT_HEIGHT = 10
340340
self.CUT_MODE_01 = 11
341341
self.CUT_MODE_2 = 12
342342
self.PAUSE_AT_END = 13
@@ -476,6 +476,10 @@ def initialized__(self):
476476
self.ohmicLedTimer = QTimer()
477477
self.ohmicLedTimer.timeout.connect(self.ohmic_led_timeout)
478478
self.ohmicLedTimer.setSingleShot(True)
479+
self.watchDogTimer = QTimer()
480+
self.watchDogTimer.timeout.connect(self.watchdog_has_bit)
481+
self.watchDogTimer.setSingleShot(True)
482+
self.watchDogState = None
479483
self.set_color_styles()
480484
self.vm_check()
481485
# set hal pins only after initialized__ has begun
@@ -1671,6 +1675,12 @@ def sensor_active_changed(self, state):
16711675
hal.set_p('plasmac.override-jog', str(state))
16721676

16731677
def z_offset_changed(self, height):
1678+
currentState = self.plasmacStatePin.get()
1679+
if currentState in [self.PROBE_HEIGHT, self.PROBE_DOWN, self.PROBE_UP,
1680+
self.ZERO_HEIGHT, self.PIERCE_HEIGHT, self.PUDDLE_JUMP,
1681+
self.CUT_HEIGHT, self.SAFE_HEIGHT, self.MAX_HEIGHT]:
1682+
self.watchDogState = currentState
1683+
self.watchDogTimer.start(3000)
16741684
if STATUS.is_interp_paused() and not height and \
16751685
(hal.get_value('plasmac.stop-type-out') or hal.get_value('plasmac.cut-recovering')):
16761686
self.w.set_cut_recovery()
@@ -2291,6 +2301,14 @@ def plasmac_state_changed(self, state):
22912301
self.w.dro_z.setProperty('Qreference_type', 10)
22922302
if state == self.IDLE:
22932303
self.refresh_button_states()
2304+
if state in [self.PROBE_HEIGHT, self.PROBE_DOWN, self.PROBE_UP,
2305+
self.ZERO_HEIGHT, self.PIERCE_HEIGHT, self.PUDDLE_JUMP,
2306+
self.CUT_HEIGHT, self.SAFE_HEIGHT, self.MAX_HEIGHT]:
2307+
self.watchDogState = state
2308+
self.watchDogTimer.start(3000)
2309+
else:
2310+
self.watchDogTimer.stop()
2311+
self.watchDogState = None
22942312

22952313
def plasmac_stop_changed(self, state):
22962314
if not state and not self.plasmacStatePin.get():
@@ -3653,6 +3671,25 @@ def startup_timeout(self):
36533671
if self.firstRun is True:
36543672
self.firstRun = False
36553673

3674+
def watchdog_has_bit(self):
3675+
states = {
3676+
self.PROBE_HEIGHT: _translate('HandlerClass', 'moving to probe height'),
3677+
self.PROBE_DOWN: _translate('HandlerClass', 'probing down'),
3678+
self.PROBE_UP: _translate('HandlerClass', 'probing up'),
3679+
self.ZERO_HEIGHT: _translate('HandlerClass', 'moving to zero height'),
3680+
self.PIERCE_HEIGHT: _translate('HandlerClass', 'moving to pierce height'),
3681+
self.PUDDLE_JUMP: _translate('HandlerClass', 'moving to puddle jump height'),
3682+
self.CUT_HEIGHT: _translate('HandlerClass', 'moving to cut height'),
3683+
self.SAFE_HEIGHT: _translate('HandlerClass', 'moving to safe height'),
3684+
self.MAX_HEIGHT: _translate('HandlerClass', 'moving to maximum height')
3685+
}
3686+
head = _translate('HandlerClass', 'Z Axis Motion Timeout')
3687+
msg0 = _translate('HandlerClass', 'Z axis did not reach the destination while')
3688+
msg1 = _translate('HandlerClass', 'program is paused')
3689+
msg2 = _translate('HandlerClass', 'check settings on the PARAMETERS tab')
3690+
STATUS.emit('error', linuxcnc.OPERATOR_ERROR, f'{head}:\n{msg0} {states[self.watchDogState]}\n{msg1}\n{msg2}\n')
3691+
ACTION.PAUSE()
3692+
36563693
def update_periodic(self):
36573694
if not STATUS.is_interp_idle():
36583695
self.vel_reduct()

share/qtvcp/screens/qtplasmac/versions.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,19 @@ <h2>QtPlasmaC Version History - LinuxCNC 2.10</h2>
2626
</table>
2727
<br>
2828
<!--- ****** ADD NEXT VERSION BELOW THIS LINE ****** --->
29+
<br><b><u>016.083 2026 Feb 20</u></b>
30+
<br><b>QtPlasmaC GUI</b>
31+
<ul style="margin:0;">
32+
<li>update tooltips to included missing GUI elements and remove duplicate translations</li>
33+
<li>fix RFL string comparisons</li>
34+
<li>fix interlock for Material Parameters</li>
35+
<li>add z-motion watchdog to GUI to catch any state-change hang ups not caught by monitoring motion.eoffset-limited</li>
36+
</ul>
37+
<b>PlasmaC Component</b>
38+
<ul style="margin:0;">
39+
<li>monitor motion.eoffset-limited to determine if the commanded motion is outside of the soft limits</li>
40+
</ul>
41+
2942
<br><b><u>015.082 2026 Feb 06</u></b>
3043
<ul style="margin:0;">
3144
<li>refactor button interlocking</li>

0 commit comments

Comments
 (0)