From 4f31e5243c4098d80ec948ded7306df747b7dce2 Mon Sep 17 00:00:00 2001 From: Sigma1912 <46067220+Sigma1912@users.noreply.github.com> Date: Mon, 13 Jan 2025 13:20:33 +0100 Subject: [PATCH] gmoccapy: fix bugs caused by GStat missing change in interpreter mode this fixes issues #3120 and #3129 --- src/emc/usr_intf/gmoccapy/gmoccapy.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/emc/usr_intf/gmoccapy/gmoccapy.py b/src/emc/usr_intf/gmoccapy/gmoccapy.py index ff5e4831ac1..2babba8157d 100644 --- a/src/emc/usr_intf/gmoccapy/gmoccapy.py +++ b/src/emc/usr_intf/gmoccapy/gmoccapy.py @@ -5020,6 +5020,9 @@ def on_btn_select_tool_by_no_clicked(self, widget, data=None): self.command.wait_complete() command = "T{0} M6".format(int(value)) self.command.mdi(command) + # Next two lines fix issue #3129 caused by GStat missing change in interpreter mode + command = "G4 P{0}".format(self.get_ini_info.get_cycle_time()/1000) + self.command.mdi(command) # set tool with M61 Q? or with T? M6 def on_btn_selected_tool_clicked(self, widget, data=None): @@ -5043,6 +5046,9 @@ def on_btn_selected_tool_clicked(self, widget, data=None): else: command = "M61 Q{0}".format(tool) self.command.mdi(command) + # Next two lines fix issue #3120 also caused by GStat missing change in interpreter mode + command = "G4 P{0}".format(self.get_ini_info.get_cycle_time()/1000) + self.command.mdi(command) else: message = _("Could not understand the entered tool number. Will not change anything!") self.dialogs.warning_dialog(self, _("Important Warning!"), message)