- LinuxCNC
- General LinuxCNC Questions
- How do I get the current tool length in tool_probe_m6 in stdglue.py?
How do I get the current tool length in tool_probe_m6 in stdglue.py?
- JohnnyCNC
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 543
- Thank you received: 100
29 Dec 2023 23:58 #289350
by JohnnyCNC
How do I get the current tool length in tool_probe_m6 in stdglue.py? was created 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 or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23162
- Thank you received: 4860
08 Jan 2024 16:11 #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 or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23162
- Thank you received: 4860
08 Jan 2024 16:18 #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 or Create an account to join the conversation.
- JohnnyCNC
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 543
- Thank you received: 100
08 Jan 2024 23:08 #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 or Create an account to join the conversation.
- JohnnyCNC
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 543
- Thank you received: 100
08 Jan 2024 23:11 #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 or Create an account to join the conversation.
- LinuxCNC
- General LinuxCNC Questions
- How do I get the current tool length in tool_probe_m6 in stdglue.py?
Time to create page: 0.058 seconds