Page 1 of 1

1061_1 - PhidgetAdvancedServo 8-Motor Problem

Posted: Fri Nov 25, 2016 12:13 pm
by gregory511
Pin N°6 no connect servo motor
Sans titre.png
Engaged servo motor N°6
ezgif.com-video-to-gif.gif
PositionChange Index N°6 <> 0° ?
PositionCurrent Index N°6 <> 0,0000 ?

:?

Code: Select all

Servo motor N°6 no connect Pin Phidget 1061_1

PhidgetAdvancedServo1.Open(-1);
PhidgetAdvancedServo1.WaitForAttachment(2000);
PhidgetAdvancedServo1.SpeedRampingOn[6] := True;
PhidgetAdvancedServo1.VelocityLimit[6] := 1;
PhidgetAdvancedServo1.SetServoParameters(6, 440, 2540, 180, 300);

AdvancedX(6, 32, PhidgetAdvancedServo1);
AdvancedX(6, 90, PhidgetAdvancedServo1);
AdvancedX(6, 180,PhidgetAdvancedServo1);
AdvancedX(6, 0,PhidgetAdvancedServo1);

procedure AdvancedX(Servo: Integer; Angle: Integer; AdvServo: TPhidgetAdvancedServo);
begin
  AdvServo.Position[Servo] := Angle;

  if not AdvServo.Engaged[Servo] then AdvServo.Engaged[Servo] := True;

// As long as the position and different "Angle" then loop
  while AdvServo.Position[Servo] <> Angle do
    begin
       // waits
       Application.ProcessMessages; 
    end;
end;
How to control an unconnected servo ? :?:

thank you very much :D

Re: 1061_1 - PhidgetAdvancedServo 8-Motor Problem

Posted: Sat Nov 26, 2016 8:00 am
by gregory511
Pin N°6 no connect servo motor

No power supply connected :(
PositionCurrent Index N°6 <> 0,0000 ?
2016-11-26-14h56_42.gif
thank you

Re: 1061_1 - PhidgetAdvancedServo 8-Motor Problem

Posted: Mon Nov 28, 2016 8:33 am
by mparadis
So you're saying that there's no servo connected to port 6, but you're confused as to why the program says that the servo position is increasing when there is no servo attached? The answer is that the servo controller is just keeping track of the current pulse width (position) that it's telling the motor to go to. The controller doesn't know that there isn't a servo connected to listen to its commands.