Results 1 to 7 of 7

Thread: XL430-W250 Stop moving randomly

  1. XL430-W250 Stop moving randomly

    Hello everybody

    I'm trying to move the actuator to positions 1,2,3.,..., 4000 as successive small steps in goal position mode but it frequently stops responding along the way. Is there a minimum time requirement between sending successive goal positions? I'm keeping a delay of 100 ms between each package but even this way it doesn't seem to be working properly.

    My main objective is to make some kind of measure for each position of the motor and for that I need the motor moving as fast and reproducible as possible.

    Any thoughts?
    Last edited by Larcay; 02-14-2019 at 11:59 AM.

  2. #2

    Re: XL430-W250 Stop moving randomly

    Might help to know additional information, like what hardware are you using to drive the servo?
    OpenCM9.04, OpenCM9.04+OpenCM485 expansion, Arbotix?, USB2AX, U2D2, OpenCR 1.0...

    What software? Arduino? Which library? Dynamixel SDK? Dynamixel Workbench...

    And maybe the actual code.
    Problems you could run into: If you are using the Dynamixel XDK and use something like txPacket to send the new position to the servo, this does not wait for a response packet back from the servo. If you send a new packet at the same time as the response is trying to be sent, you can get a collision that may screw up any more communications...

    Ways to solve: use txRxPacket instead, which will wait for a response.

    Or configure servo not to send a response... http://emanual.robotis.com/docs/en/d...s-return-level

    Also maybe change return delay to as short as possible (0) http://emanual.robotis.com/docs/en/d...urn-delay-time

    Also for generic questions like this, unless there is some Trossen Robotics specific parts involved, maybe easier to ask on Robotis forums: http://en.robotis.com/service/forum.php

  3. #3

    Re: XL430-W250 Stop moving randomly

    Is there a minimum time requirement between sending successive goal positions?
    Not really. The main question is if you have command response turned on; if so, you may have to wait for a timeout if the servo didn't get the packet (because sometimes it's slighlty slow to respond.) A timeout of 10 milliseconds should be okay, though, 100 ms is way more than it needs to be.

  4. Re: XL430-W250 Stop moving randomly

    Hi, KurtEck and jwatte

    I'm using a PIC microcontroller with my own library and MPLAB X to write the microcontroller code.

    I'm using only the TX line o the microcontroller, so waiting for a response is not a viable option right now.

    I have set both return delay and status return to 0 but the problem remains, unfortunately.

    Keeping the software 100 ms and even 300 ms delay didn't solve the issue also.

    The motor turns non-responsive after some goal positions instructions.

  5. Re: XL430-W250 Stop moving randomly

    The library I'm using

    // <editor-fold defaultstate="collapsed" desc="DYNAMIXEL FUNCTIONS">


    unsigned short CRC16(unsigned char *Packet, unsigned short Packet_size) {


    unsigned short i, j, CRC = 0;


    static unsigned short crc_table[256] = {


    0x0000, 0x8005, 0x800F, 0x000A, 0x801B, 0x001E, 0x0014, 0x8011,


    0x8033, 0x0036, 0x003C, 0x8039, 0x0028, 0x802D, 0x8027, 0x0022,


    0x8063, 0x0066, 0x006C, 0x8069, 0x0078, 0x807D, 0x8077, 0x0072,


    0x0050, 0x8055, 0x805F, 0x005A, 0x804B, 0x004E, 0x0044, 0x8041,


    0x80C3, 0x00C6, 0x00CC, 0x80C9, 0x00D8, 0x80DD, 0x80D7, 0x00D2,


    0x00F0, 0x80F5, 0x80FF, 0x00FA, 0x80EB, 0x00EE, 0x00E4, 0x80E1,


    0x00A0, 0x80A5, 0x80AF, 0x00AA, 0x80BB, 0x00BE, 0x00B4, 0x80B1,


    0x8093, 0x0096, 0x009C, 0x8099, 0x0088, 0x808D, 0x8087, 0x0082,


    0x8183, 0x0186, 0x018C, 0x8189, 0x0198, 0x819D, 0x8197, 0x0192,


    0x01B0, 0x81B5, 0x81BF, 0x01BA, 0x81AB, 0x01AE, 0x01A4, 0x81A1,


    0x01E0, 0x81E5, 0x81EF, 0x01EA, 0x81FB, 0x01FE, 0x01F4, 0x81F1,


    0x81D3, 0x01D6, 0x01DC, 0x81D9, 0x01C8, 0x81CD, 0x81C7, 0x01C2,


    0x0140, 0x8145, 0x814F, 0x014A, 0x815B, 0x015E, 0x0154, 0x8151,


    0x8173, 0x0176, 0x017C, 0x8179, 0x0168, 0x816D, 0x8167, 0x0162,


    0x8123, 0x0126, 0x012C, 0x8129, 0x0138, 0x813D, 0x8137, 0x0132,


    0x0110, 0x8115, 0x811F, 0x011A, 0x810B, 0x010E, 0x0104, 0x8101,


    0x8303, 0x0306, 0x030C, 0x8309, 0x0318, 0x831D, 0x8317, 0x0312,


    0x0330, 0x8335, 0x833F, 0x033A, 0x832B, 0x032E, 0x0324, 0x8321,


    0x0360, 0x8365, 0x836F, 0x036A, 0x837B, 0x037E, 0x0374, 0x8371,


    0x8353, 0x0356, 0x035C, 0x8359, 0x0348, 0x834D, 0x8347, 0x0342,


    0x03C0, 0x83C5, 0x83CF, 0x03CA, 0x83DB, 0x03DE, 0x03D4, 0x83D1,


    0x83F3, 0x03F6, 0x03FC, 0x83F9, 0x03E8, 0x83ED, 0x83E7, 0x03E2,


    0x83A3, 0x03A6, 0x03AC, 0x83A9, 0x03B8, 0x83BD, 0x83B7, 0x03B2,


    0x0390, 0x8395, 0x839F, 0x039A, 0x838B, 0x038E, 0x0384, 0x8381,


    0x0280, 0x8285, 0x828F, 0x028A, 0x829B, 0x029E, 0x0294, 0x8291,


    0x82B3, 0x02B6, 0x02BC, 0x82B9, 0x02A8, 0x82AD, 0x82A7, 0x02A2,


    0x82E3, 0x02E6, 0x02EC, 0x82E9, 0x02F8, 0x82FD, 0x82F7, 0x02F2,


    0x02D0, 0x82D5, 0x82DF, 0x02DA, 0x82CB, 0x02CE, 0x02C4, 0x82C1,


    0x8243, 0x0246, 0x024C, 0x8249, 0x0258, 0x825D, 0x8257, 0x0252,


    0x0270, 0x8275, 0x827F, 0x027A, 0x826B, 0x026E, 0x0264, 0x8261,


    0x0220, 0x8225, 0x822F, 0x022A, 0x823B, 0x023E, 0x0234, 0x8231,


    0x8213, 0x0216, 0x021C, 0x8219, 0x0208, 0x820D, 0x8207, 0x0202


    };


    for (j = 0; j < Packet_size; j++) {


    i = ((unsigned short) (CRC >> 8) ^ Packet[j]) & 0xFF;


    CRC = (CRC << 8) ^ crc_table[i];
    }
    return CRC;
    }


    void Dynamixel_Ping() {


    unsigned char Packet[8], TxPacket[sizeof (Packet) + 2];
    unsigned short int i;


    Packet[0] = 0xFF; //Header
    Packet[1] = 0xFF; //Header
    Packet[2] = 0xFD; //Header
    Packet[3] = 0x00; //Reserved
    Packet[4] = 0x01; //Packet ID
    Packet[5] = 0x03; //Len_L
    Packet[6] = 0x00; //Len_H
    Packet[7] = 0x01; //Instruction


    for (i = 0; i<sizeof (Packet); i++)
    TxPacket[i] = Packet[i];
    TxPacket[sizeof (Packet)] = (CRC16(Packet, sizeof (Packet)) & 0x00FF);
    TxPacket[sizeof (Packet) + 1] = (CRC16(Packet, sizeof (Packet)) >> 8) & 0x00FF;


    PIC_to_DynamixelRX();
    UART_Write_Size(TxPacket, sizeof (TxPacket));
    PIC_to_DynamixelTX();
    }


    void Dynamixel_Read_Position() {


    unsigned char Packet[12], TxPacket[sizeof (Packet) + 2];
    unsigned short int i;


    Packet[0] = 0xFF; //Header
    Packet[1] = 0xFF; //Header
    Packet[2] = 0xFD; //Header
    Packet[3] = 0x00; //Reserved
    Packet[4] = 0x01; //Packet ID
    Packet[5] = 0x07; //Len_L
    Packet[6] = 0x00; //Len_H
    Packet[7] = 0x02; //Instruction
    Packet[8] = 0x84; //Parameter 1 - Low-order byte from the starting address
    Packet[9] = 0x00; //Parameter 2 - High-order byte from the starting address
    Packet[10] = 0x04; //Parameter 3 - Low-order byte from the data length (X)
    Packet[11] = 0x00; //Parameter 4 - High-order byte from the data length (X)


    for (i = 0; i<sizeof (Packet); i++)
    TxPacket[i] = Packet[i];
    TxPacket[sizeof (Packet)] = (CRC16(Packet, sizeof (Packet)) & 0x00FF);
    TxPacket[sizeof (Packet) + 1] = (CRC16(Packet, sizeof (Packet)) >> 8) & 0x00FF;


    PIC_to_DynamixelRX();
    UART_Write_Size(TxPacket, sizeof (TxPacket));
    PIC_to_DynamixelTX();
    //UART_Read_Size();
    }


    void Dynamixel_Write_Position(long Position) {


    unsigned char Packet[14], TxPacket[sizeof (Packet) + 2];
    unsigned short int i;


    Packet[0] = 0xFF; //Header
    Packet[1] = 0xFF; //Header
    Packet[2] = 0xFD; //Header
    Packet[3] = 0x00; //Reserved
    Packet[4] = 0x01; //Packet ID
    Packet[5] = 0x09; //Len_L
    Packet[6] = 0x00; //Len_H
    Packet[7] = 0x03; //Instruction
    Packet[8] = 0x74; //Parameter 1 - Low-order byte from the starting address
    Packet[9] = 0x00; //Parameter 2 - High-order byte from the starting address
    Packet[10] = Position & 0x00FF; //Goal Position - First Byte
    Packet[11] = (Position >> 8) & 0x00FF; //Goal Position - Second Byte
    Packet[12] = (Position >> 16) & 0x00FF; //Goal Position - Third Byte
    Packet[13] = (Position >> 24) & 0x00FF; //Goal Position - Fourth Byte


    for (i = 0; i<sizeof (Packet); i++)
    TxPacket[i] = Packet[i];
    TxPacket[sizeof (Packet)] = (CRC16(Packet, sizeof (Packet)) & 0x00FF);
    TxPacket[sizeof (Packet) + 1] = (CRC16(Packet, sizeof (Packet)) >> 8) & 0x00FF;


    PIC_to_DynamixelRX();
    UART_Write_Size(TxPacket, sizeof (TxPacket));
    }


    void Dynamixel_Factory_Reset() {


    unsigned char Packet[9], TxPacket[sizeof (Packet) + 2];
    unsigned short int i;


    Packet[0] = 0xFF; //Header
    Packet[1] = 0xFF; //Header
    Packet[2] = 0xFD; //Header
    Packet[3] = 0x00; //Reserved
    Packet[4] = 0x01; //Packet ID
    Packet[5] = 0x04; //Len_L
    Packet[6] = 0x00; //Len_H
    Packet[7] = 0x06; //Instruction
    Packet[8] = 0xFF; //Instruction: Mode of Reset (0xFF : Reset all)


    for (i = 0; i<sizeof (Packet); i++)
    TxPacket[i] = Packet[i];
    TxPacket[sizeof (Packet)] = (CRC16(Packet, sizeof (Packet)) & 0x00FF);
    TxPacket[sizeof (Packet) + 1] = (CRC16(Packet, sizeof (Packet)) >> 8) & 0x00FF;


    PIC_to_DynamixelRX();
    UART_Write_Size(TxPacket, sizeof (TxPacket));
    }


    void Dynamixel_Reboot() {


    unsigned char Packet[8], TxPacket[sizeof (Packet) + 2];
    unsigned short int i;


    Packet[0] = 0xFF; //Header
    Packet[1] = 0xFF; //Header
    Packet[2] = 0xFD; //Header
    Packet[3] = 0x00; //Reserved
    Packet[4] = 0x01; //Packet ID
    Packet[5] = 0x03; //Len_L
    Packet[6] = 0x00; //Len_H
    Packet[7] = 0x08; //Instruction


    for (i = 0; i<sizeof (Packet); i++)
    TxPacket[i] = Packet[i];
    TxPacket[sizeof (Packet)] = (CRC16(Packet, sizeof (Packet)) & 0x00FF);
    TxPacket[sizeof (Packet) + 1] = (CRC16(Packet, sizeof (Packet)) >> 8) & 0x00FF;


    PIC_to_DynamixelRX();
    UART_Write_Size(TxPacket, sizeof (TxPacket));
    }


    void Dynamixel_Torque(unsigned char status) {


    unsigned char Packet[11], TxPacket[sizeof (Packet) + 2];
    unsigned short int i;


    Packet[0] = 0xFF; //Header
    Packet[1] = 0xFF; //Header
    Packet[2] = 0xFD; //Header
    Packet[3] = 0x00; //Reserved
    Packet[4] = 0x01; //Packet ID
    Packet[5] = 0x06; //Len_L
    Packet[6] = 0x00; //Len_H
    Packet[7] = 0x03; //Instruction
    Packet[8] = 0x40; //Parameter 1 - Low-order byte from the starting address
    Packet[9] = 0x00; //Parameter 2 - High-order byte from the starting address
    Packet[10] = status; //status: '0x01' = Torque ON; '0x00' = Torque OFF


    for (i = 0; i<sizeof (Packet); i++)
    TxPacket[i] = Packet[i];
    TxPacket[sizeof (Packet)] = (CRC16(Packet, sizeof (Packet)) & 0x00FF);
    TxPacket[sizeof (Packet) + 1] = (CRC16(Packet, sizeof (Packet)) >> 8) & 0x00FF;


    PIC_to_DynamixelRX();
    UART_Write_Size(TxPacket, sizeof (TxPacket));
    }


    void Dynamixel_LED(unsigned char status) {


    unsigned char Packet[11], TxPacket[sizeof (Packet) + 2];
    unsigned short int i;


    Packet[0] = 0xFF; //Header
    Packet[1] = 0xFF; //Header
    Packet[2] = 0xFD; //Header
    Packet[3] = 0x00; //Reserved
    Packet[4] = 0x01; //Packet ID
    Packet[5] = 0x06; //Len_L
    Packet[6] = 0x00; //Len_H
    Packet[7] = 0x03; //Instruction
    Packet[8] = 0x41; //Parameter 1 - Low-order byte from the starting address
    Packet[9] = 0x00; //Parameter 2 - High-order byte from the starting address
    Packet[10] = status; //status: 0x01 = LED ON; 0x00 = LED OFF


    for (i = 0; i<sizeof (Packet); i++)
    TxPacket[i] = Packet[i];
    TxPacket[sizeof (Packet)] = (CRC16(Packet, sizeof (Packet)) & 0x00FF);
    TxPacket[sizeof (Packet) + 1] = (CRC16(Packet, sizeof (Packet)) >> 8) & 0x00FF;


    PIC_to_DynamixelRX();
    UART_Write_Size(TxPacket, sizeof (TxPacket));
    }


    void Dynamixel_Moving_Threshold(long Threshold) {


    unsigned char Packet[14], TxPacket[sizeof (Packet) + 2];
    unsigned short int i;


    Packet[0] = 0xFF; //Header
    Packet[1] = 0xFF; //Header
    Packet[2] = 0xFD; //Header
    Packet[3] = 0x00; //Reserved
    Packet[4] = 0x01; //Packet ID
    Packet[5] = 0x09; //Len_L
    Packet[6] = 0x00; //Len_H
    Packet[7] = 0x03; //Instruction
    Packet[8] = 0x18; //Parameter 1 - Low-order byte from the starting address
    Packet[9] = 0x00; //Parameter 2 - High-order byte from the starting address
    Packet[10] = Threshold & 0x00FF; //Threshold - First Byte
    Packet[11] = (Threshold >> 8) & 0x00FF; //Threshold - Second Byte
    Packet[12] = (Threshold >> 16) & 0x00FF; //Threshold - Third Byte
    Packet[13] = (Threshold >> 24) & 0x00FF; //Threshold - Fourth Byte


    for (i = 0; i<sizeof (Packet); i++)
    TxPacket[i] = Packet[i];
    TxPacket[sizeof (Packet)] = (CRC16(Packet, sizeof (Packet)) & 0x00FF);
    TxPacket[sizeof (Packet) + 1] = (CRC16(Packet, sizeof (Packet)) >> 8) & 0x00FF;


    PIC_to_DynamixelRX();
    UART_Write_Size(TxPacket, sizeof (TxPacket));
    }


    void Dynamixel_Position_P_Gain(long Gain) {


    unsigned char Packet[12], TxPacket[sizeof (Packet) + 2];
    unsigned short int i;


    Packet[0] = 0xFF; //Header
    Packet[1] = 0xFF; //Header
    Packet[2] = 0xFD; //Header
    Packet[3] = 0x00; //Reserved
    Packet[4] = 0x01; //Packet ID
    Packet[5] = 0x07; //Len_L
    Packet[6] = 0x00; //Len_H
    Packet[7] = 0x03; //Instruction
    Packet[8] = 0x54; //Parameter 1 - Low-order byte from the starting address
    Packet[9] = 0x00; //Parameter 2 - High-order byte from the starting address
    Packet[10] = Gain & 0x00FF; //Gain - First Byte
    Packet[11] = (Gain >> 8) & 0x00FF; //Gain - Second Byte


    for (i = 0; i<sizeof (Packet); i++)
    TxPacket[i] = Packet[i];
    TxPacket[sizeof (Packet)] = (CRC16(Packet, sizeof (Packet)) & 0x00FF);
    TxPacket[sizeof (Packet) + 1] = (CRC16(Packet, sizeof (Packet)) >> 8) & 0x00FF;


    PIC_to_DynamixelRX();
    UART_Write_Size(TxPacket, sizeof (TxPacket));
    }


    void Dynamixel_Profile_Aceleration(long Aceleration) {


    unsigned char Packet[14], TxPacket[sizeof (Packet) + 2];
    unsigned short int i;


    Packet[0] = 0xFF; //Header
    Packet[1] = 0xFF; //Header
    Packet[2] = 0xFD; //Header
    Packet[3] = 0x00; //Reserved
    Packet[4] = 0x01; //Packet ID
    Packet[5] = 0x09; //Len_L
    Packet[6] = 0x00; //Len_H
    Packet[7] = 0x03; //Instruction
    Packet[8] = 0x6C; //Parameter 1 - Low-order byte from the starting address
    Packet[9] = 0x00; //Parameter 2 - High-order byte from the starting address
    Packet[10] = Aceleration & 0x00FF; //Profile Aceleration - Fist Byte
    Packet[11] = (Aceleration >> 8) & 0x00FF; //Profile Aceleration - Second Byte
    Packet[12] = (Aceleration >> 16) & 0x00FF; //Profile Aceleration - Third Byte
    Packet[13] = (Aceleration >> 24) & 0x00FF; //Profile Aceleration - Fourth Byte


    for (i = 0; i<sizeof (Packet); i++)
    TxPacket[i] = Packet[i];
    TxPacket[sizeof (Packet)] = (CRC16(Packet, sizeof (Packet)) & 0x00FF);
    TxPacket[sizeof (Packet) + 1] = (CRC16(Packet, sizeof (Packet)) >> 8) & 0x00FF;


    PIC_to_DynamixelRX();
    UART_Write_Size(TxPacket, sizeof (TxPacket));
    }




    void Dynamixel_Profile_Velocity(long Velocity) {


    unsigned char Packet[14], TxPacket[sizeof (Packet) + 2];
    unsigned short int i;


    Packet[0] = 0xFF; //Header
    Packet[1] = 0xFF; //Header
    Packet[2] = 0xFD; //Header
    Packet[3] = 0x00; //Reserved
    Packet[4] = 0x01; //Packet ID
    Packet[5] = 0x09; //Len_L
    Packet[6] = 0x00; //Len_H
    Packet[7] = 0x03; //Instruction
    Packet[8] = 0x70; //Parameter 1 - Low-order byte from the starting address
    Packet[9] = 0x00; //Parameter 2 - High-order byte from the starting address
    Packet[10] = Velocity & 0x00FF; //Profile Velocity - Fist Byte
    Packet[11] = (Velocity >> 8) & 0x00FF; //Profile Velocity - Second Byte
    Packet[12] = (Velocity >> 16) & 0x00FF; //Profile Velocity - Third Byte
    Packet[13] = (Velocity >> 24) & 0x00FF; //Profile Velocity - Fourth Byte


    for (i = 0; i<sizeof (Packet); i++)
    TxPacket[i] = Packet[i];
    TxPacket[sizeof (Packet)] = (CRC16(Packet, sizeof (Packet)) & 0x00FF);
    TxPacket[sizeof (Packet) + 1] = (CRC16(Packet, sizeof (Packet)) >> 8) & 0x00FF;


    PIC_to_DynamixelRX();
    UART_Write_Size(TxPacket, sizeof (TxPacket));
    }


    void Dynamixel_Velocity_Limit(long Velocity) {


    unsigned char Packet[14], TxPacket[sizeof (Packet) + 2];
    unsigned short int i;


    Packet[0] = 0xFF; //Header
    Packet[1] = 0xFF; //Header
    Packet[2] = 0xFD; //Header
    Packet[3] = 0x00; //Reserved
    Packet[4] = 0x01; //Packet ID
    Packet[5] = 0x09; //Len_L
    Packet[6] = 0x00; //Len_H
    Packet[7] = 0x03; //Instruction
    Packet[8] = 0x2C; //Parameter 1 - Low-order byte from the starting address
    Packet[9] = 0x00; //Parameter 2 - High-order byte from the starting address
    Packet[10] = Velocity & 0x00FF; //Profile Velocity - Fist Byte
    Packet[11] = (Velocity >> 8) & 0x00FF; //Profile Velocity - Second Byte
    Packet[12] = (Velocity >> 16) & 0x00FF; //Profile Velocity - Third Byte
    Packet[13] = (Velocity >> 24) & 0x00FF; //Profile Velocity - Fourth Byte


    for (i = 0; i<sizeof (Packet); i++)
    TxPacket[i] = Packet[i];
    TxPacket[sizeof (Packet)] = (CRC16(Packet, sizeof (Packet)) & 0x00FF);
    TxPacket[sizeof (Packet) + 1] = (CRC16(Packet, sizeof (Packet)) >> 8) & 0x00FF;


    PIC_to_DynamixelRX();
    UART_Write_Size(TxPacket, sizeof (TxPacket));
    }


    void Dynamixel_Status_Return(void) {


    unsigned char Packet[11], TxPacket[sizeof (Packet) + 2];
    unsigned short int i;


    Packet[0] = 0xFF; //Header
    Packet[1] = 0xFF; //Header
    Packet[2] = 0xFD; //Header
    Packet[3] = 0x00; //Reserved
    Packet[4] = 0x01; //Packet ID
    Packet[5] = 0x06; //Len_L
    Packet[6] = 0x00; //Len_H
    Packet[7] = 0x03; //Instruction
    Packet[8] = 0x44; //Parameter 1 - Low-order byte from the starting address
    Packet[9] = 0x00; //Parameter 2 - High-order byte from the starting address
    Packet[10] = 0x00; //Status Return - Fist Byte



    for (i = 0; i<sizeof (Packet); i++)
    TxPacket[i] = Packet[i];
    TxPacket[sizeof (Packet)] = (CRC16(Packet, sizeof (Packet)) & 0x00FF);
    TxPacket[sizeof (Packet) + 1] = (CRC16(Packet, sizeof (Packet)) >> 8) & 0x00FF;


    PIC_to_DynamixelRX();
    UART_Write_Size(TxPacket, sizeof (TxPacket));
    }


    void Dynamixel_Return_Delay(void) {


    unsigned char Packet[11], TxPacket[sizeof (Packet) + 2];
    unsigned short int i;


    Packet[0] = 0xFF; //Header
    Packet[1] = 0xFF; //Header
    Packet[2] = 0xFD; //Header
    Packet[3] = 0x00; //Reserved
    Packet[4] = 0x01; //Packet ID
    Packet[5] = 0x06; //Len_L
    Packet[6] = 0x00; //Len_H
    Packet[7] = 0x03; //Instruction
    Packet[8] = 0x09; //Parameter 1 - Low-order byte from the starting address
    Packet[9] = 0x00; //Parameter 2 - High-order byte from the starting address
    Packet[10] = 0x00; //Return Delay- Fist Byte



    for (i = 0; i<sizeof (Packet); i++)
    TxPacket[i] = Packet[i];
    TxPacket[sizeof (Packet)] = (CRC16(Packet, sizeof (Packet)) & 0x00FF);
    TxPacket[sizeof (Packet) + 1] = (CRC16(Packet, sizeof (Packet)) >> 8) & 0x00FF;


    PIC_to_DynamixelRX();
    UART_Write_Size(TxPacket, sizeof (TxPacket));
    }


    void Dynamixel_Write_Velocity(long Velocity) {


    unsigned char Packet[14], TxPacket[sizeof (Packet) + 2];
    unsigned short int i;


    Packet[0] = 0xFF; //Header
    Packet[1] = 0xFF; //Header
    Packet[2] = 0xFD; //Header
    Packet[3] = 0x00; //Reserved
    Packet[4] = 0x01; //Packet ID
    Packet[5] = 0x09; //Len_L
    Packet[6] = 0x00; //Len_H
    Packet[7] = 0x03; //Instruction
    Packet[8] = 0x68; //Parameter 1 - Low-order byte from the starting address
    Packet[9] = 0x00; //Parameter 2 - High-order byte from the starting address
    Packet[10] = Velocity & 0x00FF; //Goal Position - First Byte
    Packet[11] = (Velocity >> 8) & 0x00FF; //Goal Position - Second Byte
    Packet[12] = (Velocity >> 16) & 0x00FF; //Goal Position - Third Byte
    Packet[13] = (Velocity >> 24) & 0x00FF; //Goal Position - Fourth Byte


    for (i = 0; i<sizeof (Packet); i++)
    TxPacket[i] = Packet[i];
    TxPacket[sizeof (Packet)] = (CRC16(Packet, sizeof (Packet)) & 0x00FF);
    TxPacket[sizeof (Packet) + 1] = (CRC16(Packet, sizeof (Packet)) >> 8) & 0x00FF;


    PIC_to_DynamixelRX();
    UART_Write_Size(TxPacket, sizeof (TxPacket));
    }


    // </editor-fold>

  6. #6

    Re: XL430-W250 Stop moving randomly

    Note: I see this question is now up on Robotis Forum: http://en.robotis.com/service/forum_...stx=&stx=&sfl=

    Looking at the stuff up on Robotis, wondering what your issue is...

    That is are you saying that your Servo stops responding and as such implies maybe issue with communications or ...

    Or are you saying your servo does not respond at a consistent smooth movement from one to 4000? Which is what it sounds closer to with your conversation with @wilson on the Robotis site? In either case as it is not something specific to Trossen (like you are using the Arbotix controller and library), you are probably better off continuing on the Robotis site.

  7. #7

    Re: XL430-W250 Stop moving randomly

    The motor turns non-responsive after some goal positions instructions
    Are you sure it's the motor? If so, is it signaling an error? (Not reading status back is in general a bad habit, because it makes debugging harder.)

    If you hook up a scope or logic analyzer on the TTL bus, is the PIC still generating the commands?

    Does the error always happen at the same position in the movement, or does it vary?

    How is power insulated between the controller, the TTL bus pull-up, and the servo? Would motor EMI make it through?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. New XL430-W250-T DOES NOT MOVE
    By Larcay in forum DYNAMIXEL & Robot Actuators
    Replies: 5
    Last Post: 09-14-2018, 11:54 AM
  2. Question(s) Hexapod Randomly Freezes
    By xenoc in forum Humanoids, Walkers & Crawlers
    Replies: 7
    Last Post: 09-12-2018, 08:42 AM
  3. News/Announcement Beta testing XL430
    By Zenta in forum DYNAMIXEL & Robot Actuators
    Replies: 6
    Last Post: 04-22-2017, 11:55 AM
  4. Replies: 13
    Last Post: 06-21-2016, 11:00 AM
  5. Emergency stop for Serializer?
    By swabygw in forum Arbotix, Microcontrollers, Arduino
    Replies: 0
    Last Post: 09-26-2011, 06:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •