On Wed, May 06, 2009 at 04:37:07PM +1000, Frank Tkalcevic wrote:
> I've just configured my first emc project, a 9x20 lathe conversion.  I'm
> using a large servo for the spindle - I'm hoping to be able to use it as a
> 4th axis for some light engraving down the track.
> 
> My problem - I've set up the servo for the spindle, but like a servo, it
> responds imediately to change requests.  I haven't put a chuck on it yet,
> but it I'm sure it will break the belt when it tries to stop from 1000rpm to
> 0, instantly.
> 
> Any ideas on how I can soft start and stop it?

Send the commanded spindle speed through a limiter before pid, so that
the pid 'command' value varies slowly.

"limit2", "limit3", and "lowpass" are three built-in components that
limit a signal:

"limit2" limits the range and first derivative of a signal.

"limit3" limits the range, first and second derivatives of a signal.

"lowpass" uses an exponentially-weighted moving average to track an
input signal.

Here's a standalone hal setup I wrote to show the behavior of each of
these limiters when fed a step signal:

########################################################################
loadrt threads period1=1000000 name1=thread

loadrt siggen
loadrt lowpass
loadrt limit2
loadrt limit3

net square  siggen.0.square => lowpass.0.in limit2.0.in limit3.0.in
net lowpass <= lowpass.0.out
net limit2  <= limit2.0.out
net limit3  <= limit3.0.out

setp siggen.0.frequency .1

setp lowpass.0.gain .9

setp limit2.0.maxv 2

setp limit3.0.maxv 2
setp limit3.0.maxa 10

addf siggen.0.update thread
addf lowpass.0 thread
addf limit2.0 thread
addf limit3.0 thread

start

loadusr halscope
########################################################################

.. run it with 'halrun -I limiters.hal' at the terminal.  In halscope, I
selected the signals 'square', 'limit2', 'limit3' and 'lowpass' and
captured a trace: http://emergent.unpy.net/files/sandbox/limiters.png

Jeff

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to