Hello Guest it is July 11, 2020, 11:35:20 PM

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

0 Members and 1 Guest are viewing this topic.

Offline DMBGO

*
  •  200 200
  • Time is the same in a relative way
    • View Profile
Servos progressing well, but question about index
« on: September 22, 2017, 12:35:51 AM »
As mentioned in my last post, my problem with the Z axis was resolved and things have proceeded on the stepper to servo conversion of the lathe . I now have servos working well on the Z and X axis. The Spindle servo is also working (you'll notice I didn't say "well" there). According to my laser tachometer it is spinning at whatever rpm I command, and since it is a servo, I thought that M3 would take this on trust :) and display the commanded speed in the "Actual RPM" DRO. As I post this I am realising that M3 probably needs some type of spindle index sensor, since it would otherwise have no way of compensating for speed fluctuations when threading etc.
No point really in proceeding with my question.
Bye
Cheers

David
Re: Servos progressing well, but question about index
« Reply #1 on: September 22, 2017, 12:43:05 AM »
Hi,
how is the spindle servo driven? Does Mach3 send an analogue voltage or a step/dir signal?

Craig
My wife left with my best friend...
     and I miss him!
Re: Servos progressing well, but question about index
« Reply #2 on: September 22, 2017, 02:59:24 AM »
Hi,
what you want is a closed loop control....Mach3 is not suitable.

Closed loop control occurs when an encoder/index pulse /tacho measues the current speed of a motor, some electronic device or computer compares the current
speed with the programmed speed and increases or decreases the voltage/current/frequency to the motor to  get it closer. While Mach3 can read an encoder
it can only stop and do the comparison and consequent correction about ten times a second, the macro pump rate. The Nyquist sampling theorem tells us that the
best control bandwidth is half that ie 5Hz. A control engineer would say that you'll get no/poor 'discrimination' at 5Hz, in fact it will still be pretty ragged at 1Hz.
Your control bandwidth is 1Hz at best, any variation in speed of your spindle due to load or whatever that occurs faster than once per second cannot be corrected
by Mach3, its just too damn slow.

Mach3 is primarily a Gcode interpretor and trajectory planner and does pretty well, as a closed loop motion control device it sucks.

Mach4 is much faster with the PLC script running every 10ms easily and faster if you wish to program it so. It can achieve a Nyquist rate of 50Hz  and pretty good
discrimination at 5Hz. Useful but hardly great, for a spindle I'd like about 5-10 times better and for an axis servo 100-500 times better. Yes axis servo bandwidths
are at least hundreds of Hz, 500Hz is a common number but 1kHz and more is not unheard of even if expensive.

There are a few Mach ready motion control devices that can close a control loop nicely, Galill, HICON, KFLOP and maybe others. All are reasonably pricey. In truth
most are best considered motion control devices that can optionally close a loop but is not their primary claim to fame.

The best device to close a servo loop is a matching servo drive. If you choose a servo and drive from the same manufacturer you can be pretty sure that 1) it
will work and 2) achieve best or near best performance capable of that servo.

With a suitable drive Mach can feed it with an analogue voltage say and the drive/servo loop will maintain its speed to within a small fraction of 1% depending
on the drive/servo pretty much irrespective of the load AND you don't have to do any fancy programming with Mach. Theres a reason control engineers are weird
antisocial chain smoking alcaholics....it comes from trying to program PID control loops on poor gear for an uncaring public..%$#)(*&&&!!! If you value your
health don't be too inclined to program feedback loops.

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 #3 on: September 22, 2017, 06:20:13 AM »
I believe closed-loop control for a spindle may be coming soon for the ESS as well. That will be a firmware upgrade - no cost. You would need suitable hardware on your motor of course.

Cheers
Roger

Offline ger21

*
  • *
  •  6,282 6,282
    • View Profile
    • The CNC Woodworker
Re: Servos progressing well, but question about index
« Reply #4 on: September 22, 2017, 07:34:10 AM »
Quote
As I post this I am realizing that M3 probably needs some type of spindle index sensor,

Yes, you need a sensor, to send an index signal to Mach3, so it knows how fast the spindle is spinning.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline DMBGO

*
  •  200 200
  • Time is the same in a relative way
    • View Profile
