Steve Blackmore wrote:
>
>>> Also when slowing down, spindle overshoots badly then comes back to
>>> commanded speed.
>>>       
>> The signal out of EMC isn't doing this, so you will have to look
>> into how to fix it on whatever drive electronics you have.
>> Sometimes there is a setting.
>>     
>
> EMC isn't helping. There is no acceleration/deceleration setting I can
> see in the hal or ini files produced and spindle inertia and emc are
> fighting each other. A 30lb chuck slowing from 3000 rpm to 200 rpm
> instantly is never going to happen without a brake, the minimum decel in
> the VFD is 1 second.   
>
>   
I jus ran into this with a rigid tapping run.  I had to put a lowpass 
filter between the spindle speed command and the servo amp that is 
driving the spindle motor.  Here's the code that does it :

# set up 4th PWM generator as a spindle speed control
newsig spindle-speed float
newsig spindle-pwm-cmd float
newsig spindle-pwm-filt float
linkps motion.spindle-speed-out => spindle-speed
linksp spindle-speed => mult2.1.in0
setp   mult2.1.in1 0.0009018
linkps mult2.1.out => spindle-pwm-cmd
linksp spindle-pwm-cmd => lowpass.0.in
linkps lowpass.0.out => spindle-pwm-filt
linksp spindle-pwm-filt => ppmc.0.pwm.03.value
setp lowpass.0.gain 0.01

newsig spindle-enable bit
# SpindleFwd and SpindleRev come from univpwm_io.hal
linksp SpindleFwd => or2.0.in0
linksp SpindleRev => or2.0.in1
linkps or2.0.out => spindle-enable
linksp spindle-enable ppmc.0.pwm.03.enable
#

The first bunch mutiplies motion.spindle-speed-out by a conversion 
factor to get the right RPMs, then feeds that through the lowpass filter 
to get a gradual change.  In this particular case, the parameter of 0.01 
gives about a 400 ms slope to speed change from 1000 RPM forward to 1000 
RPM reverse.

The second part ors together the spindle direction commands to enable 
the servo amp.  This particular system uses a real servo amp, which is a 
four-quadrant drive.  If your VFD needs a unipolar speed command (0 to 
+10V) you want to do the filter first on the bidirectional signal before 
taking the absolute value.  You might have to derive the forward/reverse 
commands from the sign of the filtered speed command, so the drive sees 
the direction change right as the value passes through zero.


Jon

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to