Hello Guest it is March 28, 2024, 02:19:14 PM

Author Topic: Using servo for spindle on lathe  (Read 6595 times)

0 Members and 1 Guest are viewing this topic.

Offline DMBGO

*
  •  201 201
  • Time is the same in a relative way
    • View Profile
Using servo for spindle on lathe
« on: March 15, 2016, 07:43:26 AM »
Hello everyone
I had a great idea the other day, and that was generated by my recent acquisition of a little Myford lathe from a deceased estate.
I want to convert it to Mach, but leave it in a condition that can easily be put back as original.
Anyway the problem I have atm is a follows:
I set up a servo as the X axis, then decided to use it as a spindle. I checked the box in the Ess plugin to say that the spindle was step and direction. 

This servo works well and revolves at maximum speed (2500rpm) when it is connected to the smoothstepper and configured in Mach as the x axis. 

Using the same servo controller and cable etc, in fact all I  did was change the configuration in Mach,  I can't get the motor to turn at over 700 rpm. 

The servo does support step and direction  and as i have already said it works well when it is X.

I'm sure if will be an easy fix. It could be caused by the smoothstepper,  or the the Mach configuration. 
Anyway I'd better mention my configuration.
Mach3 an Ess, a GSK Servo and controller.
I think that's it.
Any help would be appreciated.
Dave

Cheers

David

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Using servo for spindle on lathe
« Reply #1 on: March 15, 2016, 08:15:41 AM »
What is the encoder count?
What is the Max RPM of the motor via that drive?
Hood

Offline DMBGO

*
  •  201 201
  • Time is the same in a relative way
    • View Profile
Re: Using servo for spindle on lathe
« Reply #2 on: March 15, 2016, 04:00:00 PM »
Hi Hood
I'm not sure about the encoder count, but I will check the manual when I get out there this morning and let you know.
The max RPM is 3000 and the nominal is 2500. It spins ay any speed you like when it is set up as an X axis.
I haven't connected the encoder output to Mach.
Cheers

David

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Using servo for spindle on lathe
« Reply #3 on: March 15, 2016, 04:08:21 PM »
The encoder counts are needed so that you can work out the steps per unit.
If however it was correct for the X I can work back if you can tell me the steps per unit you had set for that, also the pitch of the ballscrew and what, if any, gearing you had between motor and screw.
Hood

Offline DMBGO

*
  •  201 201
  • Time is the same in a relative way
    • View Profile
Re: Using servo for spindle on lathe
« Reply #4 on: March 15, 2016, 05:30:06 PM »
See the attached file for the X settings that work, the servo isn't on the lathe yet, and I haven't had delivery of the ball screws, so atm the steps per unit are a guess. I thought I could just disable the X axis in Mach, and use the same settings for a spindle. This is where my theory has a hole!
Cheers

David

Offline DMBGO

*
  •  201 201
  • Time is the same in a relative way
    • View Profile
Re: Using servo for spindle on lathe
« Reply #5 on: March 15, 2016, 05:30:48 PM »
Attachment
Cheers

David

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Using servo for spindle on lathe
« Reply #6 on: March 15, 2016, 05:46:23 PM »
Ah ok, well for a spindle you need to set things up a bit differently, Greg did it one way in a description he had on here but I did it another way and it works fine.
Basically as it is a spindle you would set the RPM as the Velocity, so you would set 2500 as that, you would then have to set the Steps per unit as the encoder count, so for example if it was a 2500 line per rev encoder you would set 10,000 steps per unit. The Accel would be revs per second per second so 20 would mean it would reach 2500rpm in a bit over 2 seconds.

One other important thing you have to do for the spindle is go to Config menu then Spindle Pulleys and set the Max RPM up the same as you have in Motor tuning, ie 2500rpm.

Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Using servo for spindle on lathe
« Reply #7 on: March 15, 2016, 05:49:13 PM »
Oh one other thing, you will have to set the ESS up for the frequency, so it can output the steps per unit required.
Hood

Offline DMBGO

*
  •  201 201
  • Time is the same in a relative way
    • View Profile
Re: Using servo for spindle on lathe
« Reply #8 on: March 15, 2016, 06:10:04 PM »
Thanks a milion Hood. I don't think I would have ever worked that out on my own!
I'll give it a try in a couple of hours.

Thanks again

Davel
Cheers

David

Offline DMBGO

*
  •  201 201
  • Time is the same in a relative way
    • View Profile
Re: Using servo for spindle on lathe
« Reply #9 on: March 15, 2016, 07:09:35 PM »
Well, some areas were successful, but others not. I set the servo back up, and configured the motor in motor tuning as shown in the attachment.
I tested from 200rpm up to 700rpm and the servo controller displayed the speed that I commanded in Mach. Ie: M3S400 made the servo controller display 400rpm and I assume the servo was turning at that speed.
However, once I went past 700rpm, the servo would just stop turning with no errors on the controller or Mach. When I used an M5 command after it had stopped the motor would start to spin once it decelerated to 700rpm down to 0rpm.

This is the issue that I was trying (not very well) to describe before.

Cheers

Dave
Cheers

David