Reading Tool Offsets in Gcode Without Using M6

More
26 Nov 2022 02:03 #257659 by tightmopedman9
I am modifying my tool touch off routine and need to read the z length offset of my touch probe (tool #1). I thought about creating a custom M code which would run an M6 T1, then load parameter #5403 into a global variable which I could reference in my tool touch off g-code subroutine. This seems inelegant, and if possible I'd like to read the offset in the tool touch off routine directly. However, in order to this I would have to execute an M6 T1, when the desired tool is already in the spindle. Is there a way around this?

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

More
26 Nov 2022 03:13 #257660 by MaHa
If the touch probe has a fixed offset and possibly not be tool #1, you could add a custom variable in the ini file, and access by
#<_ini[section]variable>
In my probing routine, the touch probe offset is stored as variable in the probing routine.

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

More
26 Nov 2022 03:20 #257661 by tightmopedman9
I have a Bridgeport knee style mill, so when I move the work table I need to adjust the Z offset of all my tools. I use the touch probe to measure the height of the tool setter and then use this value to set my tool offsets.

I could just run an M6 T1 and read the #5403 parameter before touching off a tool the first time. Honestly, it probably won't be that frequent that I'll need to change the Z offset of a tool and not first probe the tool setter, so finding a solution isn't that important.

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

More
26 Nov 2022 07:59 #257667 by roland
Have a look at the function M61.
This will load the values from the tool table without changing the tool. M61 can also be remapped.

linuxcnc.org/docs/2.8/html/gcode/m-code.html#mcode:m61
The following user(s) said Thank You: tommylight, tightmopedman9

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

More
26 Nov 2022 18:57 #257695 by tightmopedman9
Awesome, that'll work great, thanks!

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

Time to create page: 0.072 seconds
Powered by Kunena Forum