Change Tool Offsets after editing the Tool Table

  • hermann1976
  • hermann1976's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
08 May 2025 07:20 #327983 by hermann1976
Replied by hermann1976 on topic Change Tool Offsets after editing the Tool Table
Hi, I'd like to ask if I'm the only one experiencing this issue, or if it's a general issue with the Gmoccapy GUI?
When I perform a fresh installation on a virtual machine, I get the same behavior. So I assume it's a general bug in the Gmoccapy GUI.
Please let me know your experience... Thanks

Please Log in or Create an account to join the conversation.

More
09 May 2025 06:35 #328045 by zz912
What version LCNC do you use?

Please Log in or Create an account to join the conversation.

  • hermann1976
  • hermann1976's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
09 May 2025 07:48 #328048 by hermann1976
Replied by hermann1976 on topic Change Tool Offsets after editing the Tool Table
Current Release: 2.9.4

Thanks

Please Log in or Create an account to join the conversation.

More
09 May 2025 19:29 #328099 by zz912
You can easy change it.

Add this code to gmoccapy.py file to "def on_btn_apply_tool_changes_clicked"
        if "G43" in self.active_gcodes:
            self.command.wait_complete()
            self.command.mode(linuxcnc.MODE_MDI)
            self.command.wait_complete()
            self.command.mdi("G43")
            self.command.wait_complete()

like this:
 

1) G43 must be activated
2) after input new value in cell you MUST confirm it for example by key ENTER, then you can click on Apply
3) after click on Apply button you will see right correction value
 
Attachments:
The following user(s) said Thank You: Aciera

Please Log in or Create an account to join the conversation.

  • hermann1976
  • hermann1976's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 May 2025 03:23 #328121 by hermann1976
Replied by hermann1976 on topic Change Tool Offsets after editing the Tool Table
Thanks for your answer.
But Linuxcnc will coming up with an error:

 
 
Attachments:

Please Log in or Create an account to join the conversation.

More
10 May 2025 04:48 #328124 by zz912
You probably have tabs on that line instead of spaces.

Please Log in or Create an account to join the conversation.

More
10 May 2025 05:04 #328125 by zz912
It's a good idea to set this permanently in Geany:
stackoverflow.com/questions/5287849/how-...e-in-geany-on-ubuntu

I tested the code yesterday and found that it's a good idea to go back to MANUAL_MODE:
        if "G43" in self.active_gcodes:
            self.command.wait_complete()
            self.command.mode(linuxcnc.MODE_MDI)
            self.command.wait_complete()
            self.command.mdi("G43")
            self.command.wait_complete()
            self.command.mode(linuxcnc.MODE_MANUAL)
            self.command.wait_complete()
The following user(s) said Thank You: Aciera

Please Log in or Create an account to join the conversation.

  • hermann1976
  • hermann1976's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 May 2025 13:11 #328142 by hermann1976
Replied by hermann1976 on topic Change Tool Offsets after editing the Tool Table
thank you for your answer,
so the code block is included like your post and i didn't get an error.
The change of the length in Z is working (with apply) but the diameter doesn't change still not.

 

Please Log in or Create an account to join the conversation.

More
10 May 2025 15:41 #328154 by zz912
So try this:
        if "G43" in self.active_gcodes:
            self.command.wait_complete()
            self.command.mode(linuxcnc.MODE_MDI)
            self.command.wait_complete()
            self.command.mdi("G43")
            self.command.wait_complete()
            self.command.mode(linuxcnc.MODE_MANUAL)
            self.command.wait_complete()
        
        self.stat.poll()    
        toolinfo = self.widgets.tooledit1.get_toolinfo(self.stat.tool_in_spindle)
        if toolinfo:
            self.widgets.lbl_tool_no.set_text(str(toolinfo[1]))
            self.widgets.lbl_tool_dia.set_text(toolinfo[12])
            self.halcomp["tool-diameter"] = float(locale.atof(toolinfo[12]))
            self.widgets.lbl_tool_name.set_text(toolinfo[16])  
The following user(s) said Thank You: hermann1976

Please Log in or Create an account to join the conversation.

  • hermann1976
  • hermann1976's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
12 May 2025 05:49 #328246 by hermann1976
Replied by hermann1976 on topic Change Tool Offsets after editing the Tool Table
Thank you very much - zz912.
Your last change is now working.
Regards, Hermann

Please Log in or Create an account to join the conversation.

Moderators: newbynobiHansU
Time to create page: 0.163 seconds
Powered by Kunena Forum