Rob Jansen wrote: > Sebastian Kuzminsky wrote: >> <http://linuxcnc.org/docs/devel/EMC2_Integrator_Manual.pdf> >> > 2.2 explains the basic concept. Section 29 goes a bit deeper into tuning > of the PID constants but OUTPUT_SCALE and MAX_OUTPUT are not mentioned > over there.
OUTPUT_SCALE and MAX_OUTPUT are described briefly in section 7 of that document. The hm2-servo configs set both of them to 1.0, and that's probably a reasonable value. MAX_OUTPUT is the biggest value that the pid component can specify for the hm2 pwmgen value input. The hm2 pwmgen divides its value input by its scale (OUTPUT_SCALE, 1.0), and the result becomes the PWM duty cycle. So setting both the pid.maxoutput and the hm2 pwmgen.scale to 1.0 means that the pid output gets clipped to [ -1.0, +1.0 ], and directly corresponds to the PWM duty cycle. > If the PID tuning is done for a given system I should be able to change > the unit dimensions without touching the PID parameters: PID parameters > are dependent on the electronic and the mechanical properties, not the > unit size. The PID parameters in the hm2-servo sample config will be useless for your machine, and it's only coincidence that they worked at all. Especially with servo machines, you need to customize the config for your particular hardware. The best tool i know of for this kind of stuff is halscope. You can start halscope from axis or from the shell's command-line. You can use it to look at all of emc2's controlled variables, like the commanded and actual position, the following error, the pwm duty cycle the 5i20 is emitting, PID tuning parameters, etc. I'd start by setting the following error limit very high, like 10 mm or so, so emc2 doesnt keep shutting you down while you're tuning it. Then use MDI to move the axis less than the ferror limit, while watching the servo/PID behavior in halscope. But take my advise with a grain of salt, since i've never actually tuned a servo... ;-) The topic of servo tuning comes up periodically on this mailing list, a search of the archives may yield better suggestions. -- Sebastian Kuzminsky ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
