Skip to content

Gains and limits

The commands that set the loop gains and the limits. None of them is answered; save with Send_Save_config.

Send_PD_Gains

ID 16host → driver8 bytesPython: Send_PD_Gains()

Sets KP and KD, the gains of the impedance (PD) loop. Keep them with Send_Save_config.

8 bytes

Byte Field Type Meaning
0-3 KP float 32
4-7 KD float 32

The driver does not answer this command.


Send_Current_Gains

ID 17host → driver8 bytesPython: Send_Current_Gains()

Sets Kp and Ki of the PI current loop of Iq. The Id loop keeps its gains; over UART, #Kpiq and #Kiiq set both loops, and so do parameters 11 and 12.

8 bytes

Byte Field Type Meaning
0-3 Kp_iq float 32
4-7 Ki_iq float 32

The driver does not answer this command.


Send_Velocity_Gains

ID 18host → driver8 bytesPython: Send_Velocity_Gains()

Sets Kp and Ki of the PI velocity loop.

8 bytes

Byte Field Type Meaning
0-3 Kpv float 32
4-7 Kiv float 32

The driver does not answer this command.


Send_Position_Gains

ID 19host → driver4 bytesPython: Send_Position_Gains()

Sets Kp of the P position loop.

4 bytes

Byte Field Type Meaning
0-3 Kpp float 32

The driver does not answer this command.


Send_Limits

ID 20host → driver8 bytesPython: Send_Limits()

Sets the speed limit and the current limit the loops may reach. From firmware 109 a negative value, or one that is not a number, is ignored, and the current limit stops at the driver's 2800 mA, as with #Ilim. Firmware 107 and older stored the current limit as it arrived. Never send more than the motor's rating.

8 bytes

Byte Field Type Meaning
0-3 Speed limit float 32 encoder ticks/s
4-7 Current limit float 32 mA

The driver does not answer this command.


Send_Kt

ID 22host → driver4 bytesPython: Send_Kt()

Sets the motor's torque constant Kt, which the driver uses to estimate torque from current.

4 bytes

Byte Field Type Meaning
0-3 Kt float 32 Nm/A

The driver does not answer this command.


Send_Voltage_Limit

ID 34host → driver4 bytesPython: Send_Voltage_Limit()

Sets the voltage limit of the current loops (the same value as #Vlim), in mV. 0 means use the supply voltage. In the 104 release image (the source at tag V104 does not have it yet) and in every release from 105. From firmware 109 it takes 0 to 60000 mV, as parameter 17 does; a value outside is ignored.

4 bytes

Byte Field Type Meaning
0-3 Voltage limit signed 32-bit mV; 0 = Vbus

The driver does not answer this command.


Comments


Found a mistake on this page? Edit it on GitHub · Report it · Get help · This page as Markdown · llms.txt · The whole manual as PDF