> From: [email protected]> Date: Fri, 4 Jan 2013 15:08:43 +0000 > To: [email protected] > Subject: Re: [Emc-developers] Error when jogging axes in teleop mode > > On 4 January 2013 14:58, Lisandro Massera <[email protected]> wrote: > > > I attach the git diff file. I would appreciate if someone would check it > > before (someone with the power) pushes it into the main branch. > > I think that velmag should already be the absolute value, as it is > returned from pmCartMag and calcualted as the sum of a number of > square roots. > So I don't think you need this one: > if (fabs(emcmotDebug->teleop_data.desiredVel.a) > velmag) {
If you omit this one, you are comparing the desiredvel with velmag. As you stated before, velmag is the absolute value. When desiredvel is negative in a rotary axis the comparison fails to work right (if you've got a desiredvel of -60 with a velmag of 10, velmag is greater than desiredvel). In my opinion, you should be comparing the absolute value of the speed in order to decide wether you need to scale down the speed on the axes. > > But you might well require this one: > velmag = fabs(emcmotDebug->teleop_data.desiredVel.a); > > > -- > atp > If you can't fix it, you don't own it. > http://www.ifixit.com/Manifesto > > ------------------------------------------------------------------------------ > Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and > much more. Get web development skills now with LearnDevNow - > 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. > SALE $99.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122812 > _______________________________________________ > Emc-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-developers ------------------------------------------------------------------------------ Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812 _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
