From eba8a9937249dceaa60bb2960161910c14706324 Mon Sep 17 00:00:00 2001 From: Sigma1912 <46067220+Sigma1912@users.noreply.github.com> Date: Mon, 13 Jan 2025 13:27:19 +0100 Subject: [PATCH] Gmoccapy: fix bugs caused by GStat missing changes in interpreter mode This fixes issues #3120 and #3129 --- src/emc/usr_intf/gmoccapy/gmoccapy.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/emc/usr_intf/gmoccapy/gmoccapy.py b/src/emc/usr_intf/gmoccapy/gmoccapy.py index 1aad3cd4db2..5172803bc69 100644 --- a/src/emc/usr_intf/gmoccapy/gmoccapy.py +++ b/src/emc/usr_intf/gmoccapy/gmoccapy.py @@ -5016,7 +5016,10 @@ 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 changes 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): tool = self.widgets.tooledit1.get_selected_tool() @@ -5039,6 +5042,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 changes 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)