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

Bioloid Control Program From a PC

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

Bioloid Control Program From a PC

Post by srobot » Sun Sep 16, 2007 9:16 pm

Post by srobot
Sun Sep 16, 2007 9:16 pm

I'm working on a Bioloid control program (sort of like BioBlue), but I don't know what values to send to the Zig-100.

Does anyone know what Bits, Bytes, etc. I need to send to the Zig-100?

Thanks,
--Scotty
I'm working on a Bioloid control program (sort of like BioBlue), but I don't know what values to send to the Zig-100.

Does anyone know what Bits, Bytes, etc. I need to send to the Zig-100?

Thanks,
--Scotty
Dell Latitude D520, Windows XP, 4 GB RAM, 80 GB HDD, Intel Core 2 Duo. The power that's needed!

RIBO Labs, Springing Robotic Development to a New Level
srobot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 401
Joined: Sun Dec 10, 2006 1:00 am
Location: Deep in robot parts

Re: Bioloid Control Program From a PC

Post by siempre.aprendiendo » Sun Sep 16, 2007 11:02 pm

Post by siempre.aprendiendo
Sun Sep 16, 2007 11:02 pm

srobot wrote:I'm working on a Bioloid control program (sort of like BioBlue), but I don't know what values to send to the Zig-100.

Does anyone know what Bits, Bytes, etc. I need to send to the Zig-100?

Thanks,
--Scotty


I'm not sure about what dou you mean with "values to send", but for CM-5 communications this message from Dewey:

http://robosavvy.com/forum/viewtopic.php?t=1642
srobot wrote:I'm working on a Bioloid control program (sort of like BioBlue), but I don't know what values to send to the Zig-100.

Does anyone know what Bits, Bytes, etc. I need to send to the Zig-100?

Thanks,
--Scotty


I'm not sure about what dou you mean with "values to send", but for CM-5 communications this message from Dewey:

http://robosavvy.com/forum/viewtopic.php?t=1642
siempre.aprendiendo
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 559
Joined: Wed Aug 08, 2007 9:13 pm
Location: Barcelona

Post by Pev » Mon Sep 17, 2007 8:20 am

Post by Pev
Mon Sep 17, 2007 8:20 am

Scotty,

It is a packet based format and I managed to get the info from Robotis and put it in my Bluetooth Hack document. Its on my website in the Biolod Mods and HAcks section. Also has a very basic example of sending a packet in VB.net.

Hope this helps and good luck, be interested to see the results

Pev
Scotty,

It is a packet based format and I managed to get the info from Robotis and put it in my Bluetooth Hack document. Its on my website in the Biolod Mods and HAcks section. Also has a very basic example of sending a packet in VB.net.

Hope this helps and good luck, be interested to see the results

Pev
Carl
-------------------------
www.alt-view.co.uk
Pev
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 547
Joined: Sun Feb 26, 2006 1:00 am
Location: UK

Post by srobot » Mon Sep 17, 2007 7:44 pm

Post by srobot
Mon Sep 17, 2007 7:44 pm

Thanks Pev!

Do I have this right?

Code: Select all
SerialPort1.DataBits = "255 85 5 190 0 255"


"SerialPort1" = A Serial Port On A Computer

"5" = Back

So if I have this right (and programming on a robot), the robot should go backwards.

