Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2013 SPiiPlus Training Class Motion Profile Generation 1.

Similar presentations


Presentation on theme: "© 2013 SPiiPlus Training Class Motion Profile Generation 1."— Presentation transcript:

1 © 2013 SPiiPlus Training Class Motion Profile Generation 1

2 © 2013 What is Motion Profile Generation? Motion profile generation is the process by which the controller takes a high level command and creates a finely sampled motion profile o At a minimum the controller will calculate a new position every update cycle Advanced controllers will also calculate velocity, acceleration, and jerk (acceleration/sec) o High level command can be streamed by a host or executed directly by the motion controller o Many different algorithms can be used to generate the motion profile / trajectory o Motion profile / trajectory can be for a single or multi-axis move 2

3 © Position Time Sampled Motion Trajectory

4 © 2013 Motion Generation: SPiiPlus 4 SP0 SP1 Master Formula ECAT Master Position ( MPOS ) Motion Generator Axis Position ( APOS ) CONNECT formula Reference Position ( RPOS ) Convert units to counts ( EFAC ) Convert counts to units ( EFAC ) Feedback Position ( FPOS ) User Commands / External Signals Feedback Drive Command MPU

5 © 2013 Important ACSPL+ Motion Variables VEL : Commanded Velocity o Motor commanded velocity in user units / second o This is the maximum velocity of the motion profile ACC : Commanded Acceleration o Motor commanded acceleration in user units / second 2 o This is the maximum acceleration of the motion profile DEC : Commanded Deceleration o Motor commanded deceleration in user units / second 2 o This is the maximum deceleration of the motion profile JERK : Commanded Jerk o Motor commanded jerk in user units / second 3 o This is the maximum jerk of the motion profile KDEC : Kill Deceleration o Used for the KILL command only 5

6 © 2013 Important ACSPL+ Motion Variables APOS : Axis Position o Logical axis position in user-defined units o Calculated directly from motion generator every MPU cycle o Comes before the CONNECT function RPOS : Reference Position o Motor commanded position in user-defined units o Calculated via the CONNECT function every MPU cycle o Sent to servo processor servo loop every MPU cycle o Typically RPOS = APOS FPOS : Feedback Position o Sensor feedback position in user-defined units o Read from servo processor every MPU cycle PE : Position Error o Difference between RPOS and FPOS o Updated every MPU cycle 6

7 © 2013 Important ACSPL+ Motion Variables EFAC : Encoder Factor o Used to translate between encoder counts on the servo processor and user- defined units on the MPU EOFFS : Encoder Offset o Offset between zero position on the servo processor and zero position on the MPU o Updated whenever RPOS or FPOS is SET (homed). 7 Note: FP is feedback position stored in the Servo Processor RP is the reference position stored in the Servo Processor

8 © 2013 Important ACSPL+ Motion Variables RVEL : Reference Velocity o Motor commanded velocity in user units / second o Calculated as the first difference of RPOS, with optional smoothing, every MPU cycle FVEL : Feedback Velocity o Sensor feedback velocity in user units / second o Calculated as first difference of FPOS, with optional smoothing, every MPU cycle 8

9 © 2013 Important ACSPL+ Motion Variables RACC : Reference Acceleration o Motor commanded acceleration in user units / second 2 o Calculated as the first difference of RVEL every MPU cycle FACC : Feedback Acceleration o Sensor feedback acceleration in user units / second 2 o Calculated as the first difference of FVEL every MPU cycle 9

10 © 2013 Important ACSPL+ Motion Variables GPHASE : Group Motion Phase o Integer value for current motion phase 0: no motion 1: acceleration buildup 2: constant acceleration 3: acceleration finishing 4: constant velocity 5: deceleration buildup 6: constant deceleration 7: deceleration finishing GRTIME : Group Remaining Motion Time o Estimated value of time (in milliseconds) until end of current motion 10

11 © 2013 Important ACSPL+ Motion Variables MST : Motor State o Bitwise encoded physical motor state information Bit 0: Enabled Bit 1: Open Loop Bit 5: In motion Bit 6: Accelerating AST : Axis State o Bitwise encoded logical axis state information Bit 2: PEG is in progress Bit 3: Data collection is in progress Bit 5: In motion Bit 6: Accelerating 11

12 © 2013 Move vs. Move and Settle Move time: time it takes for commanded motion to finish Move and settle time: time it takes for commanded motion to finish AND physical axis to settle within a specified window 12

13 © 2013 Trajectory Algorithms 13

14 © 2013 Step Profile: Basics Step Profile: o Instantaneous change in position o Infinite velocity o Infinite acceleration o Infinite jerk Comments: o Not realistic o Should never be used in real motion systems 14

