How do I get the current tool length in tool_probe_m6 in stdglue.py?

  • JohnnyCNC
  • JohnnyCNC's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
29 Dec 2023 23:58 #289350 by JohnnyCNC
I am working on a pure Python M6 remap.  I have it, sort-of working.   I need the length of the current tool so I can decide if I need to measure the tool or not.  If the length greater than zero, then I use that Z offset.  Otherwise, I measure the tool to get the Z offset.  My starting point for this project was the tool_probe_m6 routine in stdglue.py.

Thanks
John

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

More
08 Jan 2024 16:11 #290227 by andypugh

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

More
08 Jan 2024 16:18 #290228 by andypugh
Actually, inside a remap it is probably better to use the emccanon interface. (This i available in remaps, but not in HAL components)

emccanon.GET_EXTERNAL_TOOL_LENGTH_ZOFFSET might be what you a

github.com/LinuxCNC/linuxcnc/blob/master...74ngc/canonmodule.cc

(Lots of useful things there, including axis motion)

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

  • JohnnyCNC
  • JohnnyCNC's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
08 Jan 2024 23:08 #290243 by JohnnyCNC
This worked but I am up for a better way.

s = linuxcnc.stat()
s.poll()
if s.tool_table[0].zoffset > 0:

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

  • JohnnyCNC
  • JohnnyCNC's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
08 Jan 2024 23:11 #290244 by JohnnyCNC

Actually, inside a remap it is probably better to use the emccanon interface. (This i available in remaps, but not in HAL components)

emccanon.GET_EXTERNAL_TOOL_LENGTH_ZOFFSET might be what you a

github.com/LinuxCNC/linuxcnc/blob/master...74ngc/canonmodule.cc

(Lots of useful things there, including axis motion)

I tried emccanon and it was giving me values that didn't make sense.  Now that I have a little better handle on what I am doing I'll give it another try.
Thanks

 

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

Time to create page: 0.058 seconds
Powered by Kunena Forum