set L and R by serial - not in the Python library

General discussion of using Roboclaw motor controllers
Post Reply
fausto.tromba
Posts: 37
Joined: Wed Jul 31, 2019 7:24 am
set L and R by serial - not in the Python library

Post by fausto.tromba »

Hi
In my project I have to control a motor in current mode, therefore I should set the resistance and the inductance of the motor and after move it by the serial command in PWM (address 6?).
Unfortunately, I cannot see on the Python library the command to set the resistance and inductance.
In the library, I tried to insert:

Code: Select all

	def ReadM1IndRes(self,address):
		data = self._read_n(address,130,2)
		return data
but return (1,0,0)

Thanks

Fausto
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: set L and R by serial - not in the Python library

Post by Basicmicro Support »

You've posted in the Roboclaw forums. Roboclaw does not support current control mode. Only MCP support current control mode.

Assuming you are using an MCP, you will need to add the functions yourself to set the L and R values from Python. We have not added those functions to the python library yet.

There are very few cases where setup should be done in the python library. In almost all cases it is safer to setup the controller and store in non-volatile memory so settings are loaded on each power up.

Post Reply