Kirk Wallace wrote:
> What is the status of PID_MAX_VEL and PWM_OUTPUT_SCALE? My understanding
> is that they were created to fix persistence issues. I am using EMC
> 2.1.7 so should I still use them?
>
Arrghhh! I don't actually know. PID_MAX_VEL is a standard part
of the modern ini file, and should still be used. It is to
allow the servo algorithm to have a little extra headroom for
acceleration.
PWM_OUTPUT_SCALE is an anachronism, as you say above. The best
way to find out if it is still active is to do the following,
after doing a cd to the configs directory you are using:
grep PWM_OUTPUT_SCALE *.hal
This will scan all the hal files for use of this parameter. If
it doesn't show up at all, then it is not being used.
Ahh, I have done it for you :
# set output scaling from ini file
# note that these are using PWM_OUTPUT_SCALE - they should
# use OUTPUT_SCALE, but right now EMC2 re-writes that to
# 1 on shutdown for some reason. Once that is fixed, this
# should be changed
setp ppmc.0.pwm.00.scale [AXIS_0]PWM_OUTPUT_SCALE
setp ppmc.0.pwm.01.scale [AXIS_1]PWM_OUTPUT_SCALE
setp ppmc.0.pwm.02.scale [AXIS_2]PWM_OUTPUT_SCALE
You can just change these lines in hnc_motion-3a.hal
and remove the PWM_ from the 3 lines above. Then, remove the
now redundant lines with PWM_OUTPUT_SCALE from your ini file.
But, then, I think you will find that if you turn OUTPUT_SCALE
back down to -1, you will get MORE voltage out of the servo amp.
OUTPUT_SCALE (which is just an ini parameter for the hal
parameter ppmc.0.pwm.xx.scale is a DIVIDER, not a multiplier
From the file .../src/hal/drivers/ppmc.c, in the routine
static void write_pwmgens(slot_data_t *slot)
is the code :
/* calculate desired duty cycle */
dc = *(pg->value) / pg->scale;
value is the commanded velocity from the PID calculation, and
obviously it is divided there by the scale parameter. So, a
SMALLER number will increase output. You were compensating for
this division by turning P up much higher.
>>From a previous thread and a desire to optimize my .ini file settings, I
> decided to monitor the DC output from my UPC/PWM amp setup to my brushed
> motors while doing some tuning. I ramped up my jog velocity until I got
> following errors and noted that the voltage was 22 Volts. Considering
> that my motor supply is 100 Volts, I concluded that I needed to increase
> the output scale from 1 to whatever was needed to get the motor voltage
> close to 100 Volts. (I thought that I read somewhere that OUTPUT_SCALE
> should only be +1 or -1?)
There's really no reason to mess with output scale, other than
making the sign correct to close the loop, as P does the same
thing (although it IS a multiplier).
Jon
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users