Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Dynamixel RX-24F and RS-485 Communication on Linux/Ubuntu

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
7 postsPage 1 of 1
7 postsPage 1 of 1

Dynamixel RX-24F and RS-485 Communication on Linux/Ubuntu

Post by ankurhanda » Thu Aug 30, 2012 4:10 pm

Post by ankurhanda
Thu Aug 30, 2012 4:10 pm

Hi everyone,

I am trying to get my new RX-24F working with usb2dynamixel. Initially I thought the SDK provided here (http://support.robotis.com/en/software/ ... _linux.htm) would work too because it did work for previous dynamixels but with ax series e.g. ax-18A. The same code does not work for RX-24F with the USBDynamixel switched to RS-485 mode and it is clear that I am missing some good understanding of how to communicate with RS-485. Has anyone tried RX-24F on linux? Could you please help me on that?

Thank you.
Hi everyone,

I am trying to get my new RX-24F working with usb2dynamixel. Initially I thought the SDK provided here (http://support.robotis.com/en/software/ ... _linux.htm) would work too because it did work for previous dynamixels but with ax series e.g. ax-18A. The same code does not work for RX-24F with the USBDynamixel switched to RS-485 mode and it is clear that I am missing some good understanding of how to communicate with RS-485. Has anyone tried RX-24F on linux? Could you please help me on that?

Thank you.
ankurhanda
Newbie
Newbie
Posts: 4
Joined: Tue Jun 05, 2012 1:16 pm

Post by PedroR » Thu Aug 30, 2012 4:29 pm

Post by PedroR
Thu Aug 30, 2012 4:29 pm

Hi

Communicating over RS485 or over TTL is exactly the same from a software perspective.

The difference between RS485 and TTL is a hardware chip that modifies the way the signal is transmitted. However, on arrival at the servo processor, the protocol packets look exactly the same regardless of being sent over RS485 or TTL.

As you very well mentioned the only thing you need to do is set the USB2Dynamixel to RS485.

All the rest should remain the same.

There are however 2 things to confirm:
1)
Double check the Control Table for the RX servo you have and in particular the memory mappings.
The control table is very similar from among Dynamixels but there are some minor differences between Servo Series (for example in an MX servo the position must be passed as a 12 bit value where in AX, it's a 10 bit value).
I'm not fully aware of the particularities of RX servos, but looking in the robotis support site (http://support.robotis.com) should clarify this.

2)
Another very common assumption people make with RS485 servos is thinking they are Full duplex (ie that they have RX and TX) because they have 4 wires (the AX series uses 3 wires).
This is wrong.
RS485 servos (RX and EX series) are also Half Duplex like the AX series.

The reason why they have a 4 wires is because each direction in RS485 requires a pair of wires. In other words a full duplex setup in RS485 would require 4 DATA wires (1 pair for RX and 1 pair for TX).
Wikipedia should explain more about RS485.
The important thing to retain is that they are Half Duplex servos exactly like the AX series.


As a final note, I would also recommend testing that your servo is working fine by suing the Dynamixel Wizard.
Connect the servo to the PC using the USB2Dynamixel and use the Dynamixel Wizard to test communication with the servo.
If you're not familiar with Dynamixel Wizard, this is a graphical tool to test and manipulate the servo. You must download Roboplus from the Robotis website and the Dynamixel Wizard is one of the many tools included in the Roboplus Suite (you'll find after you install Roboplus).

Regards
Pedro.
Hi

Communicating over RS485 or over TTL is exactly the same from a software perspective.

The difference between RS485 and TTL is a hardware chip that modifies the way the signal is transmitted. However, on arrival at the servo processor, the protocol packets look exactly the same regardless of being sent over RS485 or TTL.

As you very well mentioned the only thing you need to do is set the USB2Dynamixel to RS485.

All the rest should remain the same.

There are however 2 things to confirm:
1)
Double check the Control Table for the RX servo you have and in particular the memory mappings.
The control table is very similar from among Dynamixels but there are some minor differences between Servo Series (for example in an MX servo the position must be passed as a 12 bit value where in AX, it's a 10 bit value).
I'm not fully aware of the particularities of RX servos, but looking in the robotis support site (http://support.robotis.com) should clarify this.

2)
Another very common assumption people make with RS485 servos is thinking they are Full duplex (ie that they have RX and TX) because they have 4 wires (the AX series uses 3 wires).
This is wrong.
RS485 servos (RX and EX series) are also Half Duplex like the AX series.

