Steve Blackmore wrote:

>On Tue, 7 Apr 2009 19:59:17 -0500, you wrote:
>  
>
>>On Wed, Apr 08, 2009 at 12:22:52AM +0100, Steve Blackmore wrote:
>>    
>>
>>>A couple of questions though, using halscope, pulses are clean and even,
>>>but custom panel spindle speed indicator readout jumps about quite a
>>>bit?
>>>      
>>>
>>How are you generating the signal for the indicator?  If it's a ddt of
>>the encoder counts, you'll get quantization.  This is the same problem
>>being discussed in the pid-D-velocity thread.  In your case, running
>>the ddt in a much slower thread will alleviate that.  The slower
>>response is the tradeoff, but even a .2 or .5 second thread is
>>entirely adequate for a visual indicator.
>>    
>>
>
>Stepconf did the configuration, I assume it just reads the index signal?
>  
>
It depends on which spindle-related signals you connected to parallel 
port pins.

If you only connected spindle index to a parallel port pin, then it's 
only using index.  If you're seeing reasonably correct speed feedback 
values, then your input setup is fine (might be able to be improved, but 
it's working).

>>>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.   
>  
>
It's true, EMC2 doesn't use an acceleration profile by default - that's 
left to the VFD.  This might be something to add to stepconf in the future.

You can try adding it yourself, in the "custom HAL file" generated by 
stepconf.
Here's a guide:

If the decel is 1 second from any speed to any speed, then you may want 
to use a lowpass function.  If it's some number of RPM/second, then you 
should use a limit2 instead.  I'll assume that lowpass is the right one 
to use.
Load the lowpass component
Add its function to the servo thread
Set the gain on the lowpass to 0.002 or so (this runs 1000 times per 
second, so 0.001 or 0.002 should give you about a second of slew time)
Disconnect the spindle output signal from the PWM generator, and connect 
it to the lowpass input.
Connect the lowpass output to the PWM

This example code might work:

loadrt lowpass count=1
setp lowpass.0.gain 0.002
addf lowpass.0 servo-thread
unlinkp pwmgen.0.value
linksp spindle-cmd lowpass.0.in
net filtered-spindle-speed lowpass.0.out pwmgen.0.value

- Steve


------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to