15 © 2013 Step Profile: Equations 15

16 © 2013 Step Profile: ACSPL+ Example Should not be run on real systems! 16

17 © st Order Profile: Basics 1 st Order Profile: o Linear position profile o Instantaneous change in velocity o Infinite acceleration o Infinite jerk Comments: o Not realistic o Should never be used in real motion systems 17

18 © st Order Profile: Equations 18

19 © st Order Profile: ACSPL+ Example Should not be run on real systems! 19

20 © nd Order Profile: Basics 2 nd Order Profile: o Quadratic position profile o Linear velocity profile o Instantaneous change in acceleration o Infinite jerk Comments: o Not realistic o Simple controllers use this type of interpolation o Results in jerky behavior of motion systems 20

21 © nd Order Profile: Equations 21

22 © nd Order Profile: ACSPL+ Example Not ideal for real systems 22

23 © rd Order Profile: Basics 3 rd Order Profile: o Cubic position profile o Quadratic velocity profile o Linear acceleration profile o Instantaneous change in jerk Comments: o Realistic o Results in smooth motion o Complex profile o Requires appropriate jerk setting 23

24 © rd Order Profile: Equations 24

25 © rd Order Profile: Equations 25

26 © rd Order Profile: ACSPL+ Example 26

27 © 2013 Jogging: Basics Jogging: o Accelerating to constant velocity o No defined end-point o Can be done with 1 st order, 2 nd order or 3 rd order profiles 27

28 © 2013 Jogging: ACSPL+ Example 28

29 © 2013 CAM Motion: Basics CAM Motion: o Multi-axis motion along a continuous path 2 or 3 dimensional space o Can involved more than 3 axes o Common in CAD/CAM applications where motion profile is a tool path created from a CAD file o Typically composed of arc and line segments 29

30 © 2013 CAM Motion: Equations 30

31 © 2013 CAM Motion: ACSPL+ Example 31

32 © 2013 Master / Slave: Basics Master / Slave Motion: o Axis is slaved to a master signal o Master signal could be an encoder, virtual axis, analog input, etc o Slave is moved to track the masters position (position lock) or velocity (velocity lock) as best as possible without exceeding its maximum velocity or acceleration o There will always be a delay between the master and slave o Common in applications where the master signal has unknown dynamics or controlled externally 32

33 © 2013 Master / Slave: ACSPL+ Example 33

34 © 2013 Spline: Basics Spline: o Smooth piece-wise polynomial function o Used for interpolating in between data points to any degree of interpolation o Different types of splines have different properties Catmull-Rom: o Guarantees motion through control points o Guarantees continuous position and velocity profiles (does not guarantee continuous acceleration profile) B-Spline: o Does not guarantee motion through control points o Guarantees continuous position, velocity and acceleration profiles 34

35 © 2013 Spline: PVT Motion PVT Motion: o User provides position, velocity, and time points o Motion generator interpolates between time points to determine position at each controller cycle o Acceleration is implicitly defined by the PVT points 35

36 © 2013 Spline: ACSPL+ Example 36

37 © 2013 Kinematics: Basics Kinematics: o Relationship between actuators positions and end-effector positions o Common with multi-axis applications where end-effector motion is dependent on multiple actuators Forward Kinematics: o Determining end-effector position as a function of actuator positions Inverse Kinematics: o Determining actuator positions as a function of end-effector position 37

38 © 2013 Kinematics: Inverse Kinematics Example 38

39 © 2013 Kinematics: ACSPL+ Example 39

40 © 2013 ACSPL+ Programming Example: 1 1.Load program Programming 06 – SetMotionParams.prg to the controller o Should populate buffer 19 2.Open communication terminal and set it up to show DISP messages 3.From the communication terminal start buffer 19 at label Begin ( START 19, BEGIN ). Follow the instructions on the screen What happens? 40

41 © 2013 ACSPL+ Programming Example: 2 An application requires an axis to have two modes: slow and fast. The customer wants to use a digital input ( IN(0).0 ) to toggle between the two modes (if 0, set for slow mode, if 1, set for fast mode). They will use a second digital input ( IN(0).1 ) to toggle motion. 1.Use buffer 20 to write the program. Once running program should not stop (hint: WHILE 1 loop). 2.Anytime IN(0).0 is toggled the motion parameters should switch between a slow and fast mode (determine your own slow and fast parameters) 3.Anytime IN(0).1 goes from low to high a new motion should be started. Use the motion command PTP/r (axis), distance for the motion. 4.Run the program and test. 41


Download ppt "© 2013 SPiiPlus Training Class Motion Profile Generation 1."

Similar presentations


Ads by Google