> From: andy pugh [mailto:bodge...@gmail.com]
> On Thu, 8 Jul 2021 at 23:19, John Dammeyer <jo...@autoartisans.com> wrote:
> 
> > When I click the '-' with the RPM at 501 it drops to 401. Again and so on 
> > down to 101.  The last click should take it down to 1 or 0
> RPM.  However that last click sends it to max speed of 3000 RPM.
> 
> This happens when the PID goes negative. Imagine that the PID output
> is 0, but the speed is still positive, so the PID reduces the output
> to -10. This becomes an absolute speed ot 10, which is still too high,
> so the PID goes down to -100....

That's what I though was happening.   Isn't it possible to also just use the 
equivalent of a floor function.  Ie. Don't really want the absolute value but 
instead not allow it to go negative?

If the speed is too high I can see the error term multiplied by the P being a 
negative value to be added to the commanded velocity.  So velocity is reduced. 
But should the spindle motor even be allowed to go backwards during the control 
loop?  That could damage cutters.  

If the error term * P is negative added to the current velocity < 0 then then 
0.  Not positive with a direction change.

John


> 
> The best way round this is probably to pass the pid output through an
> abs block (I think that you do that) but then control the spindle
> direction using the abs.0.is-positive / is-negative outputs rather
> than the spindle direction pins.
> 
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is
> designed for the especial use of mechanical geniuses, daredevils and
> lunatics."
> � George Fitch, Atlanta Constitution Newspaper, 1912
> 
> 
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to