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 Bit 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.

8 bytes

Byte Bit 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 Bit 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 Bit 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. The firmware stores the current limit as it arrives: over CAN it is not clamped to the driver's 2800 mA (only #Ilim over UART clamps it). Never send more than 2800 mA, or more than the motor's rating.

8 bytes

Byte Bit 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 Bit 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.

4 bytes

Byte Bit 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