by i-Bot » Wed Nov 14, 2012 12:39 pm
by i-Bot
Wed Nov 14, 2012 12:39 pm
In the latest CM730 application code the following instructions are defined:
- Code: Select all
#define INST_PING 0x01
#define INST_READ 0x02
#define INST_WRITE 0x03
#define INST_REG_WRITE 0x04
#define INST_ACTION 0x05
#define INST_RESET 0x06
#define INST_DIGITAL_RESET 0x07
#define INST_SYSTEM_READ 0x0C
#define INST_SYSTEM_WRITE 0x0D
#define INST_SYNC_WRITE 0x83
#define INST_SYNC_REG_WRITE 0x84
#define INST_BULK_READ 0x92
I think the additional SYSTEM and DIGITAL instructions are to do with firmware down load.
The SYNC REG write may be useful if you have a large number of servos.
The format of the BULK_READ appears to be:
Instruction:
0xFF First Sync
0xFF Second Sync
0xFE Broadcast Address
0x0A Packet length(Param + 2)
0x92 BULK_READ instruction
0x00 Parameter 0 = 0x00
0x02 Parameter 1 = Number of bytes to read from first device
0x01 Parameter 2 = ID of first device
0x24 Parameter 3 = Start address in control table for first device
0x02 Parameter 4 = Number of bytes to read from next device
0x02 Parameter 6 = ID of next device
0x24 Parameter 7 = Start address in control table for next device
.....
0x?? Checksum
The lengths and addresses can be different for each ID, so you can read FSR, servo positions and IMU from CM730 in the same bulk read.
The multiple replies are exactly the same as they would be for a normal read to those devices, and are returned in the order their id appears in the parameters. Special application software is needed to handle the multiple replies, I don't think it is supported in the existing DXL libraries, only in the DARwin code.
In the latest CM730 application code the following instructions are defined:
- Code: Select all
#define INST_PING 0x01
#define INST_READ 0x02
#define INST_WRITE 0x03
#define INST_REG_WRITE 0x04
#define INST_ACTION 0x05
#define INST_RESET 0x06
#define INST_DIGITAL_RESET 0x07
#define INST_SYSTEM_READ 0x0C
#define INST_SYSTEM_WRITE 0x0D
#define INST_SYNC_WRITE 0x83
#define INST_SYNC_REG_WRITE 0x84
#define INST_BULK_READ 0x92
I think the additional SYSTEM and DIGITAL instructions are to do with firmware down load.
The SYNC REG write may be useful if you have a large number of servos.
The format of the BULK_READ appears to be:
Instruction:
0xFF First Sync
0xFF Second Sync
0xFE Broadcast Address
0x0A Packet length(Param + 2)
0x92 BULK_READ instruction
0x00 Parameter 0 = 0x00
0x02 Parameter 1 = Number of bytes to read from first device
0x01 Parameter 2 = ID of first device
0x24 Parameter 3 = Start address in control table for first device
0x02 Parameter 4 = Number of bytes to read from next device
0x02 Parameter 6 = ID of next device
0x24 Parameter 7 = Start address in control table for next device
.....
0x?? Checksum
The lengths and addresses can be different for each ID, so you can read FSR, servo positions and IMU from CM730 in the same bulk read.
The multiple replies are exactly the same as they would be for a normal read to those devices, and are returned in the order their id appears in the parameters. Special application software is needed to handle the multiple replies, I don't think it is supported in the existing DXL libraries, only in the DARwin code.