Motion profile generator.


Results 1 to 40 of 56

Threaded View

  1. #7
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Motion profile generator.

    Thanks Darrel!

    Actually, I don't think you should need to worry about the direction. Perhaps I misunderstood your earlier question and overcomplicated my explaination after all.

    How about this:
    * The "global position variable" is the expected motor position at any given time. The PID loop servos the motor to this position.
    * The "relative position variable" is the output of the profile generator, exactly as you shown earlier, always starting a new move at 0.
    * When a new move is commanded it is easy to calculate if the target position is positive or negative relative to the current "global position".
    * A profile, starting at 0 and ending at ABS(Target Position - Global Position) is then generated.
    * Depending on the direction or "polarity" the output of the profile generator is added or subtracted from the Global Position variable one "tick" at a time.
    * The PID loop makes the motor follow the Global Position variable very smoothly and everyone's happy, especially me :-)

    Does that make sense?

    /Henrik.

    EDIT: Put another way... Acceleration is added to Velocity. Velocity is added to RelativePosition. RelativePosition is added to OR subtracted from GlobalPosition.
    Last edited by HenrikOlsson; - 28th January 2013 at 18:08.

Similar Threads

  1. Motion Capturing
    By koossa in forum Off Topic
    Replies: 0
    Last Post: - 30th June 2009, 11:05
  2. Suggest a motion sensor Please
    By sougata in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th March 2007, 13:22
  3. Wireless Motion Sensors.
    By koossa in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 17th October 2006, 21:57
  4. Need low Profile LCDs
    By Foxx373 in forum General
    Replies: 8
    Last Post: - 26th October 2005, 17:33
  5. Motion Tracking
    By JEC in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 5th November 2004, 00:58

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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