- Posts: 74
- Thank you received: 0
Reading Tool Offsets in Gcode Without Using M6
- tightmopedman9
- Topic Author
- Offline
- Senior Member
-
Less
More
3 years 11 months ago #257659
by tightmopedman9
Reading Tool Offsets in Gcode Without Using M6 was created 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 to join the conversation.
3 years 11 months ago #257660
by MaHa
Replied by MaHa on topic Reading Tool Offsets in Gcode Without Using M6
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
In my probing routine, the touch probe offset is stored as variable in the probing routine.
Code:
#<_ini[section]variable>
Please Log in to join the conversation.
- tightmopedman9
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 74
- Thank you received: 0
3 years 11 months ago #257661
by tightmopedman9
Replied by tightmopedman9 on topic Reading Tool Offsets in Gcode Without Using M6
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.
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 to join the conversation.
3 years 11 months ago #257667
by roland
Replied by roland on topic Reading Tool Offsets in Gcode Without Using M6
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
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
Please Log in to join the conversation.
- tightmopedman9
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 74
- Thank you received: 0
3 years 11 months ago #257695
by tightmopedman9
Replied by tightmopedman9 on topic Reading Tool Offsets in Gcode Without Using M6
Awesome, that'll work great, thanks!
Please Log in to join the conversation.
Time to create page: 0.095 seconds
