2022-08-22 08:53 AM
Can someone help me understand the profile of the trapezoidal move? for example if I would like to make a movement of 10 radiance in 10 seconds using the MC_ProgramPositionCommandMotor1 how much of the 10 seconds will be acceleration, constant velocity and deceleration? and can this profile be changed? Ideally i would like to achieve 1/6 accelleration 4/6 constant velocity and 1/6 deceleration, is this even possible? is there somewhere in the code where I can specify this?
Solved! Go to Solution.
2022-11-17 02:35 AM
The code you need to modify is the function TC_MoveCommand in trajectory_ctrl.c. This function currently divides the movement into 9 steps, 3 acceleration, 3 cruise and 3 deceleration. It shouldn't be too difficult to change this to meet your 1-4-1 requirement.
2022-08-26 01:18 AM
Hello,
There is a Position Control Application note:
Best regards.
GMA
2022-08-26 04:19 AM
Dear @GMA,
Thanks for your reply, I've had a look at this document however I am struggling to find the answer to my question. I have based my question considering the attached graph, if time at D is 10 seconds what would be the time at B and C?
Thanks in advance
Kind Regards
Manpreet Singh
2022-08-26 05:21 AM
Hello,
Page 7/22:
Best regards.
GMA
2022-11-17 02:35 AM
The code you need to modify is the function TC_MoveCommand in trajectory_ctrl.c. This function currently divides the movement into 9 steps, 3 acceleration, 3 cruise and 3 deceleration. It shouldn't be too difficult to change this to meet your 1-4-1 requirement.
2022-11-17 08:24 AM
Thanks for your reply this is definitely helpful.
2022-11-22 08:49 AM
Hi, it looks like it is not as straightforward as we thought, I have made the change as below and I am indeed seeing this change taking effect if I monitor the speed of the motor however the position reached is not as requested by the function. I am using Motor pilot to plot the graphs and below is the result of some tests I have done. Do you think I need to make any additional changes to the code? I have tried to scale the requested position by the error but still no luck to achieve the requested position, I have also tried tuning the PIDs again but didn't help.
2022-11-24 06:06 AM
Hi, not quite what I was thinking :) I think you should have reduced the number of pHandle->SubStep to an array of 6 (1+4+1) and the SubStepDuration should be the total duration divided by 6 (instead of 9).
2022-11-24 06:08 AM
Having said that, I've just looked at the trajectory code, and it may be a bit more complicated than that.
You would have to experiment a little there.