How to abort MoveExp()


Results 1 to 2 of 2

Thread: How to abort MoveExp()

  1. #1
    Registered
    Join Date
    Aug 2006
    Location
    USA
    Posts
    21
    Downloads
    0
    Uploads
    0

    Default How to abort MoveExp()

    Hi,

    quick question, what is a right way to abort motion of MoveExp() ? Should we use Jog(ch,0)?

    In my situation here is 2 axes - one following another with second loop which represent following error at output ch2->Output

    when follower is far away I use

    ch0->Dest += ch2->Output;

    which seems to give best response to large disturbances, but when I'm very close to target it produces overshoots and MoveExp() seems to be better.
    Intention is to write:

    if (ch2->Output < SomeLimit)
    {
    MoveExp(ch0, ch2->Output * gain , TAU);
    } else
    {
    Jog(ch0,0); // <================== is that good to abort unfinished MoveExp()?
    ch0->Dest += ch2->Output;
    }

    Similar Threads:


  2. #2
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2960
    Downloads
    0
    Uploads
    0

    Default Re: How to abort MoveExp()

    Hi funding33,

    You can use Jog to zero (stop asap from current situation), or Move() to some position.

    I don't follow how you have things configured. Or why you would want to "abort the MoveExp()"

    But regarding your code:

    #1 - you probably would want an absolute value in the 'if' condition or:

    if (ch2->Output < SomeLimit && ch2->Output > -SomeLimit)

    #2 unlike MoveExp, Move or Jog should not be called continuously. Only call it once when needed or no sooner than every ~50ms since the last call.

    #3 the Jog(ch0,0) doesn't stop/abort motion instantly. Instead it plans a trajectory to come to a stop that will take time based on current velocity and Acceleration and Jerk limits. During this time ch0->Dest will be driven by this trajectory, so you should not also be changing it.

    You might try try tuning the ch0 axis with a Lead Filter or Derivative Gain to reduce overshoot.



Tags for this Thread

Posting Permissions

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


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

How to abort MoveExp()

How to abort MoveExp()