Robosavvy pushing new features onto Robobuilder Kits

Korean company maker of Robot kits and servos designed for of articulated robots. Re-incarnation of Megarobotics.
57 postsPage 3 of 41, 2, 3, 4
57 postsPage 3 of 41, 2, 3, 4

Post by l3v3rz » Fri Mar 12, 2010 3:03 pm

Post by l3v3rz
Fri Mar 12, 2010 3:03 pm

I can't see a problem with this - I assume you read the 2 byte response after sending the command ?

Can you post the actual code for the main function.
I can't see a problem with this - I assume you read the 2 byte response after sending the command ?

Can you post the actual code for the main function.
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by mniki » Fri Mar 12, 2010 4:42 pm

Post by mniki
Fri Mar 12, 2010 4:42 pm

i didn't read any byte, i only test read serial number function to sure that my send_cmd() function has no error blinking for reading serial! i change the firmware to 2.29 and test and test again, but it has the same problem. here is the whole main function
while (1)
{
// Place your code here
if (PINB.4 ==0)
{

rls_mode();
delay_ms(200);
}

if (PINB.1 ==0)
{


//send_cmd(0x14,0x07);

send_cmd(0x0c,0x01);
delay_ms(200);
//send_cmd(0x12,0x01);

}

if (PINB.2 ==0)
{

send_cmd(0x14,0x07);
delay_ms(200);


}

if (PINB.3 ==0)
{

//send_cmd(0x14,0x07);

//send_cmd(0x0c,0x01);
send_cmd(0x12,0x01);
delay_ms(200);

}


};


I use Pinb.4 for release and three other for commands, only motion command gets error and error LED blink .

Help plz!!!!
i didn't read any byte, i only test read serial number function to sure that my send_cmd() function has no error blinking for reading serial! i change the firmware to 2.29 and test and test again, but it has the same problem. here is the whole main function
while (1)
{
// Place your code here
if (PINB.4 ==0)
{

rls_mode();
delay_ms(200);
}

if (PINB.1 ==0)
{


//send_cmd(0x14,0x07);

send_cmd(0x0c,0x01);
delay_ms(200);
//send_cmd(0x12,0x01);

}

if (PINB.2 ==0)
{

send_cmd(0x14,0x07);
delay_ms(200);


}

if (PINB.3 ==0)
{

//send_cmd(0x14,0x07);

//send_cmd(0x0c,0x01);
send_cmd(0x12,0x01);
delay_ms(200);

}


};


I use Pinb.4 for release and three other for commands, only motion command gets error and error LED blink .

Help plz!!!!
mniki offline
Robot Builder
Robot Builder
Posts: 12
Joined: Thu Mar 11, 2010 11:13 am

Post by mniki » Fri Mar 12, 2010 4:56 pm

Post by mniki
Fri Mar 12, 2010 4:56 pm

can you or any other one work with 5710, give me his email address or any id like skype, yahoo, google for chat ?
Thankssss
can you or any other one work with 5710, give me his email address or any id like skype, yahoo, google for chat ?
Thankssss
mniki offline
Robot Builder
Robot Builder
Posts: 12
Joined: Thu Mar 11, 2010 11:13 am

Post by l3v3rz » Fri Mar 12, 2010 5:53 pm

Post by l3v3rz
Fri Mar 12, 2010 5:53 pm

I think you may need to read the response bytes from the cmd. before sending the next command It sends a packet of at least 16 bytes back. (the 8 byte header + 8 byte response inc checksum). It doesn't send the response until after the motion has run according to the docs - so that could be 1-2 secs. Alternatively try putting in a much longer delay between the end of the motion command and the next command to take account.

cheers
I think you may need to read the response bytes from the cmd. before sending the next command It sends a packet of at least 16 bytes back. (the 8 byte header + 8 byte response inc checksum). It doesn't send the response until after the motion has run according to the docs - so that could be 1-2 secs. Alternatively try putting in a much longer delay between the end of the motion command and the next command to take account.

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

Post by mniki » Fri Mar 12, 2010 7:06 pm

Post by mniki
Fri Mar 12, 2010 7:06 pm

