Andy Pugh wrote: > On 2 August 2010 05:49, Jon Elson <el...@pico-systems.com> wrote: > > >> Well, if you made tiny jogs in each direction, small enough so that they >> didn't cause a following error, then the servo amp would go live and all >> would be fine. >> > > You _could_ do it explicitly in the HAL file, before the pins are > linked and before the axes are enabled (which would avoid following > errors.) > Something like: > > setp hm2_7i43.0.gpio.001-out true # amp enable pin > setp hm2_7i43.0.pwmgen.00.value 0.05 > setp hm2_7i43.0.pwmgen.00.value -0.05 > net pwm-output pid.0.out => hm2_7i43.0.pwmgen.00.value > net Xenable axis.0.amp-enable => hm2_7i43.0.gpio.001-out > > It must be done EVERY time the servo amp comes out of Estop. Disabling the amp sets the shutdown latches, and they have to be cleared EVERY time the amp is enabled. So, it can't be done before the amps themselves are enabled. It could be done when the amps are enabled (F1) but before the positioning loop is enabled (F2).
I don't know if the above code will work for other reasons. It sets the PWM output VERY rapidly to the two polarity outputs. My code waits a full servo cycle before flipping to the other direction. That much time isn't needed, but you need to make sure at least one 5% wide pulse gets to the amp before you reverse it. Anyway, the above scheme would only do this during program startup, not every time you come out of E-stop. Jon ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users