Page 1 of 1

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

Posted: Mon Nov 04, 2019 1:55 am
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

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

Posted: Mon Nov 04, 2019 9:58 am
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.