wck position

Korean company maker of Robot kits and servos designed for of articulated robots. Re-incarnation of Megarobotics.
7 postsPage 1 of 1
7 postsPage 1 of 1

wck position

Post by chickenkai » Thu Dec 06, 2012 2:59 am

Post by chickenkai
Thu Dec 06, 2012 2:59 am

Hi,

I use C# to control my robobuilder, and I use RobobuilderLib.dll

Now I want to know my wck position

I've tried wckpos(), but it just showed 0 or 1

So which function should I use?

thank!
Hi,

I use C# to control my robobuilder, and I use RobobuilderLib.dll

Now I want to know my wck position

I've tried wckpos(), but it just showed 0 or 1

So which function should I use?

thank!
chickenkai offline
Savvy Roboteer
Savvy Roboteer
Posts: 30
Joined: Thu Jul 26, 2012 10:09 am

Post by l3v3rz » Thu Dec 06, 2012 7:48 pm

Post by l3v3rz
Thu Dec 06, 2012 7:48 pm

Hi,

The wckReadPos() command return 0 or 1 indicating whether the read was successful (or not). If its true or 1 then the return values are available in the array respnse[]. So if the servo doesn't exist or isn't connected the read fails if it succeeds it returns two bytes representing the position and load/torque. Generally the 1st value is 0 unless load is very high (which is shame) and 2nd is the position of servo

So to read the position of servo 5 your should look like this:

Code: Select all
            PCremote  p = new PCremote("COM1");
            wckMotion w = new wckMotion(p);

            if (w.wckReadPos(5))
            {
                Console.WriteLine("Servo pos 5 = {0}", w.respnse[1]);
            }
            else
            {
                Console.WriteLine("Servo 5 NOT CONNECTED");
            }


Hope that helps

Edit: oops that should read respnse[1], the load is returned is respnse[0].
Hi,

The wckReadPos() command return 0 or 1 indicating whether the read was successful (or not). If its true or 1 then the return values are available in the array respnse[]. So if the servo doesn't exist or isn't connected the read fails if it succeeds it returns two bytes representing the position and load/torque. Generally the 1st value is 0 unless load is very high (which is shame) and 2nd is the position of servo

So to read the position of servo 5 your should look like this:

Code: Select all
            PCremote  p = new PCremote("COM1");
            wckMotion w = new wckMotion(p);

            if (w.wckReadPos(5))
            {
                Console.WriteLine("Servo pos 5 = {0}", w.respnse[1]);
            }
            else
            {
                Console.WriteLine("Servo 5 NOT CONNECTED");
            }


Hope that helps

Edit: oops that should read respnse[1], the load is returned is respnse[0].
Last edited by l3v3rz on Mon Dec 10, 2012 4:09 pm, edited 2 times in total.
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by chickenkai » Fri Dec 07, 2012 3:38 am

Post by chickenkai
Fri Dec 07, 2012 3:38 am

OK

Now I understand how to use.

Thanks!
OK

Now I understand how to use.

Thanks!
chickenkai offline
Savvy Roboteer
Savvy Roboteer
Posts: 30
Joined: Thu Jul 26, 2012 10:09 am

Post by l3v3rz » Mon Dec 10, 2012 4:07 pm

Post by l3v3rz
Mon Dec 10, 2012 4:07 pm

Sorry !! I've just noticed an error with previous post - see correction above and now added to wiki as well

http://code.google.com/p/robobuildervc/wiki/wckMotion

If theres any thing else that needs some explanation please shout.
Sorry !! I've just noticed an error with previous post - see correction above and now added to wiki as well

http://code.google.com/p/robobuildervc/wiki/wckMotion

If theres any thing else that needs some explanation please shout.
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by chickenkai » Tue May 21, 2013 12:45 pm

Post by chickenkai
Tue May 21, 2013 12:45 pm

Hi,

I have a question.

What does the respnse[0] represent?

thanks!
Hi,

I have a question.

What does the respnse[0] represent?

thanks!
chickenkai offline
Savvy Roboteer
Savvy Roboteer
Posts: 30
Joined: Thu Jul 26, 2012 10:09 am

Post by l3v3rz » Tue May 21, 2013 1:06 pm

Post by l3v3rz
Tue May 21, 2013 1:06 pm

from the wck Read spec the first byte is the servo load, this is normally zero as its quite insensitive. So it more an overload/current value if you try and move to a angle but the servo is stopped/blocked you should see load go up. Unfortunately not sensitive enough to do feedback in normal operation like on a gripper for instance.
from the wck Read spec the first byte is the servo load, this is normally zero as its quite insensitive. So it more an overload/current value if you try and move to a angle but the servo is stopped/blocked you should see load go up. Unfortunately not sensitive enough to do feedback in normal operation like on a gripper for instance.
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by chickenkai » Tue May 21, 2013 1:24 pm

Post by chickenkai
Tue May 21, 2013 1:24 pm

thanks!

Now I understand!
thanks!

Now I understand!
chickenkai offline
Savvy Roboteer
Savvy Roboteer
Posts: 30
Joined: Thu Jul 26, 2012 10:09 am


7 postsPage 1 of 1
7 postsPage 1 of 1