On Fri, Mar 18, 2016 at 11:46 AM, Nicklas Karlsson < nicklas.karlsso...@gmail.com> wrote:
> I am planning to use a micro controller for stepper step pulse generation. > I have considered to use an inverter card but special purpose stepper > circuits are cheap so I use one of these instead. It should be possible to > feed timer values then toggle should happen via DMA timer output compare > values. > > Can anyone suggest how an ideal step generation curve should look? > Constant acceleration up to top speed? Constant deceleration from top speed > to zero? Or just stop generating pulses? > So you are NOT using LinuxCNC. You are planning to roll your own? I've done this a few times. My purpose for using CNC is robotics and these robots use motors of various type and move not unlike CNC machines. All of these motors I always control using some microprocessor. (ARM or AVR) Generally the pulse rate generator is at the lowest "layer" of abstraction in your software and gets requests from some high layers to do things like move at some rate to some location. Your software has to try to do what it is requested but subject to physical properties of the motor and mechanical system. You have to program this in. Likely maximum acceleration is a function of current speed. Likely the range of position is limited and so on. Some requests might have speed or acceleration limits embedded in them After this there is one more important thing that really is done my some layer above the pulse generator and that is planning. Say you are going to make a U-turn (reverse a motor direction) you might need to slow down before. This is called "planning" and it's always hard and with robots who work in a changing environment maybe not possible. But if you are interpreting G-Code you can always just read ahead. Ok there is one case where the pulse generator CAN and should do some planning. If it gets a request to "move to location X" it should accelerate to maximum speed, move for some time then DECELERATE and stop at "X" using other max There are some cases where the pulse generator MUST work with more then one motor at the same time. What if the request is to "move in a circle" or if doing threading on a lathe to move the spindle and leadscrew in "lock-step". In my case I want to move a caterpillar-tread robot along an arc of given radios so that it passes through the center of a doorway. The limiting factor is the performance of the "outside" tread motor. In general what running multiple motors one of then will hit a performance limit first and the others need to have their accelerations limited. The easiest thing for you to do is use software that others have written and get it to work some how on the platform your choose (An ARM based SBC like the beagle bored or "Pi") For CNC work LinucCNC already does what you need and for robotics look up "ROS". Both of these can run on a computer the size of a credit card. Now getting to your specific question of wetter to use constant acceleration (linearly increasing speed) or some kind of curve. The above should have answered this. The pulse generator will try for maximum performance which is constant acceleration but may run into physical limitation of the motor and mechanics where available torque is a function of speed and this will cause acceleration if tapper off. On the other hand if the request has an embedded limit you may not het mechanical limitations and you can actually do constant acceleration up to the commanded speed. -- Chris Albertson Redondo Beach, California ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140 _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users