speed, acc, dece and position command issue

Questions about using encoders with the Roboclaw product line
Post Reply
jafarmoheidat
Posts: 2
Joined: Thu Jul 09, 2020 4:38 am
speed, acc, dece and position command issue

Post by jafarmoheidat »

Hello
I am using Roboclaw solo 30A to drive one motor using serial packet, the issue I face is represented when sending command number 65 "Buffered Drive M1 with signed Speed, Accel, Deccel and Position", the following sequence illustrates the issue:

*assume the motor is at home position (Encoder reading equal 0).
1- sending command number 65 to forward motor from home position (Encoder=0) to a specific position (Encoder=17000) with a specific speed without setting of the Acceleration and deceleration (which means using the default value=655360)
0x80 0x41 0x00 0x00 0x00 0x00 0x00 0x00 0x0E 0x48 0x00 0x00 0x00 0x00 0x00 0x00 0x21 0x34 0x01 0x9A 0x9A

*after motor have reached the desired position
2-sending command number 65 to backward motor from its current position (Encoder=17000) to the home position (Encoder=0) with a specific speed with setting of the Acceleration and deceleration (acc=dece=3656)
0x80 0x41 0x00 0x00 0x0E 0x48 0x00 0x00 0x0E 0x48 0x00 0x00 0x0E 0x48 0x00 0x00 0x00 0x00 0x01 0x86 0x4D

*now the problem appears on the behavior of motor which it will move forward for a while then go back to home position, the attachment shows a graph of motor position vs time when performing above commands.
position vs time
position vs time
Capture.JPG (87.66 KiB) Viewed 4887 times
Note: this problem will not be appeared in case of setting acceleration and deceleration in the commands, so, I think that the issue is related to the using of default value when sending zero in the acceleration and deceleration.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: speed, acc, dece and position command issue

Post by Basicmicro Support »

1. I would be suspicious of poorly tuned PID settings. Accel and Decel values can hide problems with PID settings.

2. Can you provide a video of the system running. Im not sure I understand exactly what it is doing based on your graph. You can send the video to support@basicmicro.com
jafarmoheidat
Posts: 2
Joined: Thu Jul 09, 2020 4:38 am
Re: speed, acc, dece and position command issue

Post by jafarmoheidat »

regarding to point one, I make tuning but the response still with the same behavior, also, keep in mined that this issue will not appear in case of setting the acceleration and deceleration in the two commands, this issue appears just when sending command without acceleration (which mean using the default values of acc and dece which equal to 655360) then sending another command in opposite direction with acceleration.
so, what is the difference between setting acc and dece to 0 (use the default values"655360") or setting acc and dece as a value equal to 655360?
hint: the graph I had attached represents position behavior of the two commands

regarding to second point, I will record a video to illustrate the case more, it will be sent to the the Email "support@basicmicro.com", FYI, the Email subject name will be the same name of this forum "speed, acc, dece and position command issue"
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: speed, acc, dece and position command issue

Post by Basicmicro Support »

As I said, accel/decel settings can hide problems. What I see in your graph looks like an integral caused overshoot. They can be delayed and can cause odd behavior.

PLease send the video as soon as you can. Thank you.

Post Reply