Hey all,

I've found this nifty little script and have decided to adjust it so that it fits the dynamixel model I am using (XM540-W270-R) https://github.com/cckieu/dxl_control.

I've adjusted the control table of the script accordingly (since the script provides the control table for the AX12 model). Afterwards, I run the the script which requires the user to input the desired position in which case it ranges from 2048-4095 (no idea why that's the case but it clearly states so in the documentation and the dynamixel wizard)

Below are images for the code output (error received) and an image confirming the position are correct

https://imgur.com/a/CEBGMKn

Below is the code that enables the motor to set a new position

Code:
    def set_position(self, dxl_goal_position):
        """Write goal position."""
        self.set_register2(ADDR_X_GOAL_POSITION, dxl_goal_position)
        print("Position of dxl ID: %d set to %d " %
              (self.id, dxl_goal_position))
And here is the code that asks the user for the input and calls set_position

Code:
def user_input():
    """ Check to see if user wants to continue """
    ans = input('Continue? : y/n ')
    if ans == 'n':
        return False
    else:
        return True


def test_pos(motor_object):
    bool_test = True
    while bool_test:
        motor_object.get_position()
        # desired angle input
        input_pos = int(input("input pos: "))
        motor_object.set_position(input_pos)
        bool_test = user_input()

test_pos(my_dxl)
I'd appreciate any help, thanks!