|
1 | | -VERSION = '015.082' |
| 1 | +VERSION = '016.083' |
2 | 2 | LCNCVER = '2.10' |
3 | 3 |
|
4 | 4 | ''' |
@@ -336,7 +336,7 @@ def __init__(self, halcomp, widgets, paths): |
336 | 336 | self.ARC_OK = 7 |
337 | 337 | self.PIERCE_DELAY = 8 |
338 | 338 | self.PUDDLE_JUMP = 9 |
339 | | - self.CUT_HEGHT = 10 |
| 339 | + self.CUT_HEIGHT = 10 |
340 | 340 | self.CUT_MODE_01 = 11 |
341 | 341 | self.CUT_MODE_2 = 12 |
342 | 342 | self.PAUSE_AT_END = 13 |
@@ -476,6 +476,10 @@ def initialized__(self): |
476 | 476 | self.ohmicLedTimer = QTimer() |
477 | 477 | self.ohmicLedTimer.timeout.connect(self.ohmic_led_timeout) |
478 | 478 | 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 |
479 | 483 | self.set_color_styles() |
480 | 484 | self.vm_check() |
481 | 485 | # set hal pins only after initialized__ has begun |
@@ -1671,6 +1675,12 @@ def sensor_active_changed(self, state): |
1671 | 1675 | hal.set_p('plasmac.override-jog', str(state)) |
1672 | 1676 |
|
1673 | 1677 | 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) |
1674 | 1684 | if STATUS.is_interp_paused() and not height and \ |
1675 | 1685 | (hal.get_value('plasmac.stop-type-out') or hal.get_value('plasmac.cut-recovering')): |
1676 | 1686 | self.w.set_cut_recovery() |
@@ -2291,6 +2301,14 @@ def plasmac_state_changed(self, state): |
2291 | 2301 | self.w.dro_z.setProperty('Qreference_type', 10) |
2292 | 2302 | if state == self.IDLE: |
2293 | 2303 | 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 |
2294 | 2312 |
|
2295 | 2313 | def plasmac_stop_changed(self, state): |
2296 | 2314 | if not state and not self.plasmacStatePin.get(): |
@@ -3653,6 +3671,25 @@ def startup_timeout(self): |
3653 | 3671 | if self.firstRun is True: |
3654 | 3672 | self.firstRun = False |
3655 | 3673 |
|
| 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 | + |
3656 | 3693 | def update_periodic(self): |
3657 | 3694 | if not STATUS.is_interp_idle(): |
3658 | 3695 | self.vel_reduct() |
|
0 commit comments