On Sunday 06 December 2020 05:41:02 andy pugh wrote: And this did not generate any replies the first time. So I'll do some snippage and get to it. [...] With my hi-res spindle encoder sitting on the back of the motor, I do have a very stiff spindle position control.
Because the fwd/rev signal from motion is a slam bang switch, if allowed to get to the controller, it attempts to instantly reverse the motor, tripping a 25 amp breaker in the service box in the process. So I have long had some hal logic in series with that to sequence that reversal, in my case for both fwd2rev and rev2fwd. This is accomplished by an xor comparing the the dir from motion to the dir its going because that dir change is blocked from the controller, and that signal triggers a mux on the input of a limit3 to switch the existing speed requested from the signal coming from motion, to zero volts, the output of the limit3 then ramping the motor to a stop in a few milliseconds. Since Jons pwm-servo is a full 4 quadrant controller, and I'm using it for a spindle driver, that dumps the motors energy back into the psu, driving it from 125 volts dc to something in the 165 to 170 area. A oneshot triggered by one of the encoders signal times out to indicate the spindle is nearly stopped, and that finally allows the direction change to get to the controller and restores the speed value to the limit3, which then uses up the psu's over voltage to ramp the motor back up to the requested speed. The lights don't blink and a 15 amp breaker in the service box isn't tripped. Sounds complex but a full reversal at 3,000 revs is actually done in under 400 milliseconds by all this. The psu at the peak voltage is 35 to 40 volts above the voltage rating of its capacitors but the overvoltage is so quickly used up by re=accell-ing the motor and no measureable heating of the caps can be detected, been doing it for about 5 years now. Just one problem. I've not measured it, but I believe the backlash move may be done the instant motion issues the reversal, so it takes place during the spindle slowdown as its still spinning fwd. This results in the resultant thread being cut sloppy as that move is about 2 thousandths of an inch. And its really obviously almost stripped for a fine thread. Now comes the improvement request for two more pins into motion. I need a pin to disable the backlash move, until the spindle has actually stopped. And I want an output pin from motion to indicate the backlash move has been completed and its safe to carry on. so I can modify this controlled reversal to: 1.intercept and hold the reversal until the motor has stopped. As I'm doing now, but tell motion via the spindle is turning signal, to not make the backlash move until the spindle has stopped. 2.Then use the stopped state to tell motion its ok to do the backlash move while the spindle is stopped. Its around 2 thou IIRC. 3.Then use the backlash move completed signal from motion, to restore the spindle to its former speed setting in the other direction and get on with the show. We've wasted what, maybe 20 milliseconds while the spindle is stopped doing the backlash move. And 20 milliseconds is undetectable in the grand scheme of things. I won't have any problems incorporating that into my hal file(s) but I'll need those 2 pins on motion to properly sequence this. Then maybe I can peck tap a bigger than 4-40 hole and get a nice tightly tapped hole even if I have to peck tap the 12mm hole 25 times, going 1/4 turn deeper per peck. And I think everyone even thinking about rigid tapping could benefit greatly from this. Can these two pins be added? Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene> _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users