Help Servo Board Control

Started by rdavidlthomas October 22, 2006
I am using the Bx Servo Torque Board. My problem is in Commanding the
Servos to move. I am using Microsoft Visual Basic Express My Code is
as fallows:
If (Robot.IsOpen) Then
Robot.Write(">" & "1" & "1" & "a" & Chr(Pan.Value))
ConStat.Text = "Pan: " & Pan.Value

Robot.Write(">" & "1" & "1" & "g")
Position.Text = " Servo 1: " & Robot.ReadExisting()

Else
ConStat.Text = "Error! Press Conenect!"
Pan.Value = 127
End If

The Code works Great for Values 0 - 127, after 127 it moves the servo
randomly in the lower 0 - 127 range. The Servo never moves past 127.
Using the demo program the servos move fine from 0 - 255. Can Anyone
point out what i a doing wrong? The Examples use debug.print, i don't
know how to use this, what are its bonuses, how do i get debug.print
to write to the com? I need help.
Hi, it seems like you are getting a valid outcome for a 7 bit number
as you are getting a proper pan rance from 0-127. What angle of
ranges is covered from panvalues of 0-127? Is it about 100 degrees?
(half the total range of a typical RC servo). What is the angle that
the servo points to when you use a pan valye of 255? How about 0, and
127? Are you sure te osition is "random" at values above 127, or does
the servo swing to the other side?

My guess is that your 8th bit is used for negative numbers. What I
mean is that maybe in your program your 8 bit pan value ranges from
-127 to 127 instead of 0 to 255. Try using use a range of -127 to
127. Does that work to give you a full continuous range of about 200
degrees?

Best of luck,

Sami Kanderian.

--- In b..., "rdavidlthomas"
wrote:
>
> I am using the Bx Servo Torque Board. My problem is in Commanding
the
> Servos to move. I am using Microsoft Visual Basic Express My Code
is
> as fallows:
> If (Robot.IsOpen) Then
> Robot.Write(">" & "1" & "1" & "a" & Chr(Pan.Value))
> ConStat.Text = "Pan: " & Pan.Value
>
> Robot.Write(">" & "1" & "1" & "g")
> Position.Text = " Servo 1: " & Robot.ReadExisting()
>
> Else
> ConStat.Text = "Error! Press Conenect!"
> Pan.Value = 127
> End If
>
> The Code works Great for Values 0 - 127, after 127 it moves the
servo
> randomly in the lower 0 - 127 range. The Servo never moves past
127.
> Using the demo program the servos move fine from 0 - 255. Can
Anyone
> point out what i a doing wrong? The Examples use debug.print, i
don't
> know how to use this, what are its bonuses, how do i get debug.print
> to write to the com? I need help.
>