I will post the program and source code as soon as I am done (or if anybody would like to see it now I'll post where I am at now).

--Scotty
Thanks Pev!

Do I have this right?

Code: Select all
SerialPort1.DataBits = "255 85 5 190 0 255"


"SerialPort1" = A Serial Port On A Computer

"5" = Back

So if I have this right (and programming on a robot), the robot should go backwards.

I will post the program and source code as soon as I am done (or if anybody would like to see it now I'll post where I am at now).

--Scotty
Dell Latitude D520, Windows XP, 4 GB RAM, 80 GB HDD, Intel Core 2 Duo. The power that's needed!

RIBO Labs, Springing Robotic Development to a New Level
srobot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 401
Joined: Sun Dec 10, 2006 1:00 am
Location: Deep in robot parts

Post by roycepipkins » Mon Sep 17, 2007 10:22 pm

Post by roycepipkins
Mon Sep 17, 2007 10:22 pm

I don' think so. My understanding is that serialport1.databits is not the "send this out of the serial port" function. Rather it controls the number of data bits in a single serial byte's frame. You want .databits = 8. The "send this out of the serial port" function is serialport1.write() I believe.

The numbers you send are supposed to be real numbers, also. Not a string. "255" passed to .write() won't send the single number 255. Rather it will send the ASCII number for the character "2" followed by the ASCII number for the character "5" twice over. So you wind up sending three numbers, a 50 followed by two 53's rather than a single 255.

Read this post to get another idea of the correct number sequence to send for the number 5: http://robosavvy.com/forum/viewtopic.php?t=1395&highlight=

The numbers I think you want to send a 5 are:

255 85 5 250 0 255

In VB *think* that will be the string chr(255) + chr(85) +... etc. assuming .write() demands a string
I don' think so. My understanding is that serialport1.databits is not the "send this out of the serial port" function. Rather it controls the number of data bits in a single serial byte's frame. You want .databits = 8. The "send this out of the serial port" function is serialport1.write() I believe.

The numbers you send are supposed to be real numbers, also. Not a string. "255" passed to .write() won't send the single number 255. Rather it will send the ASCII number for the character "2" followed by the ASCII number for the character "5" twice over. So you wind up sending three numbers, a 50 followed by two 53's rather than a single 255.

Read this post to get another idea of the correct number sequence to send for the number 5: http://robosavvy.com/forum/viewtopic.php?t=1395&highlight=

The numbers I think you want to send a 5 are:

255 85 5 250 0 255

In VB *think* that will be the string chr(255) + chr(85) +... etc. assuming .write() demands a string
roycepipkins
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 25
Joined: Tue Jun 20, 2006 1:00 am

Post by srobot » Mon Sep 17, 2007 10:48 pm

Post by srobot
Mon Sep 17, 2007 10:48 pm

Thanks! It is fine with this code:

Code: Select all
SerialPort1.Write(5)


Now if it works...

I don't have a robot yet to test this on, would anyone like to try it?

I can post the MS VB source code, or a *.exe, your choice.

--Scotty
Thanks! It is fine with this code:

Code: Select all
SerialPort1.Write(5)


Now if it works...

I don't have a robot yet to test this on, would anyone like to try it?

I can post the MS VB source code, or a *.exe, your choice.

--Scotty
Dell Latitude D520, Windows XP, 4 GB RAM, 80 GB HDD, Intel Core 2 Duo. The power that's needed!

RIBO Labs, Springing Robotic Development to a New Level
srobot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 401
Joined: Sun Dec 10, 2006 1:00 am
Location: Deep in robot parts

Post by Pev » Wed Sep 19, 2007 12:29 am

Post by Pev
Wed Sep 19, 2007 12:29 am

Scotty

Remember the Bioloid uses a packet based protocol so you need to support that: An extract from the site may help :

The wireless interface utilises a packet based serial protocol. This packet format is a variation on the Dynamixel packet protocol used by Robotis to control the AX-12s and AX-S1. If you wish to communicate with the CM-5 via the wireless socket on the processor you'll need to send data in he correct packet protocol. The packet format is as follows:

Packet Format :
0xFF 0x55 LSB ~LSB MSB ~MSB

Where ~LSB is the inverse or compliment of LSB and ~MSB is the inverse or compliment of MSB.
(thus ~ = Logical NOT)

To put that another way if you add up LSB and ~LSB you should end up with 255 decimal or 0xFF (hex)

Lets take an example that sends the value 65. If you want to send 65 via the Zig100 protocol you need to send:

255 85 65 190 0 255

Or

0xFF 0x55 0x41 0xBE 0x00 0xFF

If you add the LSB and ~LSB in the example above you get 255 or 0xFF.

To send larger number such as 0x1234 the LSB is sent first and the MSB second.

0xFF 0x55 0x34 0xCB 0x12 0xED

Remember even if you have a value that only has a LSB you must send a zero value MSB and its inverse.

As long as you adhere to the packet format the CM-5 will recognize your incoming data and decode it to the value you sent. When the CM-5 sends data it is in this packet format so your receiving program will need to decode it if you wish to close the control loop.

Hope that helps

Pev
Scotty

Remember the Bioloid uses a packet based protocol so you need to support that: An extract from the site may help :

The wireless interface utilises a packet based serial protocol. This packet format is a variation on the Dynamixel packet protocol used by Robotis to control the AX-12s and AX-S1. If you wish to communicate with the CM-5 via the wireless socket on the processor you'll need to send data in he correct packet protocol. The packet format is as follows:

Packet Format :
0xFF 0x55 LSB ~LSB MSB ~MSB

Where ~LSB is the inverse or compliment of LSB and ~MSB is the inverse or compliment of MSB.
(thus ~ = Logical NOT)

To put that another way if you add up LSB and ~LSB you should end up with 255 decimal or 0xFF (hex)

Lets take an example that sends the value 65. If you want to send 65 via the Zig100 protocol you need to send:

255 85 65 190 0 255

Or

0xFF 0x55 0x41 0xBE 0x00 0xFF

If you add the LSB and ~LSB in the example above you get 255 or 0xFF.

To send larger number such as 0x1234 the LSB is sent first and the MSB second.

0xFF 0x55 0x34 0xCB 0x12 0xED

Remember even if you have a value that only has a LSB you must send a zero value MSB and its inverse.

As long as you adhere to the packet format the CM-5 will recognize your incoming data and decode it to the value you sent. When the CM-5 sends data it is in this packet format so your receiving program will need to decode it if you wish to close the control loop.

Hope that helps

Pev
Carl
-------------------------
www.alt-view.co.uk
Pev
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 547
Joined: Sun Feb 26, 2006 1:00 am
Location: UK

Post by Chris.H » Sat Sep 22, 2007 7:14 pm

Post by Chris.H
Sat Sep 22, 2007 7:14 pm

:D Hi I can confirm that is right:
0xFF 0x55 0x01 0xFE 0x00 0xFF = 0x01 or 1
0xFF 0X55 0x00 0xFF 0x00 0xFF = 0x00 or 0
This works from a Cm5 to a PC or PC to Cm5.
I'm new to this. Has anyone a circuit of the CM5? I notice the circuit of the Zig100r PC board has been up issued so that R11(0ohm link) selects power from the D connector Pin9 or R10(0 ohm link) via J10. These were previously resistors on the serial lines.
chris.harris@Freenet.co.uk
Dublin
:D Hi I can confirm that is right:
0xFF 0x55 0x01 0xFE 0x00 0xFF = 0x01 or 1
0xFF 0X55 0x00 0xFF 0x00 0xFF = 0x00 or 0
This works from a Cm5 to a PC or PC to Cm5.
I'm new to this. Has anyone a circuit of the CM5? I notice the circuit of the Zig100r PC board has been up issued so that R11(0ohm link) selects power from the D connector Pin9 or R10(0 ohm link) via J10. These were previously resistors on the serial lines.
chris.harris@Freenet.co.uk
Dublin
Chris.H
Newbie
Newbie
User avatar
Posts: 6
Joined: Sat Sep 22, 2007 6:48 pm
Location: Dublin, Ireland


8 postsPage 1 of 1
8 postsPage 1 of 1