1. #1
    Hi. Can I just ask a few basic questions about control and positioning with stepper motors employed CNC machines, linear actuators (gantry type or otherwise).

    I think most people here make CNC machines. Okay here are my questions:

    * Are you accelerating and decelerating the stepper (ramping up/ramping down the step frequency). Or, are you operating the stepper at the maximum starting frequency (fs) to get "instant" start and stop?

    * To get an accurate stop position, are you programming (via a counter, or whatever) the number of steps to the stop position? I suppose you must be with open loop.

    * Is braking used?

    * Do you find it necessary to use open loop with the stepper motor?


    ADDING: The thing is, I'm not seeking to build a CNC machine as such. So, my technical requirements might be somewhat different. Just wanting to grasp what the CNC machinists are doing, as it's not a million miles from what I'm trying to do.
    Last edited by richard2112; 29-06-2014 at 05:49 PM.

  2. #2
    Let me just add a bit more:

    I can see that if the mass the stepper motor has to move is too great for an "instant" start or stop, the only way to avoid stepper missteps is to ramp up the frequency of the pulses for a soft start and ramp down for a soft stop.

    Just wondering then if it's normal for the CNC machine to be programmed to ramp the stepper frequency up and down or whether that in practice is not usually necessary.

    The alternative of course is to always keep the step frequency below the maximum starting frequency of the stepper motor when it's coupled to the load. Because then you don't need to ramp the frequency. You could though use different step frequencies (thus different motor spindle speeds) - just no ramping of frequency.

    I note that whether you frequency ramp or not, the motor still does the same number of steps.

  3. #3
    Most common approach for the typical size CNC router is to dump the whole problem on the machine control software! So, Mach3, LinuxCNC or whatever sorts it out. However, part of the software configuration for a particular machine is to define max travel velocity and max acceleration. The software then generates pulses at a varying rate to ramp speed up to the max (assuming that the travel is long enough) at a max acceleration as defined by the user. Deceleration also uses the same "max acceleration" value, which is the equivalent of braking. For a given machine, you choose speed and acceleration either by copying what someone else with similar hardware has done, or, better, by testing at different rates until you find the values at which the motor "loses steps" - i.e. loses position as it is unable to keep up with the demanded pulse rate. Easy enough to do - just check that the axis returns to its starting point after a trial run. Because the steppers are then run within their capability, most machines run open-loop. Larger/faster/more powerful machines will tend to go for servos set up as closed loop.

    My 3D printer doesn't ramp up and just takes off at full speed, but the moving masses and the actual speeds are low enough that this works OK.

  4. The Following User Says Thank You to Neale For This Useful Post:

  5. #4
    There will be a speed below which you can do an "instantaneous" start or stop in X,Y without losing steps. It is very possible that this speed will be below your cutting speed so you only need to worry about rapid transits.

    Z shifts will probably be different and are not to be forgotten when setting your accelerations.

    Accelerations are really easy to code until you reach the point when the idiot operator suddenly presses the STOP button causing accelerations to become decelerations and a new plan has to be formulated to get everything going again when the IO presses RESUME. If you are coding accelerations plan for IO commands early on in the process or you will end up with a mess.

    The other consideration is what happens when you get to the end of something and need to load the next movement despite the fact that you have 3 axes going like the clappers and you are in danger of over-running your step interval.

    I usually create an acceleration table which is a list of numbers that will reload the timer that initiates the step. Each straight line has 3 components, accelerating steps, constant velocity steps, deceleration steps. This needs a bit of sorting out when the IO strikes but it is compact and fast and I am getting a bit too geeky

  6. #5
    Robin - your experience is probably more relevant to the original question, given that the majority of us delegate all the clever bits to off-the-shelf software, but I did wonder if you've ever looked under the covers of LinuxCNC, given that it is open-source. Is there anything there that might help someone developing their own machine control application?

Similar Threads

  1. servo control vs stepper control
    By Peter. in forum Motor Drivers & Controllers
    Replies: 24
    Last Post: 17-09-2012, 07:36 AM
  2. Help with Stepper Motors
    By Scott in forum Stepper & Servo Motors
    Replies: 8
    Last Post: 04-04-2010, 01:35 PM
  3. Motion Control drivers and motors
    By bruce_miranda in forum Motor Drivers & Controllers
    Replies: 71
    Last Post: 27-08-2009, 08:40 AM
  4. rs stepper motors
    By chaz@2b in forum Stepper & Servo Motors
    Replies: 19
    Last Post: 06-08-2009, 10:05 PM
  5. Help! Stepper control board
    By Ross77 in forum General Electronics
    Replies: 10
    Last Post: 28-05-2009, 12:42 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts