On Thursday 10 September 2015 22:10:50 Gene Heskett wrote: > On Thursday 10 September 2015 20:46:50 andy pugh wrote: > > On 11 September 2015 at 01:44, andy pugh <bodge...@gmail.com> wrote: > > > I think you should use RPM all the way to the pwmgen and limit the > > > pid to 98% of the pwmgen.scale > > > > Actually, given that encoder velocity is returned in RPS then use > > RPS all the way, from motion.spindle-speed-out-rps all the way > > through the pid to the pwmgen. > > Limit the pid max output to 98% of the pwmgen.scale parameter. > > And that will get rid of the limit2 to do that I believe. > > Thanks Andy. > > Cheers, Gene Heskett
One hopefully last question then Andy, can hal or axis do the math such that there is one master place to specify this "scale", and set the pid's maxoutput to 0.98 * scale? Or do I have to loadrt a scale module, addf it at a suitable time, setp its gain to 0.98, set its input to the same inif files S_SCALE, and feed its output to pid.s.maxoutput? I can do either of course, but the math is a one time thing at init time whereas the addf refreshes it, wasting a few cpu cycles every servo-thread. But I just did the other using a scale module. I'll see how it works tomorrow. Thanks Andy 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) Genes Web page <http://geneslinuxbox.net:6309/gene> ------------------------------------------------------------------------------ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users