- Posts: 572
- Thank you received: 0
How do I get the current tool length in tool_probe_m6 in stdglue.py?
2 years 10 months ago #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
Thanks
John
Please Log in to join the conversation.
2 years 9 months ago #290227
by andypugh
Replied by andypugh on topic How do I get the current tool length in tool_probe_m6 in stdglue.py?
Please Log in to join the conversation.
2 years 9 months ago #290228
by andypugh
Replied by andypugh on topic How do I get the current tool length in tool_probe_m6 in stdglue.py?
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)
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 to join the conversation.
2 years 9 months ago #290243
by JohnnyCNC
Replied by JohnnyCNC on topic How do I get the current tool length in tool_probe_m6 in stdglue.py?
This worked but I am up for a better way.
s = linuxcnc.stat()
s.poll()
if s.tool_table[0].zoffset > 0:
s = linuxcnc.stat()
s.poll()
if s.tool_table[0].zoffset > 0:
Please Log in to join the conversation.
2 years 9 months ago #290244
by JohnnyCNC
Thanks
Replied by JohnnyCNC on topic How do I get the current tool length in tool_probe_m6 in stdglue.py?
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.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)
Thanks
Please Log in to join the conversation.
Time to create page: 0.193 seconds
