Results 1 to 6 of 6

Thread: Questions on communicating with USB2Dynamixel

  1. Question Questions on communicating with USB2Dynamixel

    We recently are blocked by a communication problem between computer and dynamixels, which never comes out before. In our project, we connect a dynamixel to our laptop via USB2Dynamixel. It seems to work well with DynamixelWizard. Unfortunately, communication errors are prompted out at a very high frequency, regardless of changing OS (Windows 8.1 Pro, Linux), development environments (C, MATLAB, Python), USB2Dynamixel and its Driver (VER 2.12.0.0 and 2.10.0.0), MX- and AX-serials dynamixels. Below are details for the problem.


    For all tries, we use an AC ADAPTER (ouput 12V~5A) and SMPS2DXL for power supply, both purchased together with dynamixels.


    【Try 1#】
    PC: Acer laptop running Windows 8.1 Pro 64 bit
    IDE: MATLAB R2013b 64bit, mex-compiler (Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files (x86)\Microsoft Visual Studio 10.0)
    USB2Dynamixel: FTDI VER 2.12.0.0 (also try VER 2.10.0.0 on an ASUS laptop running Windows 8.1 Pro 64 bit), keep default settings
    SDK: dxl_sdk_win64_v1_02, downloaded from ROBOTIS
    Code: Readwrite example in the above SDK folder (only modify the DEFAULT_BAUDNUM and GoalPos according to AX and MX serials)
    Dynamixels: MX-64AT, MX-28AT and AX-12A, one by one (never connect two)
    Result:
    =================Begin of Result 1: AX-12A==============
    >> ReadWrite


    Functions in library dynamixel:

    dxl_get_highbyte dxl_get_rxpacket_parameter dxl_read_word dxl_set_txpacket_parameter dxl_write_word
    dxl_get_lowbyte dxl_initialize dxl_rx_packet dxl_terminate
    dxl_get_result dxl_makeword dxl_set_txpacket_id dxl_tx_packet
    dxl_get_rxpacket_error dxl_ping dxl_set_txpacket_instruction dxl_txrx_packet
    dxl_get_rxpacket_length dxl_read_byte dxl_set_txpacket_length dxl_write_byte

    Succeed to open USB2Dynamixel!
    Do you want more? Y/N [Y]: y
    0 1023


    COMM_RXCORRUPT: Incorrect status packet!
    Do you want more? Y/N [Y]: y
    COMM_RXCORRUPT: Incorrect status packet!
    Do you want more? Y/N [Y]: y
    0 1
    0 0
    0 0
    0 0
    0 1
    0 0
    0 0
    COMM_RXCORRUPT: Incorrect status packet!
    Do you want more? Y/N [Y]: y
    0 0
    0 1
    0 1
    0 0
    0 0
    0 1
    0 0
    0 0
    0 0
    0 0
    0 1
    Do you want more? Y/N [Y]: y
    1023 3
    1023 25
    1023 57
    COMM_RXCORRUPT: Incorrect status packet!
    Do you want more? Y/N [Y]: y
    1023 1023
    1023 1023
    1023 1023
    1023 1023
    1023 1023
    1023 1023
    1023 1023
    1023 1023
    1023 1023
    1023 1023
    Do you want more? Y/N [Y]: y
    0 1021
    0 1001
    0 967
    0 927
    0 888
    0 847
    0 804
    COMM_RXCORRUPT: Incorrect status packet!
    Do you want more? Y/N [Y]: y
    0 0
    0 1
    0 0
    0 0
    0 0
    0 0
    0 0
    0 64001
    COMM_TXFAIL : Failed transmit instruction packet!
    Do you want more? Y/N [Y]: y
    COMM_TXFAIL : Failed transmit instruction packet!
    Do you want more? Y/N [Y]: y
    COMM_TXFAIL : Failed transmit instruction packet!
    Do you want more? Y/N [Y]: y
    COMM_TXFAIL : Failed transmit instruction packet!
    Do you want more? Y/N [Y]:
    ==================End of Result 1: AX-12A===============


    【Try 2#】
    PC: ASUS laptop running Ubuntu 14.04 LTS 64 bit (Linux 3.13.0-46-generic)
    IDE: build and execute following the ROBOTIS e-Manual
    SDK: dxl_sdk_win64_v1_02, downloaded from ROBOTIS
    Code: Readwrite example in the above SDK folder (only modify the DEFAULT_BAUDNUM and GoalPos according to AX and MX serials)
    Dynamixels: MX-64AT, MX-28AT and AX-12A, one by one (never connect two)
    Result:
    =================Begin of Result 2: MX-64AT==============
    Read/Write example for Linux


    Succeed to open USB2Dynamixel!
    Press Enter key to continue!(press ESC and Enter to quit)


    0 2048
    Press Enter key to continue!(press ESC and Enter to quit)


    4095 2050
    COMM_RXCORRUPT: Incorrect status packet!
    Press Enter key to continue!(press ESC and Enter to quit)


    4095 4092
    Press Enter key to continue!(press ESC and Enter to quit)


    COMM_RXCORRUPT: Incorrect status packet!
    Press Enter key to continue!(press ESC and Enter to quit)


    0 2048
    Press Enter key to continue!(press ESC and Enter to quit)


    4095 2049
    4095 2070
    4095 2100
    4095 2139
    COMM_RXCORRUPT: Incorrect status packet!
    Press Enter key to continue!(press ESC and Enter to quit)
    ^[
    Press Enter key to terminate...
    =================Begin of Result 2: MX-64AT==============


    【Try 3#】
    PC: both laptops above
    IDE: Python 2.7.9, pyserial-2.7
    Library: lib_robotis_mod.py (https://github.com/grablab/openhand-...robotis_mod.py) / lib_dynamixel.py (http://docs.ros.org/fuerte/api/robot...py_source.html, modified two runtimerror underlined in the result)
    Code:
    ==================sample for lib_dynamixel.py, Windows 8.1 Pro, MX-64AT ==============
    from lib_dynamixel import *


    dyn = Dynamixel_Chain(dev = '/COM3', ids = [1])
    test_servos(dyn)
    ==================sample for lib_dynamixel.py, Windows 8.1 Pro, MX-64AT ==============
    Dynamixels: MX-64AT, MX-28AT and AX-12A, one by one (never connect two)
    Result:
    Communication errors listed below prompt up very often: -
    lib_dynamixel: Failed to receive start bytes
    lib_dynamixel: Incorrect servo ID received
    lib_dynamixel: Error in Received Checksum
    even cannot run a full test cycle.


    =================Begin of Result 3: MX-64AT==============
    Scanning for servos with ID('s): [1]


    FOUND A SERVO @ ID 1


    Servo_config.py configuration file not found. Using defaults.
    Created new MX-series Robotis Servo at ID 1
    Testing Servo ids [1] on /COM3


    Servo 1:
    Ping servo: Successful
    Status Return Level: 2 - Return status packet to all requests
    Baudrate: 57600
    Series and model: MX-310
    Firmware version: 36
    Return Delay Time: 500 (microseconds)
    Temperature Alarm Limit: 80 C
    Present Temperature: 28 C
    Checksum Error!
    Voltage Limits: 2.8V -- 16.0V
    Checksum Error!
    Present Voltage: 12.4V
    EEPROM Locked? False
    Turning LED On
    Is servo 1's LED on? (y/n)y
    Is servo 1's LED off? (y/n)y


    The remaining test functions will cause servo 1 to move including continuous motion, and should not be performed if the servo is attached to external hardware that cannot rotate freely.
    Do you wish to proceed? (y/n)y
    Setting servo 1 angle limits.
    Servo EEPROM angle limits: [-3.1408254758966088, 3.1423598312829775]
    Torque Limit: 100.0%
    Torque output cap: 100.0%
    Current Torque: 0.0%
    Enabling Torque
    Torque Enabled: True
    Disabling Torque
    Torque Enabled: False
    Re-enabling torque


    PID Gains:
    P:4.0
    I:0.0
    D:0.0
    Changing PID Gains to near max. (31, 124, 1)
    PID Gains:
    P:31.0
    I:123.53515625
    D:1.0
    PID Gains Changed successfully. Resetting to previous values.
    Punch: 0
    Goal Angle: 3.13775676512
    Goal Angular Velocity: 0.0
    Present Position: 3.13775676512
    Present Angular Velocity: 0.0
    Currently Moving? False


    Moving to Min and Max Angles


    Moving to angle: -3.1408254759 at 0.785398163397 rad/sec.
    Position: 2.71120596771 Velocity: -0.814849547327
    Position: 1.31954563228 Velocity: -0.814849547327
    Position: -0.070580347773 Velocity: -0.814849547327
    Position: -1.43155357548 Velocity: -0.814849547327
    Position: -2.76337405085 Velocity: -0.814849547327


    Moving to angle: 3.14159265359 at 0.785398163397 rad/sec.
    Checksum Error!
    Position: -2.71427467849 Velocity: 0.0
    Position: -1.34102660769 Velocity: 0.814849547327
    Position: 0.0751834139321 Velocity: 0.766917221014
    Ýÿ(Note: start byte error)


    Traceback (most recent call last):
    File "E:\Projects\MantisProgram\test_lib_dynamixel. py", line 4, in <module>
    test_servos(dyn)
    File "E:\Projects\MantisProgram\lib_dynamixel.py", line 1253, in test_servos
    while dyn.is_moving(id):
    File "E:\Projects \MantisProgram\lib_dynamixel.py", line 762, in is_moving
    data = self.read_address(id, 0x2e, 1)
    File "E:\Projects \MantisProgram\lib_dynamixel.py", line 168, in read_address
    return self._send_instruction(msg, id)
    File "E:\Projects \MantisProgram\lib_dynamixel.py", line 131, in _send_instruction
    id, data, err = self._receive_reply(id)
    File "E:\Projects \MantisProgram\lib_dynamixel.py", line 104, in _receive_reply
    raise RuntimeError('lib_dynamixel: Incorrect servo ID received: %d\n' %servo_id)
    RuntimeError: lib_dynamixel: Incorrect servo ID received: 0
    =================End of Result 3: MX-64AT==============

    Any idea? We appreciate your help very much in advance!
    Last edited by KevinO; 03-18-2015 at 11:47 AM. Reason: bad formatting

  2. Re: Questions on communicating with USB2Dynamixel

    That's indeed a lot of errors.

    The present of TX FAIL errors in Try 1 is interesting: these can only happen if a WriteFile call (in dxl_hal.c, "int dxl_hal_tx( unsigned char *pPacket, int numPacket )") does not produce the expected result. I would suppose that this error can only come from something that fails in the "OS - driver - USB hardware of the laptop - FTDI chip" part of the chain.
    If you know how to do it, I would suggest putting some debug code in that function to show the nature of the error with GetLastError() (cf WriteFile documentation).

    At first glance, the most suspect part to me would be the FTDI driver. I would start by trying to uninstall the FTDI driver again, make 100% sure there's nothing left of it, then install an even older one - something at least 2 years old.

    Is it the same when the laptops are running from battery and plugged in?
    Could you get another power supply to test with?
    ---
    Personal blog: http://xevel.org
    USB2AX documentation: http://xevelabs.com

  3. Re: Questions on communicating with USB2Dynamixel

    Also, would you happen to have access to a logic analyzer? that would be useful to check that everything is as expected on the Dynamixel Bus.

    The receive errors are tough to troubleshoot as they can come from a vast number of things between the servo and the application...


    Another question: how long are your cables, and are they in good shape (and if not, could you test with other cables?)
    Last edited by Xevel; 03-18-2015 at 02:38 PM.
    ---
    Personal blog: http://xevel.org
    USB2AX documentation: http://xevelabs.com

  4. #4

    Re: Questions on communicating with USB2Dynamixel

    How many Dynamixels?

    How much current do they draw when idle, each of them?

    Are you plugging the USB2Dynamixel straight into the laptop, or using a male-to-female "pigtail"? The USB2Dynamixel is very bulky, and can bend the USB connection on the laptop, causing a finicky connection.

    Do you have an oscilloscope? There may be signal quality issues that a logic analyzer can't show as well as an oscilloscope may.

  5. Re: Questions on communicating with USB2Dynamixel

    Question solved, I think. Thank you very much, Xevel and jwatte!

    As you guys suggested, we use an oscilloscope to monitor the data-pin signal, and found it has quite a lot of noise. We change devices one by one, and finally, we got the good-quality square signal by changing the power supply to a GWINSTEK LABORATORY DC POWER SUPPLY. It is very stable now.

    We will continue to test the system. Any question we will feedback. Thank you again. You did help us!

  6. Re: Questions on communicating with USB2Dynamixel

    Hi guys, another connection problem comes Need your help. I post the problem here
    http://forums.trossenrobotics.com/sh...can-t-be-found
    as I think it is same to that question.

    Thank you!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. New Arbotix-M not communicating with my PC
    By Machine27 in forum Arbotix, Microcontrollers, Arduino
    Replies: 12
    Last Post: 04-12-2014, 05:14 PM
  2. usb2dynamixel c sdk
    By Elijawww in forum Software and Programming
    Replies: 18
    Last Post: 08-14-2013, 12:45 PM
  3. Question(s) Problem with Arbotix Commander 2 communicating with Arduino uno via xbees
    By jerry7580 in forum Arbotix, Microcontrollers, Arduino
    Replies: 4
    Last Post: 08-02-2013, 01:07 AM
  4. (Questions) How to use USB2Dynamixel under 64v bit Ubuntu 12.04
    By zhenli in forum Arbotix, Microcontrollers, Arduino
    Replies: 1
    Last Post: 02-01-2013, 03:31 PM
  5. AX-12 and USB2Dynamixel problem
    By ringo42 in forum DYNAMIXEL & Robot Actuators
    Replies: 8
    Last Post: 11-02-2011, 09:15 AM

Tags for this Thread

Posting Permissions

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