RogerN wrote: > ----- Original Message ----- > From: "John Kasunich" <[EMAIL PROTECTED]> > To: "Enhanced Machine Controller (EMC)" > <[email protected]> > Sent: Saturday, July 28, 2007 11:50 AM > Subject: Re: [Emc-users] More on Spindle Control > > >> If its acceptably stable running open loop, why not run it open loop? >> No PID loop to tune. > > Hi John, thanks for the reply. My lathe has 2 knobs for spindle gear > select and each knob has 3 positions. Center position of one knob is > neutral so all together I have 6 spindle speeds. I would prefer not to > mount switches on the knobs on the operator side of the headstock or > inside the oil mess inside the headstock. I would be open to something > like a thumbwheel or something on the screen or in the program > (hal-manual-spindle-gear-select :-)
I see. > The bottom line of what I want is to be able to change speeds with the S > command and the drive not kick out when decelerating. Doesn't the drive itself have accel and decel rate limits? I just thought > since the spindle encoder feedback is already there, it would be nice > just to have the spindle acelerate or decelerate at a set rate to the > desired speed and then hold at that speed. Is there some difficulty > with running the spindle closed loop that I'm not aware of? I'd be concerned about the granularity in the speed feedback. Can't say how bad it would be without real numbers to work with. What is your spindle encoder PPR? What is the desired speed range? The lowpass will help, but the lag it introduces into the feedback loop will affect PID tuning (not in a good way). If I use > spindle position =>ddt => lowpass X 60 for RPM, is using latch-index > going to mess up my RPM readings with spindle position is reset? If you are running forward, each time the index pulse rolls around you will get a large negative spike for one sample period. So yes, it will probably mess up the PID loop. > To sum it up, for open loop I need hal configuration and a way to select > the gear ratio, for closed loop I just need hal configuration. Or at > least that's what I'm thinking.... Changing the gear ratio is equivalent to changing a gain. It means that a particular output from the DAC no longer produces the expected feedback. You will probably have to tune the PID in the highest gear, and then live with crappy response in the lowest gear (because the total effective loop gain is lower in low gear). If switches aren't practical, you could probably use pyvcp to allow the operator to tell the system what gear they are in. Then an open loop system will work. If they enter the wrong gear, you'll get the wrong speed, but you won't have to tune PID, and it will be unconditionally stable. Regards, John Kasunich ------------------------------------------------------------------------- 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
