Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Tef9 on January 19, 2013, 05:33:19 PM

Title: Servo Basics
Post by: Tef9 on January 19, 2013, 05:33:19 PM
Hi There,

I have bought a servo system (DMM tech) I am now in a process of learning how to set this up.  Here is my problem:

I have bought oversized motors, so I can direct drive the mill.  I am trying to work out the steps per value, I have been told to use the value of 2000 as my ballscrew is 5mm pitch and 1:1 ratio this seems right to me. However this seems to limit the mill to 750mm/m do I need to modify the kernal speed or is there another way to get higher speeds?  The encoder is a 14bit enconder, any help would be appriciated as I would like to understand how to set these values and the DMM documentation is of little help in this area.

Thanks,

Andy

Title: Re: Servo Basics
Post by: Hood on January 19, 2013, 06:13:02 PM
You will have to use a higher kernel if you need faster rapids. That is why a lot of people that use servos, especially when the servos have high res encoders, use external devices such as SmoothStepper or CSMIO tc as they can pulse very cleanly at up to 40 times more than even the highest kernel in Mach when using the parallel port.
Hood
Title: Re: Servo Basics
Post by: Tef9 on January 19, 2013, 06:25:45 PM
Hi Hood,

Thanks for the response, do you alter the steps per value in acordance with the kernal speed.  Do you loose anything by having a higher kernal speed?  I have no interest in getting supper fast rapids (though it would be nice to see) would just like the system to work faster than 750mm/m.  Is there a calculation I can follow? Is smooth stepper recomended if you are using a servo system?  Sorry for all the questions.

Thanks,

Andy


Title: Re: Servo Basics
Post by: Hood on January 19, 2013, 06:38:55 PM
No steps per unit stays the same as that determines how far the axis moves when you command a move.
Some computers can handle higher kernels, some can not, you will just have to see.
You can work out the max rapids you can possibly achieve by doing the following.
For 25KHz it would be (25,000/2000) x 60 gives you units per minute max in that kernel
45KHz would give you 1350units per min max etc etc

External devices are nice if you use high resolution encoders and want reasonable rapids.

Hood

Title: Re: Servo Basics
Post by: Tef9 on January 19, 2013, 07:07:20 PM
Ahhh ok, how does the encoder affect the rapid? I have a 14 bit encoder, so I belive this to be quite high...perhaps a smooth stepper would be advisable..
I also found the rapid overide in the settings, is this adviseable or not?

Thanks,

Andy

Title: Re: Servo Basics
Post by: Hood on January 19, 2013, 07:49:43 PM
The encoder count determines the steps per unit you require. Yours is 2000 you said so what kernel you will need will be dependant on the rapid speed you require.
Some computers can manage 100KHz kernel, some struggle at 45KHz, you will just have to see.
If you did manage 100KHz kernel then the max rapid you can achieve with that is 3000units per min. Thats not really that fast but suppose it depends on type of machine. My Beaver NC5 Mill is 8000mm/min, big lathe 10,000mm/min and Chiron VMC is 20,000mm/min.
How fast a rapid will also depend on your motors max RPM.

Hood
Title: Re: Servo Basics
Post by: Tef9 on January 20, 2013, 08:46:16 AM
how do you derive the step per from the encoder, whats the calculation?  I was told to use 2000 however I still have no actual calulation to preform.  The encoder is 14bit where would I go from there?
I see what you mean about rapids, however it sounds like you have larger machinery and enclosed, I would be happy with around 5000mm/m but 3000mm/m is a good start point.  The servo is limited to 1000 rpm.  I have 16mm dia screws with a 5mm pitch.

Thanks,

Andy
Title: Re: Servo Basics
Post by: Hood on January 20, 2013, 09:09:36 AM
Ok 5000mm/min is the max you will get with 1000rpm motors and 5mm pitch screws direct coupled.

Regarding the encoder, I am not sure how they are worked out in that setup. That is not normal encoders so you will have to look in the DMM manual to see how they derive that number.
Hood
Title: Re: Servo Basics
Post by: jvaldes on January 20, 2013, 03:41:55 PM
A 14 bit encoder has 16384 steps per revolution which provide you 5mm/16384 minimum step size or .0000012 inch per step. This choice of encoder with a 5mm pitch leadscrew will be slow with any computer and unless you have it on a machine that has significant stiffness and flatness, is an overkill. On most home builds or lower level mills like republic, the most you can dream for is .0001" and really better than .0002 is unlikely. .0002 would represent 16 steps on your encoder leads crew combination. you would be better served by a 10 bit encoder which is 16 times faster at the same kernal speed. or a compromise such as a 12bit with a 4 times improvement in max speed.

Good luck
Title: Re: Servo Basics
Post by: Tef9 on January 20, 2013, 03:51:43 PM
Hi Hood,

Ahh so the motors are capable of 5000mm/m but only by useing an external device like smooth stepper?  Without an external device if I use 100KHz / 2000 * 60 this gives a figure of 3000mm/m maximum or am I missing somthing?

Thanks,

Andy
Title: Re: Servo Basics
Post by: Tef9 on January 20, 2013, 03:56:05 PM
Jvaldes - thanks for the reply, however its too late, I already have the motors, yes probably overkill but I aim to transfer them at a later stage to a large gantry router.  So there is some planning involved.  I am considering a smooth stepper addin as this might solve my problem.

