Manual Toolchange + Abs Z Probe (QtDragon)

  • SanzuiWorks
  • SanzuiWorks's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
21 May 2025 11:45 #328853 by SanzuiWorks
Replied by SanzuiWorks on topic Manual Toolchange + Abs Z Probe (QtDragon)
So far, this method is not working well.
Nothing happens when I load the NGC. For now, I would like to try a different method.

I am considering creating an action button that retrieves the first WSC from the loaded NGC and sends it to the MDI. ...

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

  • MennilTossFlykune
  • Away
  • Senior Member
  • Senior Member
More
21 May 2025 14:57 #328861 by MennilTossFlykune
Replied by MennilTossFlykune on topic Manual Toolchange + Abs Z Probe (QtDragon)

Reading Work Coordinates When Loading a New NGC File  

When loading a new `.ngc` file in LinuxCNC, is it possible to read the work coordinates at that stage? Since the G-code has not been executed yet, the work coordinates might not be applied.  

Would it be possible to create a custom button, similar to "WCS Sync," that reads the `.ngc` file and sends commands like `G55` to MDI?  

Has anyone implemented something similar, or does LinuxCNC provide a built-in way to achieve this? Any insights or suggestions would be greatly appreciated.

Thanks!
 

You can add this under StatCanon in qt5_graphics.py:
    def set_g5x_offset(self, index, x, y, z, a, b, c, u=None, v=None, w=None):
        interpret.Translated.set_g5x_offset(self, index, x, y, z, a, b, c, u, v, w)        
        g5x = {
            1: 54,
            2: 55,
            3: 56,
            4: 57,
            5: 58,
            6: 59,
            7: 59.1,
            8: 59.2,
            9: 59.3
        }
        print(f"G{g5x[index]} on line {self.lineno}")

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

Moderators: cmorley
Time to create page: 0.077 seconds
Powered by Kunena Forum