How to adjust curve type in Motion Sequence Builder?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to adjust curve type in Motion Sequence Builder?

Jump to solution
1,550 Views
spencerpallas
Contributor II

Hello,

I was wondering if it was possible to adjust the curve type in the motion sequence builder. I am trying to create a 'shaking' plan where the motor rotates back and forth at a relatively high frequency. Based on the trajectory duration, I believe I will need to use a Trapezoidal Curve Type in order to get this action. I have looked around the Motion Sequence Builder but did not come across an option. I have tried adjusting the Curve Type value in the Position Control and Speed Control Page but after compiling the Motion Sequence, these values revert to ST-Curve. Appreciate any input.

Thanks,

Spencer

Labels (1)
1 Solution
1,282 Views
linestream-adam
Senior Contributor I

Spencer,

There isn't a way to modify the curve type as a function of the state of the motion sequence.  If you go onto the Position or Speed Control page and select a different curve type it will use that curve type when it runs the motion sequence from the Motion Sequence page.

But if you recompile the firmware (via Motion Sequence Builder) you will need to store that curve type in your system.h file for it to take effect.  You can do that on the Protections & Hardware or Advanced Tuning pages.  This is because when you recompile the firmware it will use your system.h defaults and not the settings in the GUI.

Hope this helps!

View solution in original post

3 Replies
1,283 Views
linestream-adam
Senior Contributor I

Spencer,

There isn't a way to modify the curve type as a function of the state of the motion sequence.  If you go onto the Position or Speed Control page and select a different curve type it will use that curve type when it runs the motion sequence from the Motion Sequence page.

But if you recompile the firmware (via Motion Sequence Builder) you will need to store that curve type in your system.h file for it to take effect.  You can do that on the Protections & Hardware or Advanced Tuning pages.  This is because when you recompile the firmware it will use your system.h defaults and not the settings in the GUI.

Hope this helps!

1,282 Views
philip_drake
NXP Employee
NXP Employee

Spencer,

With each call to the Trajectory block to move the motor shaft from one point to the next, a new value for

  1. Position step in fractional revolutions
  2. Position step in whole revolutions

  3. Type of profile to generate

  4. startSpeed

  5. targetSpeed

Inputs in the TRAJPOS Data structures inlcude the various limits on Accleration, Deceleration Velocity and Jerk.

Please see the API reference manual version 1.0.0 chapter 6 for this information.

Since we are striving to improve our project you will find the updated documentation in revision 1.0.1 release of KMS may be helpful as well.

To create a 'shaking plan' you would repeatedly and rapidly make calls to move the motor to a new position, The time between new position calls would determine the shake frequency.  The commands would have to have some bounds to the accelation and jerk so as not to cause the mechanical system to be stressed too much.

 

If there is much change in the final product load from what you characterized you may also need to re-run the inertia parameter identification on the final product load and plug the new parameters back into the project.

I hope this is helpful.

Regards,

Philip 

1,282 Views
linestream-adam
Senior Contributor I

One more thing to keep in mind when making API calls into the TRAJPOS block is that when running position-type profiles, the TRAJPOS block cannot change the position target in the middle of generating a profile.  You can stop a profile, but cannot start a new one until the motor has come to rest.