Lathe mode should not have touch off in X
20 Apr 2014 22:26 #46141
by emcPT
Lathe mode should not have touch off in X was created by emcPT
I think that when in lathe mode, the touch off in X should be disable, therefor I made a small change in the axis.py (search for the touch_off definition) file that can be seen here. If it is buggy let me know, but I am using it for a while:
def touch_off(event=None, new_axis_value = None):
global system
if not manual_ok(): return
if joints_mode(): return
if lathe:
new_axis_value, system = prompt_touchoff(_("Z origin set (lathe)"),
_("Enter %s coordinate relative to %%s:")
% "Z", 0.0, vars.touch_off_system.get())
else:
if new_axis_value is None:
new_axis_value, system = prompt_touchoff(_("Touch Off"),
_("Enter %s coordinate relative to %%s:")
% vars.current_axis.get().upper(), 0.0, vars.touch_off_system.get())
else:
system = vars.touch_off_system.get()
if new_axis_value is None: return
vars.touch_off_system.set(system)
ensure_mode(linuxcnc.MODE_MDI)
s.poll()
if lathe:
linear_axis = 2
current_axis_mod = "z"
else:
linear_axis = vars.current_axis.get() in "xyzuvw"
current_axis_mod = vars.current_axis_get()
if linear_axis and vars.metric.get(): scale = 1/25.4
else: scale = 1
if linear_axis and 210 in s.gcodes:
scale *= 25.4
if system.split()[0] == "T":
lnum = 10 + vars.tto_g11.get()
offset_command = "G10 L%d P%d %c[%s*%.12f]" % (lnum, s.tool_in_spindle, current_axis_mod, new_axis_value, scale)
c.mdi(offset_command)
c.wait_complete()
c.mdi("G43")
c.wait_complete()
else:
offset_command = "G10 L20 %s %c[%s*%.12f]" % (system.split()[0], current_axis_mod, new_axis_value, scale)
c.mdi(offset_command)
c.wait_complete()
ensure_mode(linuxcnc.MODE_MANUAL)
s.poll()
o.tkRedraw()
reload_file(False)
Please Log in or Create an account to join the conversation.
21 Apr 2014 06:47 #46154
by andypugh
Why? I use it all the time to set tool lengths.
Replied by andypugh on topic Lathe mode should not have touch off in X
I think that when in lathe mode, the touch off in X should be disable
Why? I use it all the time to set tool lengths.
Please Log in or Create an account to join the conversation.
21 Apr 2014 13:01 #46161
by emcPT
That is the function of tool offsets. Only the Z touch off should be made, and it is to set the start of the material.
If you have your tools all set up, changing the X coordinate system is a dangerous move, as you are moving all the tools.
Replied by emcPT on topic Lathe mode should not have touch off in X
I think that when in lathe mode, the touch off in X should be disable
Why? I use it all the time to set tool lengths.
That is the function of tool offsets. Only the Z touch off should be made, and it is to set the start of the material.
If you have your tools all set up, changing the X coordinate system is a dangerous move, as you are moving all the tools.
Please Log in or Create an account to join the conversation.
21 Apr 2014 15:22 #46163
by andypugh
I admit that I occasionally touch-off into G54 when I intend to do so into the tool table.
This is largely a problem with the Axis interface, Touchy has different buttons for tool and coordinate-system setting.
However, as my machine doesn't home perfectly accurately I do occasionally want to tweak the whole coordinate system. Having said that, I don't do this often, and I do do it by mistake quite often. And I could always use G10 in the MDI tab instead.
Replied by andypugh on topic Lathe mode should not have touch off in X
That is the function of tool offsets. Only the Z touch off should be made, and it is to set the start of the material.
If you have your tools all set up, changing the X coordinate system is a dangerous move, as you are moving all the tools.
I admit that I occasionally touch-off into G54 when I intend to do so into the tool table.
This is largely a problem with the Axis interface, Touchy has different buttons for tool and coordinate-system setting.
However, as my machine doesn't home perfectly accurately I do occasionally want to tweak the whole coordinate system. Having said that, I don't do this often, and I do do it by mistake quite often. And I could always use G10 in the MDI tab instead.
Please Log in or Create an account to join the conversation.
21 Apr 2014 15:52 #46165
by newbynobi
Replied by newbynobi on topic Lathe mode should not have touch off in X
@emcPT
I do not agree! X touch off is needed if your machine has no homing switch, or if the home switch has no good reproducity!
I make the first cut with my reference tool, measure the diameter and do the touch off to set the correct diameter, after that all other tools are compensated to my reference tool and will cut the desired diameters.
So IMHO it should stay in.
Norbert
I do not agree! X touch off is needed if your machine has no homing switch, or if the home switch has no good reproducity!
I make the first cut with my reference tool, measure the diameter and do the touch off to set the correct diameter, after that all other tools are compensated to my reference tool and will cut the desired diameters.
So IMHO it should stay in.
Norbert
Please Log in or Create an account to join the conversation.
21 Apr 2014 15:58 #46166
by emcPT
Replied by emcPT on topic Lathe mode should not have touch off in X
So each time you people use your machine you need to calibrate tools/touch off ?!
That is... unproductive and solved with a encoder with a homing index.
But ok, I just wanted to contribute, and the code remains here to anyone that could make a use of it.
That is... unproductive and solved with a encoder with a homing index.
But ok, I just wanted to contribute, and the code remains here to anyone that could make a use of it.
Please Log in or Create an account to join the conversation.
Moderators: piasdom
Time to create page: 0.125 seconds