A problem about the object "servo32v7_RampDemo"
Hello everybody, I'm encountered a problem about the object "servo32v7_RampDemo".
(http://obex.parallax.com/objects/51/)
In the servo32v7_RampDemo,when I wanted the servo turn to the specified position,
I discovered that seems must add the Set command before the SetRamp command.
If I only used the SetRamp command without the Set command, that will appeared some errors.
Like this program :
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
ServoCh1 = 0 'Select DEMO servo
OBJ
SERVO : "Servo32v7.spin"
PUB Servo32_DEMO | temp
SERVO.Start
SERVO.Ramp
SERVO.SetRamp(ServoCh1,2300,200) ' set the servo turn to most right side
Here is the wave of the SetRamp(ServoCh1,2300,200) command.
Above the video, the servo didn't turn to the most right side position directly, it turned to left in the
beginning, then turned to the specified position (most right side).
So I think that must add the set command in the first.
Like this program :
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
ServoCh1 = 0 'Select DEMO servo
OBJ
SERVO : "Servo32v7.spin"
PUB Servo32_DEMO | temp
SERVO.Start
SERVO.Ramp
SERVO.Set(ServoCh1,1500) ' set the initial servo position in the first
waitcnt(clkfreq*2 + cnt)
SERVO.SetRamp(ServoCh1,2300,200) ' set the servo turn to most right side
waitcnt(clkfreq*2 + cnt)
SERVO.SetRamp(ServoCh1,700,200) ' set the servo turn to most left side
waitcnt(clkfreq*2 + cnt)
SERVO.SetRamp(ServoCh1,2300,200) ' set the servo turn to most right side
Above the video, when I added the set command in the first, then the servo will turn to the
specified position successfully and without any troubles.
My question is how to solve the phenomena which only used the SetRamp command and without Set command
Is there are anybody can give me any suggestion?
(http://obex.parallax.com/objects/51/)
In the servo32v7_RampDemo,when I wanted the servo turn to the specified position,
I discovered that seems must add the Set command before the SetRamp command.
If I only used the SetRamp command without the Set command, that will appeared some errors.
Like this program :
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
ServoCh1 = 0 'Select DEMO servo
OBJ
SERVO : "Servo32v7.spin"
PUB Servo32_DEMO | temp
SERVO.Start
SERVO.Ramp
SERVO.SetRamp(ServoCh1,2300,200) ' set the servo turn to most right side
Here is the wave of the SetRamp(ServoCh1,2300,200) command.
Above the video, the servo didn't turn to the most right side position directly, it turned to left in the
beginning, then turned to the specified position (most right side).
So I think that must add the set command in the first.
Like this program :
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
ServoCh1 = 0 'Select DEMO servo
OBJ
SERVO : "Servo32v7.spin"
PUB Servo32_DEMO | temp
SERVO.Start
SERVO.Ramp
SERVO.Set(ServoCh1,1500) ' set the initial servo position in the first
waitcnt(clkfreq*2 + cnt)
SERVO.SetRamp(ServoCh1,2300,200) ' set the servo turn to most right side
waitcnt(clkfreq*2 + cnt)
SERVO.SetRamp(ServoCh1,700,200) ' set the servo turn to most left side
waitcnt(clkfreq*2 + cnt)
SERVO.SetRamp(ServoCh1,2300,200) ' set the servo turn to most right side
Above the video, when I added the set command in the first, then the servo will turn to the
specified position successfully and without any troubles.
My question is how to solve the phenomena which only used the SetRamp command and without Set command
Is there are anybody can give me any suggestion?
Comments
That means when I want to use the object "servo32v7" , I always must add the Set command beyond each the SetRamp ?
or only add the Set command once in the first ?
I am grateful for your assistance, Beau Schwabe.