Servo Reversing
Robert from China  [6 posts]
14 year
Hi there,

I just hooked up an SSC 32 servo controller board. seems to be working well.

I do however seem to have the servos operating in the wrong direction.

I tried to find some sort of reversing control in the Lynx motion control module,
But there is none to be found.

How do you go about making the servos work in reverse fashion?


Anonymous 14 year
You can just reverse the numbers that you send to them.

For example

left_servo = 3000 - left_servo

would do the trick since the SSC uses 500 to 2500 range. You can perform this inversion in either the VBScript, Phython, etc, module using

SetVariable "left_servo", 3000 - GetVariable("left_servo")

or use the Set_Variable module and enter




into the two fields.

Hopefully that does it!

Robert from China  [6 posts] 14 year
Ok Here is my layout for x Servo position (which is the backwards one)

' get the current center of movement
  x = GetVariable("COG_X")

' scale the image space into the servo space
  x = CInt(((x/width)*2000))+500

' set the variable for use in the servo controller
  SetVariable "servo_positionx", x

This does move the servo on the x axis quite well, but like I said it's backwards.

I did try the two examples out but, was not able to get it to work...

This is done in vb-script.

Anonymous 14 year
Ok, try replacing

x = GetVariable("COG_X")


x = GetVariable("IMAGE_WIDTH") - GetVariable("COG_X")

Robert from China  [6 posts] 14 year
Ok I tried that out,

It seems to work perfect now.  Thanks for your help.

Now I'm going to spend some time figuring out just why that makes it inverse


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index