reading the data should not effect on RBC operation, i put enough delay and used buffer and interrupt for sending data, reponse is only for my system, but it get error only for motion command. i get crazy, i should prepare it until tomorrow !
reading the data should not effect on RBC operation, i put enough delay and used buffer and interrupt for sending data, reponse is only for my system, but it get error only for motion command. i get crazy, i should prepare it until tomorrow !
mniki offline
Robot Builder
Robot Builder
Posts: 12
Joined: Thu Mar 11, 2010 11:13 am

Post by l3v3rz » Fri Mar 12, 2010 8:20 pm

Post by l3v3rz
Fri Mar 12, 2010 8:20 pm

In the code segment
Code: Select all
if (PINB.2==0)
{
   send_cmd(0x14,0x07)  ; run - basic pose
   delay(200)                  ; 200ms   delay ---> make this 5000
}


it looks as if it will immediately try and send the run motion command again since the pin I presume is still low. Try increase the delay to a big number i.e. 5000 ms and see if that works.

cheers
In the code segment
Code: Select all
if (PINB.2==0)
{
   send_cmd(0x14,0x07)  ; run - basic pose
   delay(200)                  ; 200ms   delay ---> make this 5000
}


it looks as if it will immediately try and send the run motion command again since the pin I presume is still low. Try increase the delay to a big number i.e. 5000 ms and see if that works.

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

Post by mniki » Fri Mar 12, 2010 8:32 pm

Post by mniki
Fri Mar 12, 2010 8:32 pm

no it is not the problem, i try it with 10000 ms delay, but it doesn't work again:

Code: Select all

