RAMP SPEED Servo controller
I am back again but with a new problem. Finally my servos are moving through serial commands thanks to stefan and mike.
I have a robotic arm(self made) in which i have three servos. As soon as the servo board is turned on the robotic arm is reset to default position but it moves to the initial speed at ramp speed of 0(max). I want to slow that down. the documentation has a new default position but that doesn't have a ramp speed as an option. where should i change it in the firmware
I have a robotic arm(self made) in which i have three servos. As soon as the servo board is turned on the robotic arm is reset to default position but it moves to the initial speed at ramp speed of 0(max). I want to slow that down. the documentation has a new default position but that doesn't have a ramp speed as an option. where should i change it in the firmware

Comments
PUB SetServoPosition '' Set a new servo position Ramp := 0#>Ramp<#63 If ((Enabled & |<Channel)>>Channel) == 1 '' Check if servo is enabled Servo.Set(Channel,0) '' Disable Servo if servo flag is disabled else If ServoRamp[noparse][[/noparse]Channel] == 0 Servo.Set(Channel,500#> PW*2 <# 2500) Servo.SetRamp(Channel,500#> PW*2 <# 2500,RampSpeed[noparse][[/noparse]Ramp]) ServoRamp[noparse][[/noparse]Channel] := Ramp ServoPosition[noparse][[/noparse]Channel] := PWI guess
you have to add
Servo.SetRamp(temp,500#> PW*2 <# 2500,RampSpeed[noparse][[/noparse]"your-ramp-value"])in the initilise loop sepction
''Initialize Loop ------------------------------------------------------------------ repeat temp from 0 to 15 '' Initialize ALL servos to center position that are Enabled on Startup If ((Enabled & |<temp)>>temp) == 0 '' Check if servo is enabled on startup PW := 750 '' Set default Servo Width value If LoadDetect == 1 '' Check if pre-defined Servo position has been selected PW_highbyte := EEPROM.RandomRead(ServoCh0+(temp<<1)+0) '' Load pre-defined HIGH BYTE PW_lowbyte := EEPROM.RandomRead(ServoCh0+(temp<<1)+1) '' Load pre-defined LOW BYTE if PW < 250 or PW > 1250 '' Check if pre-defined Servo position is within valid range PW := 750 '' ...If not default to center position 'insert SetRamp-value here Servo.SetRamp(temp,500#> PW*2 <# 2500,RampSpeed[noparse][[/noparse]"your-ramp-value"]) Servo.Set(temp,PW<<1) '' Initialize servo position@Beau Schwabe from Parallax:
it would be very good if you add a pre-set value for the ramp and for servos enabled/disabled
best regards
Stefan
"it would be very good if you add a pre-set value for the ramp and for servos enabled/disabled"
- Why not just set the ramp to the same default "Set" position?
- With using the larger EEPROM, you can set the default servo position and if it's enabled or disabled. The Propeller Servo Controller USB firmware makes use of a feature similar to this. The PSC firmware just provides a wrapper for the Servo32 object
Example:
SERVO.Start SERVO.Ramp 'Set(Pin, Width) SERVO.Set(ServoCh1,1500) 'SetRamp(Pin, Width,Delay)<-- 100 = 1 sec 6000 = 1 min SERVO.SetRamp(ServoCh1,1500,200)▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
s=serial('com3','baud',2400);
s.readasyncmode='continuous';
s.timeout=2;
s.inputbuffersize=25555;
fopen(s);
X=[33,83,67,0,63,0,2,13];
fwrite(s,X,'char');
and I haven't made any change in the firmware
Are you a T1000 Terminator by any chance?