User Tools

Site Tools


product:usb2ax:advanced_instructions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
product:usb2ax:advanced_instructions [2013/04/02 04:52]
xevel [SYNC_READ]
product:usb2ax:advanced_instructions [2014/02/10 20:10]
xevel
Line 1: Line 1:
 ===== USB2AX: Advanced instructions ===== ===== USB2AX: Advanced instructions =====
- 
-//Based on documentation by Richard "​iBot"​ Ibbotson// 
  
 The USB2AX can react to some specific commands as if it were a Dynamixel device. The USB2AX can react to some specific commands as if it were a Dynamixel device.
Line 13: Line 11:
 | 0x06  | RESET       | Reboot USB2AX ​                             |  0                 | | 0x06  | RESET       | Reboot USB2AX ​                             |  0                 |
 | 0x08  | BOOTLOADER ​ | Reboot USB2AX in bootloader mode           ​| ​ 0                 | | 0x08  | BOOTLOADER ​ | Reboot USB2AX in bootloader mode           ​| ​ 0                 |
-| 0x84  | SYNC_READ ​  | Read from several Dynamixel simultaneously |  4 or more           ​|+| 0x84  | SYNC_READ ​  | Read from several Dynamixel simultaneously |  4 or more         ​|
  
 Please note that it will silently ignore the other Dynamixel commands (PING, WRITE_DATA, REG_WRITE, ACTION), and in fact will transmit them on the Dynamixel bus. Please note that it will silently ignore the other Dynamixel commands (PING, WRITE_DATA, REG_WRITE, ACTION), and in fact will transmit them on the Dynamixel bus.
Line 54: Line 52:
 ==== SYNC_READ ==== ==== SYNC_READ ====
  
-SYNC_READ is a command ​used for reading data from multiple Dynamixel actuators with one command.+SYNC_READ is used for reading data from multiple Dynamixel actuators with one command
 +This allows for a significant performance boost when reading the same values in a lot of devices.
  
-FIXME+**Warning: Various implementations of custom Dynamixel multiple-read commands named SYNC_READ can be found over the Internet, this one is based on the one found in the arbotix_python ROS package by Michael Ferguson. 
 +It is not part of the original Dynamixel protocol, and is only supported by some advanced third party Dynamixel controllers,​ like the USB2AX. Please only refer to your controller manufacturer for support, do not contact the servo manufacturer ROBOTIS!**
  
-**Warning** Various implementations of custom Dynamixel multiple-read commands named SYNC_READ ​can be found over the internet, ​this one is based on the one found in the arbotix_python ROS package by Michael Ferguson+**How does it actually work?**\\ 
-It is not part of the original Dynamixel protocoland is only supported by some advanced third party Dynamixel controllers,​ like the USB2AXPlease only refer to your controller manufacturer for support, do not contact ​the servo manufacturer ROBOTIS!+SYNC_READ ​is a command only the controller can understand: using this command without such a controller will either not have any effect or, if a servo with ID 0xFD is present ​on the bus, might return an error 0x20.\\ 
 +The controller converts SYNC_READ into multiple separate READ commands to get data from each servothen sends back to the computer a single big packet containing all the data.\\ 
 +This significantly decreases ​the effect of USB latency.
  
-<​TODO>​+**Limitations**\\ 
 +A SYNC_READ command reads the same registers in each servo.\\ 
 +The USB2AX limits the maximum number of servos to read from (N) to 32, and the maximum data length (L) to 6 bytes.
  
-SYNC_READ is a command only the controller can understand. 
-Using this command without such a controller to interpret it will either not have any effect or, if you have a servo with an ID of 0xFD connected on the Dynamixel bus, it might be responded to with a 0x20 error. 
- 
- 
-In the controller, SYNC_READ is converted into multiple separate READ commands. 
- 
-This allows for a significant performance boost when reading the same values in multiple actuators. 
- 
-The communication time is decreased by the SYNC_READ instruction since many Dynamixel bus read instructions can be performed in a single controller command and response. This makes a significant performance increase where the controller connection may experience high latency compared to the dynamixel bus speed. 
- 
-You can use this instruction only when the lengths and addresses of the control table to be read from are the same. 
- 
- 
-Note : the USB2AX limits the maximum number of actuators to read from (N) to 32, and the maximum data length (L) to 6 bytes. 
- 
- 
- 
-**Instruction Packet** 
  
 +**Instruction Packet**\\
   <​0xFF><​0xFF><​ID><​Length><​Instruction><​Param 1><​Param 2><​Param 3> ... <Param N+2><​Checksum>​   <​0xFF><​0xFF><​ID><​Length><​Instruction><​Param 1><​Param 2><​Param 3> ... <Param N+2><​Checksum>​
  
Line 95: Line 82:
  
  
-**Status Packet (Return Packet)**+**WARNING** Some choices of implementation of the Dynamixel SDK make it impossible to simply send this packet and expect a valid response. A modified version of the SDK will be availalbe to fix this problem.
  
 +
 +
 +**Status Packet (Return Packet)**\\
   <​0xFF><​0xFF><​ID><​Length><​Error><​Param 1> ... <Param L><​Param L+1> ... <Param L*N><​Checksum>​   <​0xFF><​0xFF><​ID><​Length><​Error><​Param 1> ... <Param L><​Param L+1> ... <Param L*N><​Checksum>​
  
Line 111: Line 101:
    
  
-== Example ​==+** Example ​**\\
 Reading the Present Position and Present Speed for 4 Dynamixel actuators with IDs of **0**, //1//, __2__, ''​7''​. Reading the Present Position and Present Speed for 4 Dynamixel actuators with IDs of **0**, //1//, __2__, ''​7''​.
  
-**Instruction Packet**\\+Instruction Packet\\
 0XFF 0XFF 0XFD 0X08 0X84 0X24 0X04 **0X00** //0X01// __0X02__ ''​0X07''​ 0X44\\ 0XFF 0XFF 0XFD 0X08 0X84 0X24 0X04 **0X00** //0X01// __0X02__ ''​0X07''​ 0X44\\
  
-**Response ​Packet**\\+Status ​Packet\\
 0XFF 0XFF 0XFD 0X12 0X00 **0X50 0X01 0XFF 0X01** //0X20 0X00 0X00 0X02// __0X10 0X00 0X10 0X02__ ''​0X00 0X00 0XFE 0X01''​ 0X5C  0XFF 0XFF 0XFD 0X12 0X00 **0X50 0X01 0XFF 0X01** //0X20 0X00 0X00 0X02// __0X10 0X00 0X10 0X02__ ''​0X00 0X00 0XFE 0X01''​ 0X5C 
 +
 +
 +----
 +
 +//Based on documentation by Richard "​iBot"​ Ibbotson//
product/usb2ax/advanced_instructions.txt · Last modified: 2018/04/02 22:16 by xevel