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

Order of Response-Packages

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

Order of Response-Packages

Post by sirhoop » Mon Jun 02, 2008 9:29 am

Post by sirhoop
Mon Jun 02, 2008 9:29 am

Hello,

I have a short question. I send ax12-commands from my pc via the serial-port to the cm5 which forwards them to the ax12 by toss-mode.
Can anyone tell me if the order of status messages for ax12-commands is deterministic? In other words when I send

"cmd1, cmd2, cmd3", I will get "rsp1, rsp2, rsp3" and not "rsp2, rsp1, rsp3"?


best regards,
Alex
Hello,

I have a short question. I send ax12-commands from my pc via the serial-port to the cm5 which forwards them to the ax12 by toss-mode.
Can anyone tell me if the order of status messages for ax12-commands is deterministic? In other words when I send

"cmd1, cmd2, cmd3", I will get "rsp1, rsp2, rsp3" and not "rsp2, rsp1, rsp3"?


best regards,
Alex
sirhoop
Robot Builder
Robot Builder
Posts: 13
Joined: Wed Apr 16, 2008 4:14 pm

Re: Order of Response-Packages

Post by StuartL » Mon Jun 02, 2008 11:19 am

Post by StuartL
Mon Jun 02, 2008 11:19 am

sirhoop wrote:I have a short question. I send ax12-commands from my pc via the serial-port to the cm5 which forwards them to the ax12 by toss-mode.
Can anyone tell me if the order of status messages for ax12-commands is deterministic? In other words when I send

"cmd1, cmd2, cmd3", I will get "rsp1, rsp2, rsp3" and not "rsp2, rsp1, rsp3"?


As it's a shared bus you need to be careful about waiting for the responses before sending the next command. Although there is the 500us delay (by default, see the response delay register in the AX12 PDF) before the servo responds.

Therefore you need to do:

"cmd1, wait rsp1, cmd2, wait rsp2" etc.

All of the responses, however, do have the servo ID in them, so if you're sending to different servos and have calibrated that return delay correctly you could send many commands and then get all of the responses in one go. However I'd be anxious about doing something so time critical in toss mode, I'd only give it a go if programming the CM-5 directly.
sirhoop wrote:I have a short question. I send ax12-commands from my pc via the serial-port to the cm5 which forwards them to the ax12 by toss-mode.
Can anyone tell me if the order of status messages for ax12-commands is deterministic? In other words when I send

"cmd1, cmd2, cmd3", I will get "rsp1, rsp2, rsp3" and not "rsp2, rsp1, rsp3"?


As it's a shared bus you need to be careful about waiting for the responses before sending the next command. Although there is the 500us delay (by default, see the response delay register in the AX12 PDF) before the servo responds.

Therefore you need to do:

"cmd1, wait rsp1, cmd2, wait rsp2" etc.

All of the responses, however, do have the servo ID in them, so if you're sending to different servos and have calibrated that return delay correctly you could send many commands and then get all of the responses in one go. However I'd be anxious about doing something so time critical in toss mode, I'd only give it a go if programming the CM-5 directly.
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by sirhoop » Tue Jun 03, 2008 10:26 am

Post by sirhoop
Tue Jun 03, 2008 10:26 am

Thanks, perhaps I will give it a try. What I want to do is sending in one thread and receving in another. But since the status package does not contain any information about the command it belongs to (except the ID) I want to save that information in a CommandQueue.
Everytime I receive something I'll put it in a ResponseQueue. And then I would identify the information in the response queue with the command queue.

So if the CommandQueue.get() says GetPresentposition-Request then I know that the 4th and 5th bit of ResponseQueue.get() contain PositionLow and PositionHigh. With the Help of the ID I can then Update the state of my robot.

Right now, I'm pretty busy with other thing but I will let you know when I built something that works.
Thanks, perhaps I will give it a try. What I want to do is sending in one thread and receving in another. But since the status package does not contain any information about the command it belongs to (except the ID) I want to save that information in a CommandQueue.
Everytime I receive something I'll put it in a ResponseQueue. And then I would identify the information in the response queue with the command queue.

So if the CommandQueue.get() says GetPresentposition-Request then I know that the 4th and 5th bit of ResponseQueue.get() contain PositionLow and PositionHigh. With the Help of the ID I can then Update the state of my robot.

Right now, I'm pretty busy with other thing but I will let you know when I built something that works.
sirhoop
Robot Builder
Robot Builder
Posts: 13
Joined: Wed Apr 16, 2008 4:14 pm

Post by jorge ochoa » Wed Jun 04, 2008 2:37 am

Post by jorge ochoa
Wed Jun 04, 2008 2:37 am

what is Toss mode?
what is Toss mode?
jorge ochoa
Robot Builder
Robot Builder
Posts: 14
Joined: Mon Jan 14, 2008 4:50 am

Post by Bullit » Wed Jun 04, 2008 4:52 am

Post by Bullit
Wed Jun 04, 2008 4:52 am

The CM-5 with the bioloid firmware can be put into "toss" mode where the bioloid firmware simply passes all serial input directly to the dynamixel bus. This is convenient for sending dynamixel packets from your PC to the dynamixels.
The CM-5 with the bioloid firmware can be put into "toss" mode where the bioloid firmware simply passes all serial input directly to the dynamixel bus. This is convenient for sending dynamixel packets from your PC to the dynamixels.
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by Rob » Wed Jun 04, 2008 5:05 pm

Post by Rob
Wed Jun 04, 2008 5:05 pm

Note you should look at using different methods for actuators and sensors see http://robosavvy.com/forum/viewtopic.ph ... hlight=rob
Note you should look at using different methods for actuators and sensors see http://robosavvy.com/forum/viewtopic.ph ... hlight=rob
Rob
Savvy Roboteer
Savvy Roboteer
Posts: 51
Joined: Sun Nov 25, 2007 2:05 pm

Post by jorge ochoa » Thu Jun 05, 2008 1:19 am

Post by jorge ochoa
Thu Jun 05, 2008 1:19 am

how can i access toss mode?
how can i access toss mode?
jorge ochoa
Robot Builder
Robot Builder
Posts: 14
Joined: Mon Jan 14, 2008 4:50 am

Post by StuartL » Thu Jun 05, 2008 8:38 am

Post by StuartL
Thu Jun 05, 2008 8:38 am

jorge ochoa wrote:how can i access toss mode?


I think you just press 't' in the firmware prompt...

Anyone else confirm?
jorge ochoa wrote:how can i access toss mode?


I think you just press 't' in the firmware prompt...

Anyone else confirm?
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by siempre.aprendiendo » Thu Jun 05, 2008 6:54 pm

Post by siempre.aprendiendo
Thu Jun 05, 2008 6:54 pm

Yes, first you should start the manage mode and then press 't'
Yes, first you should start the manage mode and then press 't'
siempre.aprendiendo
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 559
Joined: Wed Aug 08, 2007 9:13 pm
Location: Barcelona


9 postsPage 1 of 1
9 postsPage 1 of 1