Range of command 12 (Drive Forward or Backward)

General discussion of using Roboclaw motor controllers
Hidaka
Posts: 6
Joined: Fri Nov 30, 2018 3:39 am

Range of command 12 (Drive Forward or Backward)

Postby Hidaka » Sun Jan 13, 2019 4:37 am

Hello.

I am using Arduino Library of RoboClaw.
About Function bool ForwardBackwardM1(uint8_t address, uint8_t speed),
According to the document, a value of 0 = full backward, 64 = stop and 127 = full forward.
But actually, a value of 0 = half backward, 64 = stop and 127 = half forward.
Can I get full speed with this function?
Thanks.

User avatar
Basicmicro Support
Posts: 1077
Joined: Thu Feb 26, 2015 9:45 pm

Re: Range of command 12 (Drive Forward or Backward)

Postby Basicmicro Support » Mon Jan 14, 2019 9:19 am

What firmware version are you using?

I recommend using the duty commands instead of the compatibility commands. Commands 32(Duty M1), 33(Duty M2) or 34(Duty M1 and M2). These commands also have higher resolution. They take a signed 16bit value to specify power %.

Hidaka
Posts: 6
Joined: Fri Nov 30, 2018 3:39 am

Re: Range of command 12 (Drive Forward or Backward)

Postby Hidaka » Thu Jan 17, 2019 4:07 am

Firmware version I using is 4.1.27.

I used those commands, it was able to output full speed.
I will not use command 12.

User avatar
Basicmicro Support
Posts: 1077
Joined: Thu Feb 26, 2015 9:45 pm

Re: Range of command 12 (Drive Forward or Backward)

Postby Basicmicro Support » Thu Jan 17, 2019 9:25 am

Also your firmware is out of date. Please install Basicmicro Motion Studio(replaces Ion Studio) and update the firmware. Thanks.

Hidaka
Posts: 6
Joined: Fri Nov 30, 2018 3:39 am

Re: Range of command 12 (Drive Forward or Backward)

Postby Hidaka » Fri Jan 18, 2019 3:09 am

I was just updating my roboclaws to firmware 4.1.29.

The range of values received with command 48 has changed.
In the previous version +/- 32767, but in this version +/- 2960.
Is this range specification of the current version?

User avatar
Basicmicro Support
Posts: 1077
Joined: Thu Feb 26, 2015 9:45 pm

Re: Range of command 12 (Drive Forward or Backward)

Postby Basicmicro Support » Fri Jan 18, 2019 10:09 am

This appears to be an unintentional side effect of a recent update to the PWM system. In earlier releases all calculations were handled in scaled values until the PWM was being sent to the hardware at which point the scaling was converted. This inserted a multiply and divide into an interrupt handler which caused excessive processor load. The newer firmwares(4.1.27+) converted the internal calculations to hardware range before entering the interrupt. Since GetPWMs(Command 48) just sends out the current calculated PWM values being used by the interrupt handler, previously it was properly scaled and now it is not.

I've added the scaling to the output command itself(Command 48) so the next release will have the proper +-32767 scaling range again. If you would like a pre-release for this please email support@basicmicro.com.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests

cron