Re: Servos progressing well, but question about index
« Reply #5 on: September 22, 2017, 08:06:55 AM »
Thanks for your in depth replies Craig. The spindle servo that I am using atm is a GSK AC servo, and DA98B servo controller from GSK as well. I know that the loop is closed in the servo controller, but I was hoping that M3 would also take this as a given since no index pulse was configured, and consequently display the commanded speed in the "Actual RPM" DRO. I haven't tried to thread with this config, since I think it will probably fail or the pitch of the thread will be wrong. This is just supposition, mind you.
Tomorrow I will reinstate my hall effect encoder for the spindle that I built about 10 years ago, when I first converted the lathe to CNC using steppers. I am using step and direction to drive the servo btw, or as our Asian brothers across the way seem to call it pulse and sign (I like the idea of a signpost to point out directions). I do have a 0 to 10v converter from Peter H, but I am not aware of any benefit in using it.
I look forward to seeing a closed loop spindle control for the ESS Roger, thanks for mentioning this.
I can't see though any shortcut that I can take atm , it looks like I will bite the bullet, and ensure compatibility etc.
I agree with GER21 unless anyone has another idea?
Oh and I have had a M4 license for some time, but I haven't been able to bring myself to undertake the required learning curve.
Thanks again
Dave
Cheers

David
Re: Servos progressing well, but question about index
« Reply #6 on: September 22, 2017, 09:48:39 AM »
Hi,
you don't need it, as you say the loop is closed by the drive. You may have noted that there is an alarm that triggers if the servo deviates by
some small programmable amount, say 20 encoder counts. If you have a 10000 count per rev encoder that means your servo will alarm if it
lags by 3/4 of a degree from where its supposed to be....that's right 3/4 degree from where it supposed to be at say 1000 rpm! This thing is so
damn accurate it was intended as an axis servo not just a mere spindle motor.

The actual and programmed speed should be within a few parts per million.....you are wasting time and money if you try improve on that.
No doubt if I read the manual closely there will be an encoder output. This could be used by Mach to measure the rpm and display it if
you want to be totally anal retentive about it.

There is talk of the ESS having an API but given it has yet to get backlash compensation and THC support and I've been waiting for months I wouldn't
hold my breath....anoxia is a bad way to go! I don't intend this as a complaint about Warp9 either, I use an ESS and luv it, I just don't need a lot of
bull********* stuff.

I don't know whether you have done any control systems programming but PID programs are not for the faint hearted...you have to worry about loop
parameters, integrator wind up, how to generate a low numerical noise speed signal, usually done by a high gain integrator loop, and if you have to ask
you do not want to try it!

If you've already got full speed range control with step/direction signalling then using analogue voltage for speed control is going backwards...you already have
position control, and not just any position control but the full blown modern sense of position control...that is a final position accuracy of (programmable)
four encoder counts say, 8.6 min of arc, just a bit over a tenth of a degree!

The bottom line is you stumped up with I'm guessing $1000 for a servo and drive, ie you paid good and what you've got is good, in fact very good! If your
going to worry about stuff you might try worrying about who's going to win the next Melbourne Cup!

Craig
My wife left with my best friend...
     and I miss him!
Re: Servos progressing well, but question about index
« Reply #7 on: September 22, 2017, 09:56:47 AM »
Hi,
crazy thing about Aussies, you have to hit them with a stick to make them realise when something is good! You've paid for and got Mach4 but stick with
Mach3.

I'll send you an email...I've got some bottom land to sell you...bottom of what you ask....don't worry I'm Kiwi...would I put you crook? LOL

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 #8 on: September 22, 2017, 04:43:06 PM »
Hi Joe

Yes, I have a PhD from a Uni Dept which specialised in control systems. I also have an original copy of Jacob Tals' book on digital PID control - I think he was working for Galil.

I want PID control via a full encoder on the spindle so I can do lathe threading properly. Control via just the Index pulse is not good enough!

Cheers
Roger

Offline DMBGO

*
  •  200 200
  • Time is the same in a relative way
    • View Profile
Re: Servos progressing well, but question about index
« Reply #9 on: September 22, 2017, 05:04:06 PM »
With 2500 available counts per rev, 1 count does just not cut the mustard (or the thread). It needs to be fed back to the system, so that one can see (on an eye candy display) any deviations that may be occurring within an individual revolution, causing unsightly, and inconvenient deviations.
Cheers

David