array entries into the correct memory slots of a digital
packet. However, for now, let’s insert the parameters
manually:
//READ ID DIGITAL PACKET
xmit_buff[0] = 0xFF; //sync character
xmit_buff[1] = 0xFF; //sync character
xmit_buff[2] = 0x01; //unique ID
xmit_buff[3] = 0x04; //# of PARMS+INSTRUCTION+CHECKSUM
xmit_buff[4] = iREAD_DATA; //instruction
xmit_buff[5] = ID; //parameter 1
xmit_buff[6] = 0x01; //parameter 2
xmit_buff[7] = 0xF4; //checksum
Both of the digital packets we assembled will trigger
a response from the AX- 12+. In the case of the PING
digital packet, we should receive a status message
containing the AX- 12+’s ID, an ERROR byte, and a
checksum byte. If the PING operation is successful, here’s
what a returned status digital packet looks like from a
programmer’s point of view:
xmit_buff[0] = 0xFF;
xmit_buff[1] = 0xFF;
xmit_buff[2] = 0x01;
xmit_buff[3] = 0x02;
xmit_buff[4] = 0x00;
xmit_buff[5] = 0xFC;
//sync character
//sync character
//payload value = ID of AX-12+
//# of PARMS+INSTRUCTION+CHECKSUM
//error byte – 0x00 = none
//checksum
This status message contents are confirmed in
Screenshot 3, which is the PING response data I received
from an AX- 12+ with an ID of 0x01. I also took the liberty
to capture the response for the READ_DATA digital packet
in Screenshot 4. Here’s the programmer view of the status
message data captured in Screenshot 4:
xmit_buff[0] = 0xFF;
xmit_buff[1] = 0xFF;
xmit_buff[2] = 0x01;
xmit_buff[3] = 0x03;
xmit_buff[4] = 0x00;
xmit_buff[5] = 0x01;
xmit_buff[6] = 0xFA;
//sync character
//sync character
//unique ID
//# of PARMS+INSTRUCTION+CHECKSUM
//ERROR byte – no errors
//parameter 1
//checksum
More To Come
I think you’ve got the idea. So, next time we’ll add some
meat to our firmware potatoes and code up a number of
functions that will give us dominion over the AX- 12+ Dynamixel
robot actuator. In the meantime, I’ll post the preliminary
AX- 12+ PIC18F2620 firmware I used here to communicate
with an AX- 12+ as a download package on the SERVO
website (
www.servomagazine.com). Be sure to have your
AX- 12+ controller hardware ready to roll as next time we’re
going to concentrate on the firmware. SV
Fred Eady can be reached via email at fred@edtp.com
Dynamixel SDK
Microsoft
Visual Studio
C/C++
Visual Basic
C#
EX-106
EX-106
164
Encoder
14. 8
84 106
0.182 0.143
155
SERVO 04.2009
37