Thanks,

Andy 
Title: Re: Servo Basics
Post by: Hood on January 20, 2013, 04:07:39 PM
jvaldes

High resolution encoders is not all about resolution of the machine. Depending on the servo drives and the speed it can react to the encoder then it may well produce a much smoother and cleaner motion if you have a higher count encoder. I posted some pics a while back in another thread showing the difference of a motor I had with a sine/cosine encoder. I could interpolate the encoders counts and by using a higher number and no other changes the drive could keep the motor on track much easier.

Andy,
 Depends, likely your drives have electronic gearing in them, that means you can have less steps per unit in Mach but the drive will multiply that and make the motor move the correct distance. Its not a method I personally like but it can allow you to get more performance from your hardware when using the parallel port. Well when I say performance really I should just say Velocity as your motion may actually suffer slightly, especially at very low speeds.

Hood
Title: Re: Servo Basics
Post by: Hood on January 20, 2013, 04:20:09 PM
jvaldes
here is the post I was referring to,
http://www.machsupport.com/forum/index.php/topic,21036.msg152440.html#msg152440
as you can see the higher count feedback from the encoder allows the drive to compensate much more quickly.
That may not be the case for all drives but will be for higher end ones. Not sure where the DMM drives fall, dont think they are basic but again not sure if they would really be classed as high end.
Hood

Title: Re: Servo Basics
Post by: Tef9 on January 20, 2013, 05:44:38 PM
Hi Hood,

Yes the internal gearing is set to 500, this is the lowest value.  What is the purpose of internal gearing, is this to give you options like in this situation?

Thanks,

Andy
Title: Re: Servo Basics
Post by: Hood on January 20, 2013, 06:22:25 PM
It is one of the uses, ie you cant get enough steps per unit set in Mach to get the Velocity you want, you can then set a higher gearing in the drive. Not an ideal situation but may work well enough.
Hood
Title: Re: Servo Basics
Post by: Tef9 on January 20, 2013, 06:37:38 PM
Hi Hood,

I see, is it as simple as I change the internal gearing from 500 to 1000 and my steps per is reduced from 2000 to 1000?  This could be the solution.

Thanks,

Andy
Title: Re: Servo Basics
Post by: Hood on January 20, 2013, 06:43:18 PM
If that is the way the gearing works in these drives then yes. I did look at them a long time ago and didnt think it was as simple as that but maybe I am thinking of some other drives.
Hood
Title: Re: Servo Basics
Post by: Tef9 on January 20, 2013, 07:03:18 PM
hmm think its more compelx, will have to study the documentation, however its not  a how to guide sadly.

Thanks for all your help.

Andy
Title: Re: Servo Basics
Post by: Hood on January 20, 2013, 08:42:59 PM
Yes I remember having a quick look at the manual and seeing it was not the type of manual you can just have a quick look at ;D
Maybe an email to DMM will get you some numbers to try.
Hood
Title: Re: Servo Basics
Post by: jvaldes on January 21, 2013, 05:40:39 PM
jvaldes

High resolution encoders is not all about resolution of the machine. Depending on the servo drives and the speed it can react to the encoder then it may well produce a much smoother and cleaner motion if you have a higher count encoder. I posted some pics a while back in another thread showing the difference of a motor I had with a sine/cosine encoder. I could interpolate the encoders counts and by using a higher number and no other changes the drive could keep the motor on track much easier.

Andy,
 Depends, likely your drives have electronic gearing in them, that means you can have less steps per unit in Mach but the drive will multiply that and make the motor move the correct distance. Its not a method I personally like but it can allow you to get more performance from your hardware when using the parallel port. Well when I say performance really I should just say Velocity as your motion may actually suffer slightly, especially at very low speeds.

Hood

Though I agree that the results is as the graphs show the reasoning is incorrect. The larger count encoders at the same kernal speed had different limits for speed and momentum, which results in different error allowance and less deceleration time, which later results in what you have on these graphs. The actual reasoning that should be considered is that if you were to cycle the increased rates at increase sample rates and where to operate them at the same velocity with the same error allowance (not in pulses but in dimensions) the outcome should be the same. But running an axis at high velocities with the expectation of  curve following is a matter of motor torque and inertia not pulse rates.
Title: Re: Servo Basics
Post by: Hood on January 21, 2013, 05:49:09 PM
Kernel? I presume you are talking about Machs kernel?
That was not using Mach that was a servo drive and motor sitting on the desk doing a move connected to the drives software and using the software scope in the drive software. Same Velocity, same acceleration, same everything with the exception of the interpolation of the encoder.

Hood
Title: Re: Servo Basics
Post by: jvaldes on January 22, 2013, 10:48:41 AM
Hood,

Sorry about the reference to Kernal, I mean sampling rate

Juan
Title: Re: Servo Basics
Post by: Hood on January 22, 2013, 11:06:29 AM
Not sure what you are meaning regards the sampling rate, if the scope then the sampling rate of it was exactly the same between tests. If the drive  then the Velocity regulator update rate is  250uS. and position regulator 1mS both fixed as far as I know.
The only setting changed in the drive was the interpolation of the sine/cosine encoder.
Hood