Duty Accel/Decel commands / Stop All

General discussion of using Roboclaw motor controllers
Post Reply
robof
Posts: 36
Joined: Tue Jun 27, 2017 11:21 pm
Duty Accel/Decel commands / Stop All

Post by robof »

I've been doing a lot of work with duty accel / decel today and have ran into a few things I'd like to bring up.

I've noticed that the Stop All command in Ion Studio uses the Deccel value when stopping, so not a direct stop, but a slow down and stop, (assuming you have a default decel value set.) Is that by design?
I assumed 'stop all' was a sort of software e-stop so I thought it should force everything to stop abruptly.
I can work around this myself with the below command, but I wanted to check if I should need to do this.

Code: Select all

roboclaw.DutyAccelM1M2(address1, 655360, 0, 655360, 0)
I've also discovered that both the PWM sliders in Ion Studio and the DutyM1() and DutyM2() commands in Python ignore the Decel value and instead use the Accel value for both accelerating and decelerating. I'm assuming this is a bug since it wouldn't make sense to have the decel value if it's not used anywhere. Can you confirm?
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Duty Accel/Decel commands / Stop All

Post by Basicmicro Support »

All commands have a maximum decceleration rate no matter what. The maximum rate of change of power is 100ms for a +-100% duty change, so it would be 50ms for a 100% to 0% duty change. This is by design(limits excesive current spikes for no gain in motor control).

I will check the accel/decel test settings in PWM Settings. I beleive this is a bug in Ion Studio. Roboclaw does not have a separate decel argument in the DutyAccel commands. If the new Duty is lower than the old one it automatically uses the accel argument as a decel value. Ion Studio should be using the decel value set by the user for the accel argument in the DutyAccel packet serial command when the user moves the slider to a lower duty position relative to the previous Duty.

Post Reply