RogerN wrote: > I probably don't need closed loop spindle speed control, I just thought > since I have the encoder, and two unused axis available, why not! After > spending some time reading the hal documentation tonight I got an idea > that might work. What if I used HAL's integrator with commanded_speed - > feedback_speed_IN with limits of something like 500rpm/sec acel and > 300rpm/sec decel. I think that would command my spindle drive to > accelerate at 500rpm per second until it reached the commanded rpm and > decelerate at 300rpm/sec until it reached the lowered commanded rpm. > Any thoughts? Would this work?
You don't want in integrator. It won't stop when it reached the desired speed, it just keeps going. However, we do have a block that does exactly what you need: limit2 The output of a limit2 block tracks its input, while obeying minimum and maximum value limits and a rate-of-change limit. > Other thought is to use the multiplexer and select a gear ratio that > would best fit the desired SFM. I'd probably use a pair of scale blocks to convert the commanded spindle speed into motor speeds for each gear, followed by a pair of limit2 blocks to enforce ramp rates (can be different for each gear), and then going into a mux that selects one or the other depending on the gear you are in. 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