The reason why they have a 4 wires is because each direction in RS485 requires a pair of wires. In other words a full duplex setup in RS485 would require 4 DATA wires (1 pair for RX and 1 pair for TX).
Wikipedia should explain more about RS485.
The important thing to retain is that they are Half Duplex servos exactly like the AX series.


As a final note, I would also recommend testing that your servo is working fine by suing the Dynamixel Wizard.
Connect the servo to the PC using the USB2Dynamixel and use the Dynamixel Wizard to test communication with the servo.
If you're not familiar with Dynamixel Wizard, this is a graphical tool to test and manipulate the servo. You must download Roboplus from the Robotis website and the Dynamixel Wizard is one of the many tools included in the Roboplus Suite (you'll find after you install Roboplus).

Regards
Pedro.
Last edited by PedroR on Thu Aug 30, 2012 7:03 pm, edited 1 time in total.
PedroR
Savvy Roboteer
Savvy Roboteer
Posts: 1199
Joined: Mon Jun 16, 2008 11:07 pm

Post by ankurhanda » Thu Aug 30, 2012 5:57 pm

Post by ankurhanda
Thu Aug 30, 2012 5:57 pm

Hi Pedro,

Thank you very much! You definitely assured me that there is no issue to do with communication protocol. I get it working now.
Hi Pedro,

Thank you very much! You definitely assured me that there is no issue to do with communication protocol. I get it working now.
ankurhanda
Newbie
Newbie
Posts: 4
Joined: Tue Jun 05, 2012 1:16 pm

Post by MOHIT JINDAL » Sun Sep 02, 2012 3:04 am

Post by MOHIT JINDAL
Sun Sep 02, 2012 3:04 am

Hi ankur :D I live in Delhi. And you ? From where you purchased Rx24 ? :roll: price ?
Hi ankur :D I live in Delhi. And you ? From where you purchased Rx24 ? :roll: price ?
MOHIT JINDAL
Savvy Roboteer
Savvy Roboteer
Posts: 178
Joined: Wed Nov 10, 2010 7:43 am

Post by ankurhanda » Sun Sep 02, 2012 10:57 am

Post by ankurhanda
Sun Sep 02, 2012 10:57 am

Hi Mohit,

I bought it from trossen robotics because I needed it very quickly but I had to pay extra tax charges.

Ankur.
Hi Mohit,

I bought it from trossen robotics because I needed it very quickly but I had to pay extra tax charges.

Ankur.
ankurhanda
Newbie
Newbie
Posts: 4
Joined: Tue Jun 05, 2012 1:16 pm

Post by MOHIT JINDAL » Sun Sep 02, 2012 11:33 am

Post by MOHIT JINDAL
Sun Sep 02, 2012 11:33 am

oh... Import charges are very high. :( where you live ? I am trying to hack dynamixels. I purchased the hardware at 5k. Are you good in embedded programming ? :P
oh... Import charges are very high. :( where you live ? I am trying to hack dynamixels. I purchased the hardware at 5k. Are you good in embedded programming ? :P
MOHIT JINDAL
Savvy Roboteer
Savvy Roboteer
Posts: 178
Joined: Wed Nov 10, 2010 7:43 am

Post by ankurhanda » Sun Sep 02, 2012 11:38 am

Post by ankurhanda
Sun Sep 02, 2012 11:38 am

I am PhD student at Imperial College London about to finish. I used it for my experiments with camera on the servo and gyro on camera and I programmed it on linux. I did a bit of embedded programming (with AVR Atmel-Mega8) in my undergraduate but didn't really follow up after that.
I am PhD student at Imperial College London about to finish. I used it for my experiments with camera on the servo and gyro on camera and I programmed it on linux. I did a bit of embedded programming (with AVR Atmel-Mega8) in my undergraduate but didn't really follow up after that.
ankurhanda
Newbie
Newbie
Posts: 4
Joined: Tue Jun 05, 2012 1:16 pm


7 postsPage 1 of 1
7 postsPage 1 of 1