Robobuilder Servo Madness & C Programming - Help needed

Korean company maker of Robot kits and servos designed for of articulated robots. Re-incarnation of Megarobotics.
26 postsPage 2 of 21, 2
26 postsPage 2 of 21, 2

Post by l3v3rz » Thu Mar 04, 2010 2:09 pm

Post by l3v3rz
Thu Mar 04, 2010 2:09 pm

You really need to fix the wck programmer anyway - so trying on another PC is a good idea. I wonder if having two servos with the same ID is causing the problem as they would both try an write on the bus at the same time. Have you've tried with all servo disconnected except the one you want to change?

If the RBC in DC mode - you can write a program on your PC - for instance in C - to write that byte sequence to the serial COM port. i.e. you could simply use a printf or putchar to send the bytes, thats all my library does (except its in C#).

Might be useful as well to see whats being sent over the serial port whilst its doing its scan. You could attach a serial port monitor (theres free ones available to download - I use HDD) and see if wck programmer is sending codes.

Did you try the diagnostic program on the CD - RBCdiag.exe - that also test your configuration.

cheers
You really need to fix the wck programmer anyway - so trying on another PC is a good idea. I wonder if having two servos with the same ID is causing the problem as they would both try an write on the bus at the same time. Have you've tried with all servo disconnected except the one you want to change?

If the RBC in DC mode - you can write a program on your PC - for instance in C - to write that byte sequence to the serial COM port. i.e. you could simply use a printf or putchar to send the bytes, thats all my library does (except its in C#).

Might be useful as well to see whats being sent over the serial port whilst its doing its scan. You could attach a serial port monitor (theres free ones available to download - I use HDD) and see if wck programmer is sending codes.

Did you try the diagnostic program on the CD - RBCdiag.exe - that also test your configuration.

cheers
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by AlexanderHWUK » Thu Mar 04, 2010 9:11 pm

Post by AlexanderHWUK
Thu Mar 04, 2010 9:11 pm

Hello everyone again!

Bad news unfortunately, used a different computer, with a different control box, with a random servo, with a fresh install of WCK Programmer. It still does not work!

Even if this looks like madness, it seems that the problem is not in any software/hardware. It has to be the way I am doing it. Either I am pressing the wrong buttons, I am not doing the COM port stuff right, or some stupid mistake I am commiting.

What I am going to do now is NASA's way to solve stuff. If it doesn't work, reboot. So I am going to unistall program's and reset COM ports, and start from the very beginning, like I got the RoboBuilder for the first time, following every step one by one.

If this does not work, then I will try checking what is actually coming out of the COM port, and attempt the several suggested softwares.

Thanks for all the help and support anyway, I may dissapear for a while from the forums, until I fix this damn issue. But when I come back I will have more questions about programming a code to check the PSD of the robot using a COM port through bluetooth.

Thanks again!

IMPORTANT UPDATE - I have quickly tried to use Motion Builder to test something, and now that doesn't work either! When I try to open the correct port it says "ie_Open - Device already open". Quick google research tells me it has something to do with windows locking the COM ports to individual stuff, even if they are not plugged in at the moment. So when I checked my list of COM ports, it says that from 1-24, they are all in use!! This is when I haven't plugged anything in my computer yet! So I think windows has gone a little mad, and plugging lots of usb COM port emulators has confused to a point that it thinks there are no spare COM ports for anything else.

Any idea how to liberate the COM ports?

Freedom to COM ports!

Alex
Hello everyone again!

Bad news unfortunately, used a different computer, with a different control box, with a random servo, with a fresh install of WCK Programmer. It still does not work!

Even if this looks like madness, it seems that the problem is not in any software/hardware. It has to be the way I am doing it. Either I am pressing the wrong buttons, I am not doing the COM port stuff right, or some stupid mistake I am commiting.

What I am going to do now is NASA's way to solve stuff. If it doesn't work, reboot. So I am going to unistall program's and reset COM ports, and start from the very beginning, like I got the RoboBuilder for the first time, following every step one by one.

If this does not work, then I will try checking what is actually coming out of the COM port, and attempt the several suggested softwares.

Thanks for all the help and support anyway, I may dissapear for a while from the forums, until I fix this damn issue. But when I come back I will have more questions about programming a code to check the PSD of the robot using a COM port through bluetooth.

Thanks again!

IMPORTANT UPDATE - I have quickly tried to use Motion Builder to test something, and now that doesn't work either! When I try to open the correct port it says "ie_Open - Device already open". Quick google research tells me it has something to do with windows locking the COM ports to individual stuff, even if they are not plugged in at the moment. So when I checked my list of COM ports, it says that from 1-24, they are all in use!! This is when I haven't plugged anything in my computer yet! So I think windows has gone a little mad, and plugging lots of usb COM port emulators has confused to a point that it thinks there are no spare COM ports for anything else.

Any idea how to liberate the COM ports?

Freedom to COM ports!

Alex
AlexanderHWUK offline
Savvy Roboteer
Savvy Roboteer
Posts: 27
Joined: Tue Mar 02, 2010 4:54 pm

Post by l3v3rz » Thu Mar 04, 2010 10:52 pm

Post by l3v3rz
Thu Mar 04, 2010 10:52 pm

Using the task manager - look for applications running in background and close them! Its an application with an open port that locks it. The motion builder is one of the programs that locks the port - so you can't run two at the same time. Reboot will also work - unless you have application that autostarts and opens the com port. Hyoerterminal / Putty open session can lock the port as well.

cheers
Using the task manager - look for applications running in background and close them! Its an application with an open port that locks it. The motion builder is one of the programs that locks the port - so you can't run two at the same time. Reboot will also work - unless you have application that autostarts and opens the com port. Hyoerterminal / Putty open session can lock the port as well.

cheers
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by AlexanderHWUK » Tue Mar 09, 2010 3:57 pm

Post by AlexanderHWUK
Tue Mar 09, 2010 3:57 pm

Yaaaay! Fixed the problem! Finally!

I'll write down the steps I took before I forget:

- First, to avoid any problem related to COM ports, I used a computer that had one Real COM port (Laptops nowadays don't have them anymore... :( )

- Then, after installing all the software necessary, I connected the Robobuilder to the computer via the Serial Port Cable, and tried using WCK (By setting the direct mode first, only one servo attached, etc.).
This of course did not work, however I remembered something that was posted here in this thread, saying that Motion Builder set the Direct Mode automatically when the Connection was made, so I had an idea.

- I opened MotionBuilder, and turned on the Robobuilder. MotionBuilder has no problem detecting the robobuilder, and sending commands to it, which work. Then, I closed MotionBuilder Without closing the port first, therefore Robobuilder remains in that correct direct mode.

- Opened WCK programmer, and had no problem connecting to the control box! Changed the ID of the servo, and job done! :D

I don't think that anyone will have such a crazy specific error as this, but just in case those are the steps I took :P

Now, for a more difficult part of my project, programming a C code that will check the PSD over a COM port!

I will keep posting on progress. Thanks for all the help, and any advise is greatly appretiated!

Alex
Yaaaay! Fixed the problem! Finally!

I'll write down the steps I took before I forget:

- First, to avoid any problem related to COM ports, I used a computer that had one Real COM port (Laptops nowadays don't have them anymore... :( )

- Then, after installing all the software necessary, I connected the Robobuilder to the computer via the Serial Port Cable, and tried using WCK (By setting the direct mode first, only one servo attached, etc.).
This of course did not work, however I remembered something that was posted here in this thread, saying that Motion Builder set the Direct Mode automatically when the Connection was made, so I had an idea.

- I opened MotionBuilder, and turned on the Robobuilder. MotionBuilder has no problem detecting the robobuilder, and sending commands to it, which work. Then, I closed MotionBuilder Without closing the port first, therefore Robobuilder remains in that correct direct mode.

- Opened WCK programmer, and had no problem connecting to the control box! Changed the ID of the servo, and job done! :D

I don't think that anyone will have such a crazy specific error as this, but just in case those are the steps I took :P

Now, for a more difficult part of my project, programming a C code that will check the PSD over a COM port!

I will keep posting on progress. Thanks for all the help, and any advise is greatly appretiated!

Alex
AlexanderHWUK offline
Savvy Roboteer
Savvy Roboteer
Posts: 27
Joined: Tue Mar 02, 2010 4:54 pm

Post by l3v3rz » Tue Mar 09, 2010 7:51 pm

Post by l3v3rz
Tue Mar 09, 2010 7:51 pm

Great stuff - now the fun stuff can begin.

I've sent you a message with a link you might want to try to see if it make things any easier.

cheers
Great stuff - now the fun stuff can begin.

I've sent you a message with a link you might want to try to see if it make things any easier.

cheers
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by l3v3rz » Sun Mar 21, 2010 3:22 pm

Post by l3v3rz
Sun Mar 21, 2010 3:22 pm

Hi,

I've just had I think exactly the same problem as you. Just bought a new servo - for my gripper - and couldn't access with wckProgrammer (I need to reset the ID) but it connected fine with my PCremote software.

So through a little trial an error I think I have discovered the problem. You must select the com port (even though it shows it correctly on screen) before doing the scan. So the steps are:

1. Set DC mode on robot by holding down PF1 & PF2 at restart.
2. Then start wckprogrammer (I use v1.32 - but 1.01 works fine)
3. Now select the com port (even if all ready selected) then do a check port, (if in use by another prog it complains with a "device in use" message )
4. Then do baud scan - to confirm it connects

If you don't do step 3 it fails even though the com port on the screen is correctly remember from the previous time you used it.

This sounds like a bug to me with their software. Plus wckprogrammer should set DC mode using software. Since if you forget it also just fails.

Be interested if you can confirm you get the same.

cheers
Hi,

I've just had I think exactly the same problem as you. Just bought a new servo - for my gripper - and couldn't access with wckProgrammer (I need to reset the ID) but it connected fine with my PCremote software.

So through a little trial an error I think I have discovered the problem. You must select the com port (even though it shows it correctly on screen) before doing the scan. So the steps are:

1. Set DC mode on robot by holding down PF1 & PF2 at restart.
2. Then start wckprogrammer (I use v1.32 - but 1.01 works fine)
3. Now select the com port (even if all ready selected) then do a check port, (if in use by another prog it complains with a "device in use" message )
4. Then do baud scan - to confirm it connects

If you don't do step 3 it fails even though the com port on the screen is correctly remember from the previous time you used it.

This sounds like a bug to me with their software. Plus wckprogrammer should set DC mode using software. Since if you forget it also just fails.

Be interested if you can confirm you get the same.

cheers
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by AlexanderHWUK » Sun Mar 21, 2010 7:13 pm

Post by AlexanderHWUK
Sun Mar 21, 2010 7:13 pm

Hello there,

Uhm, interesting method, however 3 things.

1. To set the DC mode on my Robobuilder, I hold PF2 at restart (not PF1 and PF2, that makes the blue RUN led flash).
2. Interestingly, even if I ignore your 3rd step, wckprogrammer still detects the robobuilder. Isn't the COM port written in an .ini configuration file on the same folder? Its weird that it forgets it if its written in there from the beginning.
3. Also, cannot really test in the same situation as yours, as I already fixed the Robobuilder from the weird problem it was having :P The way I fixed it was to maintain the DC mode set by the MotionBuilder, so that wckprogrammer would work...

All in all, it definetely looks as there are several bugs in the software :( Sometimes when I run programs like wckprogrammer in similar situations, different things happen :?

In addition, I still cannot upgrade firmware into the robot using the serial-com cable! This is truly annoying, all other programs work (even the motion downloader) but the software keeps giving me the same error "Error encountered while downloading firmware...

Anyways, in case you are interested, I am still merging both of my codes (ANN+Robobuilder).
I want the ANN code to produce some data that the ComPort code can read. Is it simpler to write it into a file so the other code can read from it? Is there a way of doing this using strings? (Do they work between separate pieces of code, one running after the other?)

I will try what you wrote about the PSD in the other thread, and answer you there ;)

Thanks again,

Alex
Hello there,

Uhm, interesting method, however 3 things.

1. To set the DC mode on my Robobuilder, I hold PF2 at restart (not PF1 and PF2, that makes the blue RUN led flash).
2. Interestingly, even if I ignore your 3rd step, wckprogrammer still detects the robobuilder. Isn't the COM port written in an .ini configuration file on the same folder? Its weird that it forgets it if its written in there from the beginning.
3. Also, cannot really test in the same situation as yours, as I already fixed the Robobuilder from the weird problem it was having :P The way I fixed it was to maintain the DC mode set by the MotionBuilder, so that wckprogrammer would work...

All in all, it definetely looks as there are several bugs in the software :( Sometimes when I run programs like wckprogrammer in similar situations, different things happen :?

In addition, I still cannot upgrade firmware into the robot using the serial-com cable! This is truly annoying, all other programs work (even the motion downloader) but the software keeps giving me the same error "Error encountered while downloading firmware...

Anyways, in case you are interested, I am still merging both of my codes (ANN+Robobuilder).
I want the ANN code to produce some data that the ComPort code can read. Is it simpler to write it into a file so the other code can read from it? Is there a way of doing this using strings? (Do they work between separate pieces of code, one running after the other?)

I will try what you wrote about the PSD in the other thread, and answer you there ;)

Thanks again,

Alex
AlexanderHWUK offline
Savvy Roboteer
Savvy Roboteer
Posts: 27
Joined: Tue Mar 02, 2010 4:54 pm

Post by l3v3rz » Sun Mar 21, 2010 8:56 pm

Post by l3v3rz
Sun Mar 21, 2010 8:56 pm

Your right - PF2 at reset for DC mode.
wckProgrammert now doesn't detect again - even following my steps - back to square one! Don't know why its so bad, PCControl works every time - its very strange. The other day when I was trying, it worked every time. Today it didn't, then it did and now isn't again! Fortunately it worked long enough to set up the ID of my new servo so don't need it now.
Your right - PF2 at reset for DC mode.
wckProgrammert now doesn't detect again - even following my steps - back to square one! Don't know why its so bad, PCControl works every time - its very strange. The other day when I was trying, it worked every time. Today it didn't, then it did and now isn't again! Fortunately it worked long enough to set up the ID of my new servo so don't need it now.
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by AlexanderHWUK » Sun Mar 21, 2010 9:11 pm

Post by AlexanderHWUK
Sun Mar 21, 2010 9:11 pm

Awesome, I would have liked you to try the method I used to solve my problem, but you have already solved it :P I'll just have to wait until it happens again to someone.

Quick question, is there any way I can check in C# that a COM port cannot be opened? I mean, Robobuilder is using com port 8, and I want my program to tell me that when I open Com Port 7, there is nothing there, therefore I should try another com port.

Can I for example, send an RBC command, and if I dont get a response in 3 seconds, say there is noone there?

Cheers,

Alex
Awesome, I would have liked you to try the method I used to solve my problem, but you have already solved it :P I'll just have to wait until it happens again to someone.

Quick question, is there any way I can check in C# that a COM port cannot be opened? I mean, Robobuilder is using com port 8, and I want my program to tell me that when I open Com Port 7, there is nothing there, therefore I should try another com port.

Can I for example, send an RBC command, and if I dont get a response in 3 seconds, say there is noone there?

Cheers,

Alex
AlexanderHWUK offline
Savvy Roboteer
Savvy Roboteer
Posts: 27
Joined: Tue Mar 02, 2010 4:54 pm

Post by l3v3rz » Sun Mar 21, 2010 9:17 pm

Post by l3v3rz
Sun Mar 21, 2010 9:17 pm

Yes - you can set a read timeout (and write timeout) on the serial port. Then do a write, followed by a read - all within a try / catch block.

My code actually does this = the message is set to the exception - so if there was no response Message will contact "Timeout" instead the message Response: 16 00 ... etc
Yes - you can set a read timeout (and write timeout) on the serial port. Then do a write, followed by a read - all within a try / catch block.

My code actually does this = the message is set to the exception - so if there was no response Message will contact "Timeout" instead the message Response: 16 00 ... etc
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by dlc » Fri May 17, 2013 6:12 pm

Post by dlc
Fri May 17, 2013 6:12 pm

l3v3rz wrote:Hi,

So through a little trial an error I think I have discovered the problem. You must select the com port (even though it shows it correctly on screen) before doing the scan. So the steps are:

1. Set DC mode on robot by holding down PF1 & PF2 at restart.
2. Then start wckprogrammer (I use v1.32 - but 1.01 works fine)
3. Now select the com port (even if all ready selected) then do a check port, (if in use by another prog it complains with a "device in use" message )
4. Then do baud scan - to confirm it connects


Three years later the same problem exists with the exact same version of the code. Bummer, it means that RoboBuilder is not maintaining their products. In all this time there is still nothing on their site for the 18DOF HUNO either. Or, at least I've not found it yet, which is just as likely.

Regardless, this procedure worked for me with this problem.

Thanks for sharing,
DLC
l3v3rz wrote:Hi,

So through a little trial an error I think I have discovered the problem. You must select the com port (even though it shows it correctly on screen) before doing the scan. So the steps are:

1. Set DC mode on robot by holding down PF1 & PF2 at restart.
2. Then start wckprogrammer (I use v1.32 - but 1.01 works fine)
3. Now select the com port (even if all ready selected) then do a check port, (if in use by another prog it complains with a "device in use" message )
4. Then do baud scan - to confirm it connects


Three years later the same problem exists with the exact same version of the code. Bummer, it means that RoboBuilder is not maintaining their products. In all this time there is still nothing on their site for the 18DOF HUNO either. Or, at least I've not found it yet, which is just as likely.

Regardless, this procedure worked for me with this problem.

Thanks for sharing,
DLC
dlc offline
Robot Builder
Robot Builder
Posts: 22
Joined: Tue Nov 30, 2010 1:47 am

Previous
Previous
26 postsPage 2 of 21, 2
26 postsPage 2 of 21, 2
cron