Commanding changes in Velocity on Servo Controller 1061

Any hardware type questions or problems for all other Phidget devices.
mrbencowell
Phidgetly
Posts: 32
Joined: Sun Jun 05, 2011 5:15 am
Contact:

Commanding changes in Velocity on Servo Controller 1061

Postby mrbencowell » Tue Jul 12, 2011 4:58 am

I'm building a plotter at the moment using Phidget servo controller 1061 along with Hitec 422 servos. I'm seeing some strange results when I command lots of changes in velocity .. when the pen is up I run the servos at full speed, however when the pen is down I'm using velocity to try and get diagonal lines by controlling the x&y velocity proportionally.

I notice that I get very erratic results when switching from a full speed pen up move to a slowed down pen down move, which leads me to believe that the velocity isn't being set correctly. Even if I put some sizable pauses in my code this still seems to be the case.

I'm setting the velocity using :

PhidgetMotorCtrl.servos[0].Position = XTarget;
PhidgetMotorCtrl.servos[0].VelocityLimit = XPower;
PhidgetMotorCtrl.servos[1].Position = YTarget;
PhidgetMotorCtrl.servos[1].VelocityLimit = YPower;

I then put a small pause in to ensure the servo's velocity has been set :

PlotFunctions.Pause(500);

And then I engage the servos :

PhidgetMotorCtrl.servos[0].Engaged = true;
PhidgetMotorCtrl.servos[1].Engaged = true;

Is this the correct way to set the speed of the servos ?.

Also I worry that as I'm engaging the X axis a millisecond before the Y axis I'm always going to get small inaccuracies .. does anyone know a way to trigger the servos at the exact same moments ?.

Thanks in advance.
ben

Return to “All Other Phidgets”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest