Restore Defaults (80)

Questions about using encoders with the Roboclaw product line
Post Reply
woko1754
Posts: 20
Joined: Sun Feb 21, 2021 3:16 am
Restore Defaults (80)

Post by woko1754 »

I just found an inconsistency in the manual regarding command 80: contrary to the manual the command has to be followed by two CRC-bytes. After changing this in my code, I get the 0xFF acknowledge and the command is working.
The bad thing is, that now the 65 command isn't working anymore. I try to set some initial parameters using commands 98, 28 and 61, but this doesn't seem to be enough anymore.

What is the minimal set of commands that have to be used after Restore command to get 65 working again ?
woko1754
Posts: 20
Joined: Sun Feb 21, 2021 3:16 am
Re: Restore Defaults (80)

Post by woko1754 »

I got it working, by waiting for 500msec after the reset command.

Nevertheless I would like to know which settings are required after a reset command.

Thanks in advance.
woko1754
Posts: 20
Joined: Sun Feb 21, 2021 3:16 am
Re: Restore Defaults (80)

Post by woko1754 »

By try and error I found out that only commands 28 (29) and 61 (62) are required to get 65 (66) working after reset. The required values I read from a file created by the studio.
woko1754
Posts: 20
Joined: Sun Feb 21, 2021 3:16 am
Re: Restore Defaults (80)

Post by woko1754 »

I just discovered, that the encoder registers should be reset to get a defined home position (commands 22 and 23).
woko1754
Posts: 20
Joined: Sun Feb 21, 2021 3:16 am
Re: Restore Defaults (80)

Post by woko1754 »

I published my code on github: https://github.com/woko54/roboclaw
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Restore Defaults (80)

Post by Basicmicro Support »

Thank you for all the updates and publishing your code.
woko1754
Posts: 20
Joined: Sun Feb 21, 2021 3:16 am
Re: Restore Defaults (80)

Post by woko1754 »

Has someone made some experiences with using an end-switch for a homing process ?

I want to implement it into my code and haven't found a solution yet.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Restore Defaults (80)

Post by Basicmicro Support »

What has been the trouble? Setting up S4 or S5 for a single limit is fairly simple using Motion Studio. Note the switches do nothing unless the motors are commanded to move so if you are manually testing expecting some action without actually command the motor to move, that may be what is confusing you.

Post Reply