Page 1 of 1

Lathe attachment for milling machine

PostPosted: Fri Dec 06, 2024 2:17 pm
by Ruslan
Hi. I want to add lathe attachment to my milling machine. I want that lathe spindle and milling spindle works together. For example I make lathe machining of a part, then position lathe chuck to exact position and make milling operations. My lathe attachment has servo motor on it. As I understand wright I see this so: Miling spindle controlled by Sxxx M3 command(now working ok through modbus protocol), lathe spindle speed uses some variable that controlls analog output of UC300ETH+UB1 for servo speed command through analog input of servo drive. For positioning option I set C axis for step/dir output to servo drive step/dir inputs. Also I use additional M code to swith servodrive between position/speed modes.
What other variants we have to make this set working?

Re: Lathe attachment for milling machine

PostPosted: Fri Dec 06, 2024 8:43 pm
by A_Camera
Ruslan wrote:Hi. I want to add lathe attachment to my milling machine. I want that lathe spindle and milling spindle works together. For example I make lathe machining of a part, then position lathe chuck to exact position and make milling operations. My lathe attachment has servo motor on it. As I understand wright I see this so: Miling spindle controlled by Sxxx M3 command(now working ok through modbus protocol), lathe spindle speed uses some variable that controlls analog output of UC300ETH+UB1 for servo speed command through analog input of servo drive. For positioning option I set C axis for step/dir output to servo drive step/dir inputs. Also I use additional M code to swith servodrive between position/speed modes.
What other variants we have to make this set working?

Do you want to control the milling spindle using M3/M4/M5 or externally? I mean, I use Modbus for the milling spindle, but the Modbus commands are initiated through M3/M4/M5. How would you start the lathe spindle? I mean, as far as I know, only one spindle can be controlled by UCCNC, which is what we are also discussing in another thread on this forum right now.

Re: Lathe attachment for milling machine

PostPosted: Sat Dec 07, 2024 8:54 am
by Ruslan
We can use additional M code for enabling servodrive and one more M code for switching speed/position. In speed mode use analog output of UC300ETH. For voltage on analog output use variable. UCCNC has exact setting to link variable value to voltage on analog output. Milling spindle is controlled as ordinary, M3,4,5 and S codes.

Re: Lathe attachment for milling machine

PostPosted: Sat Dec 14, 2024 12:27 pm
by Ruslan
Almost finished all work with lathe attachment. It works well in position mode. Now I need to make it work in speed mode. As I wrote servodrive has MODE pin to switch between position and speed modes. This pin I connected to Y305 of UB1. And now I need to switch this pin to logic 1(now it is 0) in program. Can I write some M code(M32) in program and put M32 macro to Macro folder, will it work properly?

Re: Lathe attachment for milling machine

PostPosted: Sat Dec 14, 2024 1:51 pm
by Ruslan
OK, managed it myself, M32(speed mode) and M33(position mode) are working, setting variable to analog outout also working. Now I need to make M code macro for homing in program. Did not found code for homing procedure. Can somebody help me?