You can easily convert between the encoder value and degree using the constant below.
degree = 0.08789 * encoder value
For example, 180(°) / 0.08789 = 2048.01456 = (int) 2048
Each DYNAMIXEL model has its own Operating Mode, and XL430-W250 has 4 different modes.
The address of Operating Mode data is
11 and it use 1byte data as below.
Address 11 while Torque is turned off(but the power is on) will set your DYNAMIXEL to Velocity Control mode.
dxl_comm_result, dxl_error = packetHandler.write1ByteTxRx(portHandler, DXL_ID, 11, 1)
if dxl_comm_result != COMM_SUCCESS:
print("%s" % packetHandler.getTxRxResult(dxl_comm_result))
elif dxl_error != 0:
print("%s" % packetHandler.getRxPacketError(dxl_error))
print("DYNAMIXEL has been successfully set to Velocity Mode")