while (1)
      {
        if (PINB.1 == 0){
            delay_ms(1000);
            rls_mode();
        }
        if (PINB.2 == 0){
            delay_ms(300);
            send_cmd(0x12,0x01);
        }
        if (PINB.1 == 0){
            delay_ms(300);
            send_cmd(0x0c,0x01);
        }
        if (PINB.4 == 0){
            send_cmd(0x14,0x07);
            delay_ms(10000);
           
           
        }

i use pinb.1 to go it to indirect access and then use pinb.4 for motion but it doesn't work and get the same error and LED error start to blink, but when i write program with C# it works.
i try to send my command both after and before it's internal MAX232 ic, i test both and get the same error ![/code]
no it is not the problem, i try it with 10000 ms delay, but it doesn't work again:

Code: Select all

while (1)
      {
        if (PINB.1 == 0){
            delay_ms(1000);
            rls_mode();
        }
        if (PINB.2 == 0){
            delay_ms(300);
            send_cmd(0x12,0x01);
        }
        if (PINB.1 == 0){
            delay_ms(300);
            send_cmd(0x0c,0x01);
        }
        if (PINB.4 == 0){
            send_cmd(0x14,0x07);
            delay_ms(10000);
           
           
        }

i use pinb.1 to go it to indirect access and then use pinb.4 for motion but it doesn't work and get the same error and LED error start to blink, but when i write program with C# it works.
i try to send my command both after and before it's internal MAX232 ic, i test both and get the same error ![/code]
mniki offline
Robot Builder
Robot Builder
Posts: 12
Joined: Thu Mar 11, 2010 11:13 am

Post by mniki » Fri Mar 12, 2010 8:39 pm

Post by mniki
Fri Mar 12, 2010 8:39 pm

i write this program in C#:
Code: Select all
private void button1_Click(object sender, EventArgs e)
        {
            SerialPort s = new SerialPort("COM1", 115200, Parity.None, 8, StopBits.One);
            s.Open();
            byte []rls_data = new byte []{ 0xFF, 0xE0, 0xFB, 0x01, 0x00, 0x1A };
            byte []header = new byte[] { 0xFF, 0xFF, 0xAA, 0x55, 0xAA, 0x55, 0x37, 0xBA };
            s.Write(rls_data, 0, 6);
            s.Write(header, 0, 8);
            s.Write(new byte[] { 20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x07 }, 0, 8);
            s.Close();
        }

it gets the same error as my micro program!!!!!!! and error LED blink.
help me on this program please.
i write this program in C#:
Code: Select all
private void button1_Click(object sender, EventArgs e)
        {
            SerialPort s = new SerialPort("COM1", 115200, Parity.None, 8, StopBits.One);
            s.Open();
            byte []rls_data = new byte []{ 0xFF, 0xE0, 0xFB, 0x01, 0x00, 0x1A };
            byte []header = new byte[] { 0xFF, 0xFF, 0xAA, 0x55, 0xAA, 0x55, 0x37, 0xBA };
            s.Write(rls_data, 0, 6);
            s.Write(header, 0, 8);
            s.Write(new byte[] { 20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x07 }, 0, 8);
            s.Close();
        }

it gets the same error as my micro program!!!!!!! and error LED blink.
help me on this program please.
mniki offline
Robot Builder
Robot Builder
Posts: 12
Joined: Thu Mar 11, 2010 11:13 am

Post by l3v3rz » Fri Mar 12, 2010 8:48 pm

Post by l3v3rz
Fri Mar 12, 2010 8:48 pm

try removing the s.write(rls_data,0,6);

that for taking you out of direct mode (when you have blue and amber lights on) - the power on default is remote mode which support the run motion. Direct mode if for individual controlling servos.
try removing the s.write(rls_data,0,6);

that for taking you out of direct mode (when you have blue and amber lights on) - the power on default is remote mode which support the run motion. Direct mode if for individual controlling servos.
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by mniki » Fri Mar 12, 2010 8:53 pm

Post by mniki
Fri Mar 12, 2010 8:53 pm

Thanks for your reply l3v3rz.
i remove that line and try again and see the same error again.
Code: Select all
            SerialPort s = new SerialPort("COM1", 115200, Parity.None, 8, StopBits.One);
            s.Open();
           // byte []rls_data = new byte []{ 0xFF, 0xE0, 0xFB, 0x1, 0x00, 0x1A };
            byte []header = new byte[] { 0xFF, 0xFF, 0xAA, 0x55, 0xAA, 0x55, 0x37, 0xBA };
            //s.Write(rls_data, 0, 6);
            s.Write(header, 0, 8);
            s.Write(new byte[] { 0x14, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x07 }, 0, 8);
            s.Close();

i try this and get the same error (error LED blink).
i get crazy realy! when i use runMotion method of RobobuilderLib.dll library, it works, but my new code get error !
Thanks for your reply l3v3rz.
i remove that line and try again and see the same error again.
Code: Select all
            SerialPort s = new SerialPort("COM1", 115200, Parity.None, 8, StopBits.One);
            s.Open();
           // byte []rls_data = new byte []{ 0xFF, 0xE0, 0xFB, 0x1, 0x00, 0x1A };
            byte []header = new byte[] { 0xFF, 0xFF, 0xAA, 0x55, 0xAA, 0x55, 0x37, 0xBA };
            //s.Write(rls_data, 0, 6);
            s.Write(header, 0, 8);
            s.Write(new byte[] { 0x14, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x07 }, 0, 8);
            s.Close();

i try this and get the same error (error LED blink).
i get crazy realy! when i use runMotion method of RobobuilderLib.dll library, it works, but my new code get error !
mniki offline
Robot Builder
Robot Builder
Posts: 12
Joined: Thu Mar 11, 2010 11:13 am

Post by mniki » Fri Mar 12, 2010 9:03 pm

Post by mniki
Fri Mar 12, 2010 9:03 pm

i try runsound command or others command like this code and it works, only for runmotion it has problem.
this is for runsound and it works.
Code: Select all
SerialPort s = new SerialPort("COM1", 115200, Parity.None, 8, StopBits.One);
            s.Open();
            // byte []rls_data = new byte []{ 0xFF, 0xE0, 0xFB, 0x01, 0x00, 0x1A };
            byte[] header = new byte[] { 0xFF, 0xFF, 0xAA, 0x55, 0xAA, 0x55, 0x37, 0xBA };
            //s.Write(rls_data, 0, 6);
            s.Write(header, 0, 8);
            s.Write(new byte[] { [b]0x15[/b], 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x07 }, 0, 8);
            s.Close();

if i change 0x15 to 0x14 for motion it gets error! error LED blink!
i try runsound command or others command like this code and it works, only for runmotion it has problem.
this is for runsound and it works.
Code: Select all
SerialPort s = new SerialPort("COM1", 115200, Parity.None, 8, StopBits.One);
            s.Open();
            // byte []rls_data = new byte []{ 0xFF, 0xE0, 0xFB, 0x01, 0x00, 0x1A };
            byte[] header = new byte[] { 0xFF, 0xFF, 0xAA, 0x55, 0xAA, 0x55, 0x37, 0xBA };
            //s.Write(rls_data, 0, 6);
            s.Write(header, 0, 8);
            s.Write(new byte[] { [b]0x15[/b], 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x07 }, 0, 8);
            s.Close();

if i change 0x15 to 0x14 for motion it gets error! error LED blink!
mniki offline
Robot Builder
Robot Builder
Posts: 12
Joined: Thu Mar 11, 2010 11:13 am

Post by l3v3rz » Fri Mar 12, 2010 9:12 pm

Post by l3v3rz
Fri Mar 12, 2010 9:12 pm

Ive just built and run that code for mine and it works fine. So I can only suggest you
1. check serial and power are connected. (Ive forgotten to do that in the past!)
2. check you have the correct port
3. check no other application has grabbed COM1 (make sure no old apps running in background using task manager - thats caught me out)
4. reboot the robot and make sure you have a green and blue light on the back
5. run the code

For me the above works fine and it takes up basic pose.

Incidentally I tried with and without rls - it made no difference - works fine in both cases.
Ive just built and run that code for mine and it works fine. So I can only suggest you
1. check serial and power are connected. (Ive forgotten to do that in the past!)
2. check you have the correct port
3. check no other application has grabbed COM1 (make sure no old apps running in background using task manager - thats caught me out)
4. reboot the robot and make sure you have a green and blue light on the back
5. run the code

For me the above works fine and it takes up basic pose.

Incidentally I tried with and without rls - it made no difference - works fine in both cases.
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by mniki » Fri Mar 12, 2010 9:18 pm

Post by mniki
Fri Mar 12, 2010 9:18 pm

i checked all of it before, i check them again now, but it didn't work :(((( i use firmware 2.29 ,5710K (s03). i get crazy really.
i checked all of it before, i check them again now, but it didn't work :(((( i use firmware 2.29 ,5710K (s03). i get crazy really.
mniki offline
Robot Builder
Robot Builder
Posts: 12
Joined: Thu Mar 11, 2010 11:13 am

Post by l3v3rz » Sat Mar 13, 2010 12:55 am

Post by l3v3rz
Sat Mar 13, 2010 12:55 am

Very confusing !

Does it take up basic pose if you use the IR remote ? Do you have standard configuration - set to basic huno mode ? Is it possible that theres a servo wire disconnected? Sounds like a problem with run motion itself rather than the comms. But then again why would wit it work with my DLL? Nope - really confused! :?:
Very confusing !

Does it take up basic pose if you use the IR remote ? Do you have standard configuration - set to basic huno mode ? Is it possible that theres a servo wire disconnected? Sounds like a problem with run motion itself rather than the comms. But then again why would wit it work with my DLL? Nope - really confused! :?:
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by mniki » Sat Mar 13, 2010 9:40 am

Post by mniki
Sat Mar 13, 2010 9:40 am

Thank you very much for your replies l3v3rz.
Itis very very confusing, i leave working on it now, because todays is new year holidays in our country. I think i start working on it again after the holidays. I wanna to control the stability of the robot without the acceleration sensors! by a new method! and i hope i can do it.
Thank you very much for your replies l3v3rz.
Itis very very confusing, i leave working on it now, because todays is new year holidays in our country. I think i start working on it again after the holidays. I wanna to control the stability of the robot without the acceleration sensors! by a new method! and i hope i can do it.
mniki offline
Robot Builder
Robot Builder
Posts: 12
Joined: Thu Mar 11, 2010 11:13 am

PreviousNext
PreviousNext
57 postsPage 3 of 41, 2, 3, 4
57 postsPage 3 of 41, 2, 3, 4
cron