Hello Guest it is July 12, 2020, 12:10:05 AM

Author Topic: Servos progressing well, but question about index  (Read 4059 times)

0 Members and 1 Guest are viewing this topic.

Offline rcaffin

*
  •  1,029 1,029
    • View Profile
Re: Servos progressing well, but question about index
« Reply #20 on: September 22, 2017, 08:11:31 PM »
Quote
the refresh rate on my Allen Bradley servo also used as a spindle motor is 8kHz. The manufacturer claims a control bandwidth of over 500Hz.
At max speed my spindle is rotating at 58 rev/second,
Allen Bradley is a good brand: I know it well.
But exactly what is the servo controller basing its refresh rate of 8 kHz on, if you are only getting one index pulse every rev and you are doing 300 rpm for threading? That's one index pulse every 200 mS. The maths just does not work.

I suspect your Allen Bradley servo system is using a lot more than just the Index pulse - maybe there is an encoder hidden inside the system? A lot of the older and more expensive servo mfrs built them that way.

Now, translate that to the hobbyist who has a small 500 W DC motor on the spindle and some sort of simple power supply to drive it. Can he make a nice clean M45x0.5 mm thread on that? (Close to a camera filter thread I think.)

Cheers
Roger

Offline rcaffin

*
  •  1,029 1,029
    • View Profile
Re: Servos progressing well, but question about index
« Reply #21 on: September 22, 2017, 08:17:46 PM »
Hi Rich

Well, Mach starts by letting the spindle spin a few times to get a nice average spindle speed - that is true. So having established that the spindle is running at 300 rpm, it starts the Z axis travelling in sync. Some mm later the tool hits the metal - and the spindle drops to 360 rpm. Mach will not know anything about that until the next index pulse arrives. So it HAS to assume that the the spindle speed has stayed constant, until it gets evidence that it has not.

To be sure, if you have a 3 kW synchronous AC motor driving the spindle through belt reduction, and the thread is M6x1, the motor will not be affected by the load. But if you have a hobbyist machine with a 500 W (DC or AC) motor, as so many do, things are different. And so we get repeated complaints that 'threading is not working'.

Cheers
Re: Servos progressing well, but question about index
« Reply #22 on: September 22, 2017, 08:26:52 PM »
Hi Roger,
yes the Allen Bradley servo has an incremental encoder of 2000ppr for a resolution of 8000 counts. The servo reads the position 8000 times a second and
does the control calculation and correction. If the command is to maintain a constant speed the servo/driver loop can close the loop with a far greater
bandwidth than an index pulse alone. The index pulse is only useful to the servo when it is referencing at start up. That Mach uses a single index
pulse to snychronise thread starts is a useful coincidence. The servo loop is trying to maintain constant speed and it capacity to do so is very good,  its
trying to reduce the error 8000 times a second when the servo is rotating at threading speeds, say 300 rpm or only 5 revs per second.

Craig
My wife left with my best friend...
     and I miss him!

Offline rcaffin

*
  •  1,029 1,029
    • View Profile
Re: Servos progressing well, but question about index
« Reply #23 on: September 22, 2017, 08:50:38 PM »
Hi Craig

EXACTLY.
What many of us want is for low-speed PID control using an encoder to be added to the ESS. We don't need encoder feedback at 4000 rpm - that is fast turning speed and 3900 rpm would (usually) do just as well. So if the FPGA in the ESS can only do the PID up to 600 rpm - no worries.

Cheers
Roger
Re: Servos progressing well, but question about index
« Reply #24 on: September 22, 2017, 09:14:13 PM »
Hi Roger,
yes certainly that would be useful for many people. OP in this case has a servo and drive not wildly dissimiiar to mine and it can maintain constant
speed under almost any circumstances and signal an alarm because  of deviation from programmed profile at need.

I suspect that it may be some time before the ESS has the ability, Andy has little time left over for development after support duties.

