On Mon, 30 Nov 2020, Gene Heskett wrote:
Date: Mon, 30 Nov 2020 17:07:04 -0500
From: Gene Heskett <[email protected]>
Reply-To: "Enhanced Machine Controller (EMC)"
<[email protected]>
To: "Enhanced Machine Controller (EMC)" <[email protected]>
Subject: [Emc-users] crazy
Greetings all the pid experts;
I changed out the bob for one w/o the input capacitors, looks 1 million
times better on the scope
Playing with what little servo I have configured so far, trying to get it
to actually act like a servo. I don't have a valid SCALE yet but expect
it will be large so I set it to 1150. Hooked the encoder feed back back
up in hal. Couldn't make it move, pwmgen limited to about a 2% duty
cycle. Not enough to move the motor. looking at the pid_a with
halconfig, I saw that pid_a.maxerror was set to .0005. Curious, since
it was at that point sitting around 1000 out of balance, I did a setp to
set it to 1000. Motor almost jumped off the stepladder and ran toward
balance at a good clip but eventually stopped when encoder feedback into
pid_a.feedback was about 2 from equalling pid_a.cmd. That .0005 was an
old setting, but worked when a stepper was doing the shaft twisting. I
certainly don't remember adding it 5+ years ago.
That was set in the .hal file but I've no clue why. Whats the default if
its not set? It is not in the .ini file
Default if not set is 0 which means the error is unbounded.
Maxerror is bound on stepgen loops since the stepgen hardware is
an almost perfect velocity mode device (so FF1 does 99.99%
of the work). The advantage of the bound is that servo thread
jitter creates bogus position feedback errors and by bounding
these errors you reduce their effect on motion. This has largely
been made obsolete by the DPLL that reduces the stepgen and
encoder position sampling jitter to a small fraction of a
microsecond.
Right now I can run it either way, but it takes a long time to settle
like it needs a lot more Pgain yet, taking at least 30 seconds, to over
a minute to reach a quiet sorta balance as the motor stops before
hitting exact balance, but it may take many seconds of bumping along
before it stops for good, leaving the pwmgen outputting 10 to 15
microsecond pulses forever. But its progress, and I'm learning. And
wondering if I need to put a low level dither in it somehow.
And still no bolts for the motor mounts. So I'm twiddling my thumbs.
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>
_______________________________________________
Emc-users mailing list
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users