Lathe maintain spindle speed during tool change
- emcPT
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 702
- Thank you received: 139
03 Sep 2018 08:42 #117006
by emcPT
Lathe maintain spindle speed during tool change was created by emcPT
Hello forum,
I normally use my lathe in G96 mode and I normally move my turret to a safe position before a tool change. This safe position is on the right top most position of the machine.
If the G96 is maintained there is a large variation of spindle speed during the move for the safe position and after the safe position. This results in unnecessary energy spent. I can use a G97 during the tool change, but this also does not make too much sense as I do not know the actual spindle speed to call with the G97.
There is any simple solution to maintain the current spindle speed during a tool change? Or must I make a component to read the actual spindle speed and call a G97?
Thank you
I normally use my lathe in G96 mode and I normally move my turret to a safe position before a tool change. This safe position is on the right top most position of the machine.
If the G96 is maintained there is a large variation of spindle speed during the move for the safe position and after the safe position. This results in unnecessary energy spent. I can use a G97 during the tool change, but this also does not make too much sense as I do not know the actual spindle speed to call with the G97.
There is any simple solution to maintain the current spindle speed during a tool change? Or must I make a component to read the actual spindle speed and call a G97?
Thank you
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7888
- Thank you received: 2134
03 Sep 2018 18:32 #117022
by cmorley
Replied by cmorley on topic Lathe maintain spindle speed during tool change
I think the act of tool changing should limit the spindle speed change.
This is how it worked on the Okuma I used anyways.
The rapid move to a safe stop would start the spindle reacting but the tool change would stop it.
This seems a bit of a bug really.
I can't think of an easy solution other the using g97 with an arbitrary setting.
Chris M
This is how it worked on the Okuma I used anyways.
The rapid move to a safe stop would start the spindle reacting but the tool change would stop it.
This seems a bit of a bug really.
I can't think of an easy solution other the using g97 with an arbitrary setting.
Chris M
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23320
- Thank you received: 4946
06 Sep 2018 14:16 #117151
by andypugh
Replied by andypugh on topic Lathe maintain spindle speed during tool change
I think it would be useful to have a speed-hold and speed-release G-code.
G96.1 and G96.2 are available G-codes.
linuxcnc.org/docs/2.7/html/remap/remap.h...map:remappable-codes
But have you checked to see what happens if you issue a G97 with no S-word when in G96 mode? (I am nowhere near a machine at the moment, so can't try it)
I plan to integrate multi-spindle support fairly soon (months, but not years) and can look into it then.
A very inelegant way to do this would be to loop-back the spindle rpm command HAL pin in to a G-code analog input, read that value, then G97 Sxxx it.
G96.1 and G96.2 are available G-codes.
linuxcnc.org/docs/2.7/html/remap/remap.h...map:remappable-codes
But have you checked to see what happens if you issue a G97 with no S-word when in G96 mode? (I am nowhere near a machine at the moment, so can't try it)
I plan to integrate multi-spindle support fairly soon (months, but not years) and can look into it then.
A very inelegant way to do this would be to loop-back the spindle rpm command HAL pin in to a G-code analog input, read that value, then G97 Sxxx it.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23320
- Thank you received: 4946
06 Sep 2018 14:57 - 06 Sep 2018 15:01 #117153
by andypugh
Replied by andypugh on topic Lathe maintain spindle speed during tool change
On further reflection...
linuxcnc.org/docs/2.7/html/gcode/overview.html#gcode:parameters
You could add this as a remapped G-code, if you wanted.
[edit] changed the 2 x pi constant to 1000 x 2 x pi to account for m/min and mm units shift.
[edit2] changed it back because G96 S uses meters and G1 / G0 uses mm. That's daft.
O100 IF [#<_spindle_css_mode>]
G97 S[#<_rpm> / [ 6.283 * <_x>]] ; #<_rpm> actually reports S-word value
O100 ENDIF
linuxcnc.org/docs/2.7/html/gcode/overview.html#gcode:parameters
You could add this as a remapped G-code, if you wanted.
[edit] changed the 2 x pi constant to 1000 x 2 x pi to account for m/min and mm units shift.
[edit2] changed it back because G96 S uses meters and G1 / G0 uses mm. That's daft.
Last edit: 06 Sep 2018 15:01 by andypugh.
Please Log in or Create an account to join the conversation.
- emcPT
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 702
- Thank you received: 139
06 Sep 2018 17:49 #117159
by emcPT
Replied by emcPT on topic Lathe maintain spindle speed during tool change
Thank you very much.
I have already added in the toolchange routine the unelegant version (read the current spindle speed, if it is G96 issue a G97 S_last_speed.
It works great, but your last post looks pretty much better, way better.
Many thanks.
I have already added in the toolchange routine the unelegant version (read the current spindle speed, if it is G96 issue a G97 S_last_speed.
It works great, but your last post looks pretty much better, way better.
Many thanks.
Please Log in or Create an account to join the conversation.
Time to create page: 0.097 seconds