Even then it will be a very distinct challenge for many to program PID loops with what promises to be a fairly low level instruction set. I for
instance had to spend sometime simulating a high gain integrator loop as a means for generating a low numerical noise speed signal from
my resolver-to-encoder module. That such a technique is useful or required will not be easily understood by a majority of Mach users, it is likely
that decrepit control engineers such as ourselves, or me at least, are going to have to lead the challenge for others to get any useful gains.

I have done a little reading about the closed loop option available for the HICON unit and it sounds like the manufacturer has arranged it so the loop
could be easily closed around their Masxsine servos. While other devices could be closed up the same way the software convenience is gone... its
plain hard work from there.

I don't have access to any Galill products but would luv to see how control loops are constructed using their motion code.

Craig
My wife left with my best friend...
     and I miss him!

Offline rcaffin

*
  •  1,029 1,029
    • View Profile
Re: Servos progressing well, but question about index
« Reply #25 on: September 23, 2017, 12:27:31 AM »
Hi Craig

Actually, after some prompting from a couple of us, Andy is now looking at the possibility of putting some spindle servo control into the ESS for Mach3 as the next priority. I have emphasised to him what i have been saying here: that the big need is for pid control of the spindle using an encoder for the lower end of the speed range.

We know it CAN be done: a Gecko servo drive can rotate a DC brush motor at 1 rev/minute very easily on a normal axis. The big Q is whether there is enough real estate left in the FPGA for this to be shoe-horned in.

Actually programming it - there must be hordes of tutorials on the web these days with code already there. It's not that hard, especially if you start with someone elses existing implementation.

My thought is that it would be a huge boost to Mach and the ESS to have this. A small hobby lathe turning 45 mm filter threads perfectly, and so on. Sure, you might need to do it 0.05 mm at a pass - so?

Cheers
Roger

Re: Servos progressing well, but question about index
« Reply #26 on: September 23, 2017, 12:50:22 AM »
Hi Roger,
you are right of course, it would be a boon to many whom are not in a position to buy a capable modern servo and drive. Indeed Machs origin is
just exactly a response to the need for an affordable option for hobbyists, if we forget that we break faith with all those who've devoted so much
time and energy to get Mach to where it is.

Programming a loop is as you say not too bad, its when you start summing and differencing over previous iterations of the loop to achieve I and D
components that the difficulty and confusion arises. Also some of the limits and precautions to get numeric stability, integrator wind up for instance,
are very much necessary to a successful solution but don't have any simple explanation or implementation that may mean many who wish to take advantage
of a closed loop control of a spindle hopelessly overmastered by the programming required. To get useful uptake would require some sort of template
where a user substitutes various parameters and the actual programming be already done by the manufacturer. That would represent a challenging
task for any manufacturer but especially so those in the hobby market whom are chronically under resourced ie just about all the Mach capable suppliers.

Craig
My wife left with my best friend...
     and I miss him!

Offline rcaffin

*
  •  1,029 1,029
    • View Profile
Re: Servos progressing well, but question about index
« Reply #27 on: September 23, 2017, 12:55:47 AM »
Hi Craig

All of the above.
Big Q: can it be fitted into the FPGA? Dunno.

Yes, the set-up menu would need to allow the user to tweak the coefficients. Fair enough. More sophisticated stuff, like anti-dither bands, might or might not follow.
If offered the chance, I will beta test. Dunno when though.

Cheers
Roger
Re: Servos progressing well, but question about index
« Reply #28 on: September 23, 2017, 01:14:46 AM »
Hi Roger,
if you want to roll up your sleeves and get stuck in I too would be a starter, I don't consider myself brilliant at programming but have had a few
wins along the way, including assembler.

Craig
My wife left with my best friend...
     and I miss him!

Offline rcaffin

*
  •  1,029 1,029
    • View Profile
Re: Servos progressing well, but question about index
« Reply #29 on: September 23, 2017, 02:28:36 AM »
Hi Craig

Oh, I think Andy would have to do the programming of the FPGA in the ESS. Special tools and compliers are needed. All the customer would be 'allowed' to do would be to adjust the PID coefficients - within limits.

Programming - I started around 1970, and yes, in Assembly. Since then I have done most things you can do with a computer, barring massive web site jobs. One has one's pride, after all.

Cheers
Roger