Servomotor

While UCCNC does not currently have a TURN Modual Here is the place to discuss your wants and wishes for TURN

Servomotor

Postby kljosc » Sat Nov 30, 2024 2:42 pm

After successfully building my CNC mill I want to build a CNC lathe with my second UC400ETH.
For the spindle I have bought a 1 kW T6 series AC servomotor kit which is configured in positioning mode. Starting the motor works and controling the speed works well too. But when I stop the spindle it stops immediately.
For testing I modified the M5.txt file in profile Turning to
Code: Select all
exec.Code("S0");

But M5.txt is ignored. Typing in M5 in MDI works as expected.
Is M5.txt invoked by UCCNC or are button 114 and 115 (Screenset 2019) only handled internally.

thanks
Klemens
kljosc
 
Posts: 13
Joined: Sun Jun 03, 2018 1:52 pm

Re: Servomotor

Postby cncdrive » Sun Dec 01, 2024 3:41 pm

Hi Klemens,

Yes, M5 is internally used, what you could do it you could replace those buttons, just change the buttonnumber parameter of the button using the screen editor something between 20000 to 21999.
These are macro call button codes, so if you setting the buttonnumber to 20000 then that will call the M20000.txt macro file, so create a M20000.txt file i nthe PRofiles/Macros folder and then add the code:

exec.Code("M5)

And ofcourse you can add your own codes before and after that extending the functionality of the M5 function.
cncdrive
Site Admin
 
Posts: 5198
Joined: Tue Aug 12, 2014 11:17 pm

Re: Servomotor

Postby kljosc » Mon Dec 02, 2024 7:13 am

Ah yes. That should be obvious when I think about it :-)
In the meantime, I have found a better solution directly in the parameterization of the servo motor driver. You can specify that the servo goes into idle mode with the disable signal so it does not stop abruptly but brakes softly.
Inertia parameters and max. position deviation have to be adjusted too.

The next challenge is threading. I have connected an A-B encoder signal to the UC400ETH, but threading stops. I have already tried A-B exchanged with no effect. Today I will try it with the index signal.

Thanks, Klemens
kljosc
 
Posts: 13
Joined: Sun Jun 03, 2018 1:52 pm

Re: Servomotor

Postby cncdrive » Mon Dec 02, 2024 10:34 am

You need both the encoder A and B and the Index signal to be connected and setup in the configuration for the threading to work.
The spindle rotation angle is measured by the encoder A, B counts and they are syncronised to the Index position, so all 3 signals are needed.
cncdrive
Site Admin
 
Posts: 5198
Joined: Tue Aug 12, 2014 11:17 pm

Re: Servomotor

Postby kljosc » Mon Dec 02, 2024 5:18 pm

I have connected the index signal and now it works :D

Thanks
Klemens
kljosc
 
Posts: 13
Joined: Sun Jun 03, 2018 1:52 pm

Re: Servomotor

Postby A_Camera » Thu Dec 05, 2024 3:38 pm

kljosc wrote:After successfully building my CNC mill I want to build a CNC lathe with my second UC400ETH.
For the spindle I have bought a 1 kW T6 series AC servomotor kit which is configured in positioning mode. Starting the motor works and controling the speed works well too. But when I stop the spindle it stops immediately.
For testing I modified the M5.txt file in profile Turning to
Code: Select all
exec.Code("S0");

But M5.txt is ignored. Typing in M5 in MDI works as expected.
Is M5.txt invoked by UCCNC or are button 114 and 115 (Screenset 2019) only handled internally.

thanks
Klemens

How are you controlling the spindle motor? I am controlling it using Step/Dir and the acceleration value controls also the deceleration of the spindle. My servo is also in positioning mode, and I don't understand why you need to modify M5.
A_Camera
 
Posts: 657
Joined: Tue Sep 20, 2016 11:37 am


Return to UCCNC TURN (CNC Lathe)

Who is online

Users browsing this forum: No registered users and 2 guests