On Thu, 8 Jul 2021, John Dammeyer wrote:

Date: Thu, 8 Jul 2021 17:17:09 -0700
From: John Dammeyer <jo...@autoartisans.com>
Reply-To: "Enhanced Machine Controller (EMC)"
    <emc-users@lists.sourceforge.net>
To: "'Enhanced Machine Controller (EMC)'" <emc-users@lists.sourceforge.net>
Subject: Re: [Emc-users] Runaway PID spindle.

Maybe it's a MESA issue? It's set up as output type 1 which is 0-100% which means either the Out2 should invert when pwmgen gets negative? Or the output should clip to 0 when the calculation determines a negative output.
http://linuxcnc.org/docs/html/man/man9/hostmot2.9.html#pwmgen

PWM mode 1 is basically sign-manitude mode so if you connect
the PWM direction to the drives direction control,
and give signed command and feedback inputs to the PID
it should work properly.

BTW this is commented out. setp pid.s.maxerror .0005 If I set it to 0.05 then the spindle does stop but now the PID isn't very responsive. I have to add large amounts of P and I to get it to stabilize quickly and at 100RPM it then surges

Set it to 0.5 and it goes wonky with the negative error again. Any smaller than 0.05 and response is so poor that it's really not a manageable system.

I could just switch over to using step/dir and do away with the PWM but that likely won't solve the closed loop problem. The AC Servo by itself is responsive and stable. But the pulley ratio means what I tell it isn't what it's doing and that's an issue for tapping.

John


-----Original Message-----
From: andy pugh [mailto:bodge...@gmail.com]
Sent: July-08-21 4:25 PM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] Runaway PID spindle.

On Fri, 9 Jul 2021 at 00:21, John Dammeyer <jo...@autoartisans.com> wrote:
>
> Oh and I was using this series of postings as a guide.
> https://forum.linuxcnc.org/49-basic-configuration/32553-spindle-pid-control
> but he never ran into this issue.  Same with the other postings where they 
have problems achieving the speed.  Not running away
with a negative correction.

I have had exactly your problem in the past, but I can't remember how
I fixed it, as it was years ago.

But it was definitely caused by the PID going negative, but negative
output giving positive speed/

--
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

Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to