Is a Y axis possible on a lathe settup?

More
20 Jun 2021 17:44 - 20 Jun 2021 17:48 #212503 by MRx
Wouldn't it be better to parse the AXIS_N configuration and just add all the configured axis to the user interface?

I also added support for the tailstock to my lathe, now I have XY(=tailstock)Z

Aside of that it would be handy to be able to turn on/off the enable pin for the tailstock, it's usually a relative axis.

I'm using a pendant to control the tailstock and that just works fine.
Last edit: 20 Jun 2021 17:48 by MRx.

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

More
21 Jun 2021 04:58 - 21 Jun 2021 05:16 #212536 by MRx

Sorry for the late reply, I have been away.

Axis tries to be a bit clever and hides various controls depending on what it finds in the INI files.
Fortunately the main parts of Axis are written in Python which means that you can edit the file, restart LinuxCNC and the new behaviour will take effect with no need to recompile.

This code determines if you get views other than flat XZ:
github.com/LinuxCNC/linuxcnc/blob/2.7/sr...scripts/axis.py#L487

This determines the jog key layout:
github.com/LinuxCNC/linuxcnc/blob/2.7/sr...cripts/axis.py#L3100

And I think that this line here is the one that removes the Y-select radio button:
github.com/LinuxCNC/linuxcnc/blob/2.7/sr...cripts/axis.py#L3453


addressing this one:
diff --git a/src/emc/usr_intf/axis/scripts/axis.py b/src/emc/usr_intf/axis/scripts/axis.py
index f35a7c620..083fd9d76 100755
--- a/src/emc/usr_intf/axis/scripts/axis.py
+++ b/src/emc/usr_intf/axis/scripts/axis.py
@@ -3454,6 +3454,7 @@ vars.display_type.set(inifile.find("DISPLAY", "POSITION_FEEDBACK") == "COMMANDED
 coordinate_display = inifile.find("DISPLAY", "POSITION_UNITS")
 lathe = bool(inifile.find("DISPLAY", "LATHE"))
 lathe_backtool = bool(inifile.find("DISPLAY", "BACK_TOOL_LATHE"))
+lathe_tailstock = bool(inifile.find("DISPLAY", "LATHE_TAILSTOCK"))
 foam = bool(inifile.find("DISPLAY", "FOAM"))
 editor = inifile.find("DISPLAY", "EDITOR")
 vars.has_editor.set(editor is not None)
@@ -4095,7 +4096,8 @@ if lathe:
     widgets.view_x.pack_forget()
     widgets.view_p.pack_forget()
     widgets.rotate.pack_forget()
-    widgets.axis_y.grid_forget()
+    if not lathe_tailstock:
+        widgets.axis_y.grid_forget()
     widgets.menu_view.delete(0, 5)
 else:
     widgets.view_y2.pack_forget()

would that be okay?
I'm still testing on my side, but Y shows up after adding LATHE_TAILSTOCK=1 to [DISPLAY] in the configuration file. Jogging works via PG UP/DOWN.
In order to change the tool I use to drive the tailstock back to 0 so I won't require any wrench (I will possibly set this to -5 though to start at 0)
It's quite convenient now on my lathe because the scale on the tailstock is barely readable, and I do have some parts which need accurate center hole by drilling / reaming one by one so I can make that accurately without paying attention now.
Last edit: 21 Jun 2021 05:16 by MRx.

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

More
21 Jun 2021 23:37 #212613 by andypugh
I am not sure that mapping a tailstock to Y is normal. I think I would expect it to be Axis W.

LATHE_TAILSTOCK as an INI flag seems rather too specific, really. I feel that it really ought to be looking at [TRAJ]COORDINATES.

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

More
22 Jun 2021 05:53 #212640 by alkabal
Hi

I have do the same things and use Y for my tailstock mostly because actually we can't use cycle like rigid tapping with W axis and the actual TP.

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

More
22 Jun 2021 12:43 #212675 by MRx

I am not sure that mapping a tailstock to Y is normal. I think I would expect it to be Axis W.

LATHE_TAILSTOCK as an INI flag seems rather too specific, really. I feel that it really ought to be looking at [TRAJ]COORDINATES.


Agree, that's probably the better. Aside of that LinuxCNC doesn't know what the axis is used for anyway.

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

Moderators: piasdom
Time to create page: 0.148 seconds
Powered by Kunena Forum