Motion profile generator.


Results 1 to 40 of 56

Threaded View

  1. #11
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Motion profile generator.

    Ok Henrik, here's what I came up with.

    To start a movement, set the three variables and call the ProfileStart subroutine.

    Code:
    MaxAcceleration = 10     ; starting values
    MaxVelocity     = 100
    TargetPosition  = 2000
    GOSUB ProfileStart
    Then for each period, call the ProfileStep subroutine, and the variables ... ThisAccel, Velocity and Position will be updated.
    When the TargetPosition has been reached, the ProfileComplete flag will be set.

    For the above values, the output of the test program looks like this ...
    Like your original example, the first column is Acceleration change, second column Velocity, third column Position.
    Code:
    1 = Edit MaxAcceleration (10)
    2 = Edit MaxVelocity     (100)
    3 = Edit TargetPosition  (2000)
    Enter = GO
    >
    
       0       0       0   
      10      10      10   
      10      20      30   
      10      30      60   
      10      40     100   
      10      50     150   
      10      60     210   
      10      70     280   
      10      80     360   
      10      90     450   
      10     100     550   
       0     100     650   
       0     100     750   
       0     100     850   
       0     100     950   
       0     100    1050   
       0     100    1150   
       0     100    1250   
       0     100    1350   
       0     100    1450   
       0     100    1550   
     -10      90    1640   
     -10      80    1720   
     -10      70    1790   
     -10      60    1850   
     -10      50    1900   
     -10      40    1940   
     -10      30    1970   
     -10      20    1990   
     -10      10    2000   
     -10       0    2000   
    
    1 = Edit MaxAcceleration (10)
    2 = Edit MaxVelocity     (100)
    3 = Edit TargetPosition  (2000)
    Enter = GO
    >
    I quickly tried the "Ease From" and "Ease To", but it messed up the final position so i pulled it back out.
    I'll have to think about it some more.

    The MaxAcceleration variable will get changed on small moves.
    So you should keep a separate variable and copy it to MaxAcceleration before starting a profile.

    Hopefully, this is somewhere close to what you were looking for.
    Try the test program, and as many combinations of the settings as you can first.
    I'd hate to ruin your CNC.

    If you can follow the code in the include file, and it makes sense ...
    You should see a psychiatrist as soon as possible.
    Attached Files Attached Files
    DT

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