On Saturday 15 March 2014 19:37:55 andy pugh did opine: > On 14 March 2014 20:23, Gene Heskett <[email protected]> wrote: > > So it looks like I need another, but it seems to me there ought to be > > another choice besides this non-linear POS, and the PMDX-106. > > Why are you so obsessed by linearity? I thought you had already > managed to linearise in software? I have, but its so non-linear you wouldn't believe the comp curve I have setup in lincurve. But its after the PID & before the pwmgen so the gain is much closer in that the PID at least stays within its error limits.
At the higher end of the scale, the gain is considerably reduced because without it, the motor speed near the top of its speed range vs the input voltage, approaches the shape of an exponential curve, going nearly vertically. Friction/stiction is a problem below .5 rps of course that I try to compensate for with the PWMGEN.0.offset, enough that the initial 1 value will move the chuck about 10 degrees at the direction icon click. Here is a paste of that curve in the lincurve module: # now, distort pid out to get s### matching speeds, countering non-linearity in drivers pwm decoding net spindle-raw-pwm pid.0.output lincurve.0.in # initial settings for transparent lincurve.0, trim y's for effect. setp lincurve.0.x-val-00 0.000 setp lincurve.0.y-val-00 0.000 # so zero is not transmuted upward setp lincurve.0.x-val-01 100.000 setp lincurve.0.y-val-01 122.000 # needs a boost to get to 100 real setp lincurve.0.x-val-02 150.00 setp lincurve.0.y-val-02 215.000 # ditto, big boost to make 150 setp lincurve.0.x-val-03 600.000 setp lincurve.0.y-val-03 550.000 # slight pull back setp lincurve.0.x-val-04 800.000 setp lincurve.0.y-val-04 711.000 # bigger pull back setp lincurve.0.x-val-05 900.000 setp lincurve.0.y-val-05 775.000 # big pull back setp lincurve.0.x-val-06 1000.000 setp lincurve.0.y-val-06 830.000 # even bigger pull back setp lincurve.0.x-val-07 1100.000 setp lincurve.0.y-val-07 890.000 # bigger yet pullback setp lincurve.0.x-val-08 1200.000 setp lincurve.0.y-val-08 950.000 # likewise setp lincurve.0.x-val-09 1300.000 setp lincurve.0.y-val-09 1000.000 # ditto setp lincurve.0.x-val-10 1400.000 setp lincurve.0.y-val-10 1050.000 # ditto # then feed output to pwmgen.0.value net spindle-pwm-fixed lincurve.0.out pwmgen.0.value > Alternatively, why not run closed-loop spindle speed, then it doesn't > matter if the control is non linear. Because of the positive gain, enough Pgain to make it work fairly stiff at 300 rpm, is enough to make it obviously oscillate at 800 rpm and up. > A further point is that the correct speed isn't a fixed RPM value > anyway, it is that area between "too fast" and "too slow" where the > machining works well. Quite true, but consistent speeds are required when threading since the thread slides sideways at the higher revs due to the lockup delay. G76 in particular needs to do a dummy lockup just to measure that lag in encoder counts, then move the lockup initiation to that many counts ahead of the next expected index pulse. Its not as if the pulses aren't there to count so it can know when the next index pulse is due. If this was active, keeping track of how many counts it was off then 2 things could be done. 1. If the first trace of the thread looks ok, you could crank up the spindle speed slowly without wrecking the thread because it slides sideways because it would see the one or 3 count error and correct it on the next cycle and 2. you would wind up with a much more accurately cut thread. One whose start position was well known regardless of the rpms. Cheers, Gene -- "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> ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
