RogerN wrote: > I've been reading EMC2 documentation and trying to come up with a way to > make my spindle speeds perform like I want and this is what I've come up > with so far: > > Use Limit2 to generate a trajectory, acelerate or decelerate at a rate > that my drive can keep up with without faulting. I'm thinking of > aceleration of 500rpm/sec and deceleration of 300rpm/sec. > > Use encoder position => ddt in and ddt out X 60 should be RPM. This is > because I don't see an encoder velocity for M5i20 encoders. > > Now use a PID loop with limit2 out as the setpoint and ddt out as the > feedback. > > The PID loop would have to be tuned on the very mild side to work with > all my spindle gear ratios, but that should be OK since it would be > stable enough running open loop.
If its acceptably stable running open loop, why not run it open loop? No PID loop to tune. For example, suppose that with a 10V command to the VFD, the spindle goes 900RPM in low gear and 5000RPM in high gear. Set up two scale blocks, and send the spindle rpm command from EMC into both. Set the gain of the first one to 10/900 = 0.01111, and set the gain of the second one to 10/5000 = 0.002. Then use a mux2 to send one output or the other to the DAC. Put the limit2 block after the mux, so it will ramp the transition that happens when the mux switches, as well as the transition when you issue an S word. Note that the standard limit2 block uses the same "rate of change" limit in both directions. If you really need accel and decel limits to be different you'll need to make a custom component. It's not hard, especially if you base it on the existing .comp file. 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
