In emc2 there are a couple of different linked together components. MAX_VELOCITY and MAX_ACCELERATION are variables that are used by the motion controller (trajectory planner to be precise) when doing calculations for the next position the machine should go to. If you have a servo machine the output is fed to PID and from there to the motor, etc.
For a stepper machine we have a step generator (stepgen) on each joint. The stepgenerator takes the next position from the traj planner and converts that to output pulses. In order not to exceed maximum step rates (which in a stepper would result in stalling and lost steps), the stepgen has an additional limit called STEPGEN_MAXACCEL. It is an absolute limit on the pulses that come out of stepgen, and it acts as a "safety" feature in case the traj planner commands the joint to do something it cannot do. (for a sevo machine the PID would just satturate, and the joint would still move as hard as it could without exceeding MAX_VEL, MAX_ACCEL). So, you will have to set STEPGEN_MAXACCEL a bit higher than MAX_ACCELERATION - usually 10-15% is enough. If you set STEPGEN_MAXACCEL equal or less to MAX_ACCEL then your joint will lag behind. when stepgen sees the commanded move, it's already a bit behind, so if it starts accelerating slower than the traj planner tells it to, it will drop further behind and you'll get a following error. If the margin is not enough (STEPGEN_MAXACCEL equal or just a tiny bit bigger than MAX_ACCELERATION), the stepgen will only shortly lag behind commanded position, which will be corrected at the end of the move - so you'll see a bit of overshoot. Regards, Alex ----- Original Message ----- From: "Mark Wendt" <mark.we...@nrl.navy.mil> To: "EMC2" <emc-users@lists.sourceforge.net> Sent: Wednesday, October 06, 2010 12:27 PM Subject: [Emc-users] STEPGEN_MAXACCEL > Howdy all, > > Perusing the doccy's while trying to troubleshoot a problem on my Z > axis, and I was playing around with the variables MAX_VELOCITY, > MAX_ACCELERATION, and STEPGEN_MAXACCEL. While the first two variables > are relatively self-explanatory, I'm having a difficult time figuring > out what exactly the third one does, and how it interacts with the first > two. The docs say this: "Acceleration limit for the step generator". > But how does the step generator affect the first two variables? Playing > around with the variables I get all sorts of things happening including > joint following errors (this is a stepper machine). > > Thanks, > Mark > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users