Wow,

I have seen the light: servos are now working as expected.

Sebastian Kuzminsky wrote:
> The hm2-servo configs set both of them to 1.0, and that's probably a 
> reasonable value.
"Reasonable value" ... Big grin ...

>   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.
>   
Thanks - all this stuff really helps me.
The integrator manual talks about a lot of settings in the .ini file (in 
section 7.2.9). It mentions MAX_OUTPUT, which is quite different from 
the pid.maxoutput (that one is linked to [AXIS_x]MAX_VELOCITY).

>> 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. 
>   
I know, but it worked. At least I had my servos rotating such that I 
could start PID tuning.
And i am repeating myself when stating that I should be able to change 
the unit dimensions without touching the PID parameters.
Finally I succeeded in this and it was simple and almost as stated in my 
previous mail:

After changing the units from inch to mm I had this 0.025mm/rev system 
but it needed to be 2.5 mm/rev.
Changing INPUT_SCALE from 81920 to 819.2 made the encoders report the 
correct travel, changing OUTPUT_SCALE from 1 to 100 made the same 
scaling on the motor control so that now a 1 volt signal resulted in 
2mm/s instead of 0.02 mm/sec

But ... after reading your previous mail and re-thinking about the 
FERROR and MIN_FERROR I have seen the light.
The 0.025 mm/rev system had  0.000012 mm/count on the encoder but with 
2.5 mm/rev this now is 0.0012 mm/count. But a MIN_FERROR of 0.001 is 
then of course smaller than the resolution of the encoder.
In order to have the same system as before I need to multiply both error 
values by 100.

After a minute of P tuning I now have the MIN_FERROR back on 0.05 (mm), 
now I just have to the ID part and see if i can get the FERROR around 0.01
> But take my advise with a grain of salt, since i've never actually tuned 
> a servo...  ;-)
>   
Tuning a servo system is easy (compared to what I've just done) but I 
needed to attach the motor to the mill to do that.
Servo is now mounted on the machine and I started to increase P until I 
woke the neighbors.
After handing them some coffee, showing them the machine and explaining 
what I am doing I can now finally continue to add some ID to my P and 
really tune the servos :-)

Thanks for all the fish,

    Rob

------------------------------------------------------------------------------
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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to