Phidget Advanced Servo
[Specific Phidgets]


Typedefs

typedef struct
_CPhidgetAdvancedServo * 
CPhidgetAdvancedServoHandle

Enumerations

enum  CPhidget_ServoType {
  PHIDGET_SERVO_DEFAULT = 1, PHIDGET_SERVO_RAW_us_MODE, PHIDGET_SERVO_HITEC_HS322HD, PHIDGET_SERVO_HITEC_HS5245MG,
  PHIDGET_SERVO_HITEC_805BB, PHIDGET_SERVO_HITEC_HS422, PHIDGET_SERVO_TOWERPRO_MG90, PHIDGET_SERVO_HITEC_HSR1425CR,
  PHIDGET_SERVO_HITEC_HS785HB, PHIDGET_SERVO_HITEC_HS485HB, PHIDGET_SERVO_HITEC_HS645MG, PHIDGET_SERVO_HITEC_815BB,
  PHIDGET_SERVO_FIRGELLI_L12_30_50_06_R, PHIDGET_SERVO_FIRGELLI_L12_50_100_06_R, PHIDGET_SERVO_FIRGELLI_L12_50_210_06_R, PHIDGET_SERVO_FIRGELLI_L12_100_50_06_R,
  PHIDGET_SERVO_FIRGELLI_L12_100_100_06_R, PHIDGET_SERVO_SPRINGRC_SM_S2313M, PHIDGET_SERVO_SPRINGRC_SM_S3317M, PHIDGET_SERVO_SPRINGRC_SM_S3317SR,
  PHIDGET_SERVO_SPRINGRC_SM_S4303R, PHIDGET_SERVO_SPRINGRC_SM_S4315M, PHIDGET_SERVO_SPRINGRC_SM_S4315R, PHIDGET_SERVO_SPRINGRC_SM_S4505B,
  PHIDGET_SERVO_USER_DEFINED
}

Functions

int CPhidgetAdvancedServo_create (CPhidgetAdvancedServoHandle *phid)
int CPhidgetAdvancedServo_getMotorCount (CPhidgetAdvancedServoHandle phid, int *count)
int CPhidgetAdvancedServo_getAcceleration (CPhidgetAdvancedServoHandle phid, int index, double *acceleration)
int CPhidgetAdvancedServo_setAcceleration (CPhidgetAdvancedServoHandle phid, int index, double acceleration)
int CPhidgetAdvancedServo_getAccelerationMax (CPhidgetAdvancedServoHandle phid, int index, double *max)
int CPhidgetAdvancedServo_getAccelerationMin (CPhidgetAdvancedServoHandle phid, int index, double *min)
int CPhidgetAdvancedServo_getVelocityLimit (CPhidgetAdvancedServoHandle phid, int index, double *limit)
int CPhidgetAdvancedServo_setVelocityLimit (CPhidgetAdvancedServoHandle phid, int index, double limit)
int CPhidgetAdvancedServo_getVelocity (CPhidgetAdvancedServoHandle phid, int index, double *velocity)
int CPhidgetAdvancedServo_getVelocityMax (CPhidgetAdvancedServoHandle phid, int index, double *max)
int CPhidgetAdvancedServo_getVelocityMin (CPhidgetAdvancedServoHandle phid, int index, double *min)
int CPhidgetAdvancedServo_set_OnVelocityChange_Handler (CPhidgetAdvancedServoHandle phid, int(*fptr)(CPhidgetAdvancedServoHandle phid, void *userPtr, int index, double velocity), void *userPtr)
int CPhidgetAdvancedServo_getPosition (CPhidgetAdvancedServoHandle phid, int index, double *position)
int CPhidgetAdvancedServo_setPosition (CPhidgetAdvancedServoHandle phid, int index, double position)
int CPhidgetAdvancedServo_getPositionMax (CPhidgetAdvancedServoHandle phid, int index, double *max)
int CPhidgetAdvancedServo_setPositionMax (CPhidgetAdvancedServoHandle phid, int index, double max)
int CPhidgetAdvancedServo_getPositionMin (CPhidgetAdvancedServoHandle phid, int index, double *min)
int CPhidgetAdvancedServo_setPositionMin (CPhidgetAdvancedServoHandle phid, int index, double min)
int CPhidgetAdvancedServo_set_OnPositionChange_Handler (CPhidgetAdvancedServoHandle phid, int(*fptr)(CPhidgetAdvancedServoHandle phid, void *userPtr, int index, double position), void *userPtr)
int CPhidgetAdvancedServo_getCurrent (CPhidgetAdvancedServoHandle phid, int index, double *current)
int CPhidgetAdvancedServo_set_OnCurrentChange_Handler (CPhidgetAdvancedServoHandle phid, int(*fptr)(CPhidgetAdvancedServoHandle phid, void *userPtr, int index, double current), void *userPtr)
int CPhidgetAdvancedServo_getSpeedRampingOn (CPhidgetAdvancedServoHandle phid, int index, int *rampingState)
int CPhidgetAdvancedServo_setSpeedRampingOn (CPhidgetAdvancedServoHandle phid, int index, int rampingState)
int CPhidgetAdvancedServo_getEngaged (CPhidgetAdvancedServoHandle phid, int index, int *engagedState)
int CPhidgetAdvancedServo_setEngaged (CPhidgetAdvancedServoHandle phid, int index, int engagedState)
int CPhidgetAdvancedServo_getStopped (CPhidgetAdvancedServoHandle phid, int index, int *stoppedState)
int CPhidgetAdvancedServo_getServoType (CPhidgetAdvancedServoHandle phid, int index, CPhidget_ServoType *servoType)
int CPhidgetAdvancedServo_setServoType (CPhidgetAdvancedServoHandle phid, int index, CPhidget_ServoType servoType)
int CPhidgetAdvancedServo_setServoParameters (CPhidgetAdvancedServoHandle phid, int index, double min_us, double max_us, double degrees, double velocity_max)

Detailed Description

Calls specific to the Phidget Advanced Servo. See the product manual for more specific API details, supported functionality, units, etc.

Typedef Documentation

typedef struct _CPhidgetAdvancedServo* CPhidgetAdvancedServoHandle

A Phidget AdvancedServo handle


Enumeration Type Documentation

The Phidget Servo Type sets the relationship of degrees to PCM width

Enumerator:
PHIDGET_SERVO_DEFAULT  Default - This is what the servo API been historically used, originally based on the Futaba FP-S148
PHIDGET_SERVO_RAW_us_MODE  Raw us mode - all position, velocity, acceleration functions are specified in microseconds rather then degrees
PHIDGET_SERVO_HITEC_HS322HD  HiTec HS-322HD Standard Servo
PHIDGET_SERVO_HITEC_HS5245MG  HiTec HS-5245MG Digital Mini Servo
PHIDGET_SERVO_HITEC_805BB  HiTec HS-805BB Mega Quarter Scale Servo
PHIDGET_SERVO_HITEC_HS422  HiTec HS-422 Standard Servo
PHIDGET_SERVO_TOWERPRO_MG90  Tower Pro MG90 Micro Servo
PHIDGET_SERVO_HITEC_HSR1425CR  HiTec HSR-1425CR Continuous Rotation Servo
PHIDGET_SERVO_HITEC_HS785HB  HiTec HS-785HB Sail Winch Servo
PHIDGET_SERVO_HITEC_HS485HB  HiTec HS-485HB Deluxe Servo
PHIDGET_SERVO_HITEC_HS645MG  HiTec HS-645MG Ultra Torque Servo
PHIDGET_SERVO_HITEC_815BB  HiTec HS-815BB Mega Sail Servo
PHIDGET_SERVO_FIRGELLI_L12_30_50_06_R  Firgelli L12 Linear Actuator 30mm 50:1
PHIDGET_SERVO_FIRGELLI_L12_50_100_06_R  Firgelli L12 Linear Actuator 50mm 100:1
PHIDGET_SERVO_FIRGELLI_L12_50_210_06_R  Firgelli L12 Linear Actuator 50mm 210:1
PHIDGET_SERVO_FIRGELLI_L12_100_50_06_R  Firgelli L12 Linear Actuator 100mm 50:1
PHIDGET_SERVO_FIRGELLI_L12_100_100_06_R  Firgelli L12 Linear Actuator 100mm 100:1
PHIDGET_SERVO_SPRINGRC_SM_S2313M  SpringRC SM-S2313M Micro Servo
PHIDGET_SERVO_SPRINGRC_SM_S3317M  SpringRC SM-S3317M Small Servo
PHIDGET_SERVO_SPRINGRC_SM_S3317SR  SpringRC SM-S3317SR Small Continuous Rotation Servo
PHIDGET_SERVO_SPRINGRC_SM_S4303R  SpringRC SM-S4303R Standard Continuous Rotation Servo
PHIDGET_SERVO_SPRINGRC_SM_S4315M  SpringRC SM-S4315M High Torque Servo
PHIDGET_SERVO_SPRINGRC_SM_S4315R  SpringRC SM-S4315R High Torque Continuous Rotation Servo
PHIDGET_SERVO_SPRINGRC_SM_S4505B  SpringRC SM-S4505B Standard Servo


Function Documentation

int CPhidgetAdvancedServo_create ( CPhidgetAdvancedServoHandle phid  ) 

Creates a Phidget AdvancedServo handle.

Parameters:
phid A pointer to an unallocated Phidget AdvancedServo handle.

int CPhidgetAdvancedServo_getMotorCount ( CPhidgetAdvancedServoHandle  phid,
int *  count 
)

Gets the number of motors supported by this controller

Parameters:
phid An attached phidget advanced servo handle.
count The motor count.

int CPhidgetAdvancedServo_getAcceleration ( CPhidgetAdvancedServoHandle  phid,
int  index,
double *  acceleration 
)

Gets the last set acceleration for a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
acceleration The acceleration

int CPhidgetAdvancedServo_setAcceleration ( CPhidgetAdvancedServoHandle  phid,
int  index,
double  acceleration 
)

Sets the acceleration for a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
acceleration The acceleration

int CPhidgetAdvancedServo_getAccelerationMax ( CPhidgetAdvancedServoHandle  phid,
int  index,
double *  max 
)

Gets the maximum acceleration supported by a motor

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
max The maximum acceleration.

int CPhidgetAdvancedServo_getAccelerationMin ( CPhidgetAdvancedServoHandle  phid,
int  index,
double *  min 
)

Gets the minimum acceleration supported by a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
min The minimum acceleration

int CPhidgetAdvancedServo_getVelocityLimit ( CPhidgetAdvancedServoHandle  phid,
int  index,
double *  limit 
)

Gets the last set velocity limit for a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
limit The velocity limit.

int CPhidgetAdvancedServo_setVelocityLimit ( CPhidgetAdvancedServoHandle  phid,
int  index,
double  limit 
)

Sets the velocity limit for a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
limit The velocity limit.

int CPhidgetAdvancedServo_getVelocity ( CPhidgetAdvancedServoHandle  phid,
int  index,
double *  velocity 
)

Gets the current velocity of a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
velocity The current velocity.

int CPhidgetAdvancedServo_getVelocityMax ( CPhidgetAdvancedServoHandle  phid,
int  index,
double *  max 
)

Gets the maximum velocity that can be set for a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
max The maximum velocity

int CPhidgetAdvancedServo_getVelocityMin ( CPhidgetAdvancedServoHandle  phid,
int  index,
double *  min 
)

Gets the minimum velocity that can be set for a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
min The minimum velocity.

int CPhidgetAdvancedServo_set_OnVelocityChange_Handler ( CPhidgetAdvancedServoHandle  phid,
int(*)(CPhidgetAdvancedServoHandle phid, void *userPtr, int index, double velocity)  fptr,
void *  userPtr 
)

Sets a velocity change event handler. This is called when the velocity changes.

Parameters:
phid An attached phidget advanced servo handle
fptr Callback function pointer.
userPtr A pointer for use by the user - this value is passed back into the callback function.

int CPhidgetAdvancedServo_getPosition ( CPhidgetAdvancedServoHandle  phid,
int  index,
double *  position 
)

Gets the current position of a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
position The position.

int CPhidgetAdvancedServo_setPosition ( CPhidgetAdvancedServoHandle  phid,
int  index,
double  position 
)

Sets the position of a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
position The position.

int CPhidgetAdvancedServo_getPositionMax ( CPhidgetAdvancedServoHandle  phid,
int  index,
double *  max 
)

Gets the maximum position that a motor can go to.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
max The maximum position.

int CPhidgetAdvancedServo_setPositionMax ( CPhidgetAdvancedServoHandle  phid,
int  index,
double  max 
)

Sets the maximum position that a motor can go to.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
max The Maximum position.

int CPhidgetAdvancedServo_getPositionMin ( CPhidgetAdvancedServoHandle  phid,
int  index,
double *  min 
)

Gets the minimum position that a motor can go to.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
min The minimum position

int CPhidgetAdvancedServo_setPositionMin ( CPhidgetAdvancedServoHandle  phid,
int  index,
double  min 
)

Sets the minimum position that a motor can go to.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
min The minimum position

int CPhidgetAdvancedServo_set_OnPositionChange_Handler ( CPhidgetAdvancedServoHandle  phid,
int(*)(CPhidgetAdvancedServoHandle phid, void *userPtr, int index, double position)  fptr,
void *  userPtr 
)

Sets a position change event handler. This is called when the position changes.

Parameters:
phid An attached phidget advanced servo handle
fptr Callback function pointer.
userPtr A pointer for use by the user - this value is passed back into the callback function.

int CPhidgetAdvancedServo_getCurrent ( CPhidgetAdvancedServoHandle  phid,
int  index,
double *  current 
)

Gets the current current draw for a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
current The current.

int CPhidgetAdvancedServo_set_OnCurrentChange_Handler ( CPhidgetAdvancedServoHandle  phid,
int(*)(CPhidgetAdvancedServoHandle phid, void *userPtr, int index, double current)  fptr,
void *  userPtr 
)

Sets a current change event handler. This is called when the current draw changes.

Parameters:
phid An attached phidget advanced servo handle
fptr Callback function pointer.
userPtr A pointer for use by the user - this value is passed back into the callback function.

int CPhidgetAdvancedServo_getSpeedRampingOn ( CPhidgetAdvancedServoHandle  phid,
int  index,
int *  rampingState 
)

Gets the speed ramping state for a motor. This is whether or not velocity and acceleration are used.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
rampingState The speed ramping state. Possible values are PTRUE and PFALSE.

int CPhidgetAdvancedServo_setSpeedRampingOn ( CPhidgetAdvancedServoHandle  phid,
int  index,
int  rampingState 
)

Sets the speed ramping state for a motor. This is whether or not velocity and acceleration are used.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
rampingState The speed ramping state. Possible values are PTRUE and PFALSE.

int CPhidgetAdvancedServo_getEngaged ( CPhidgetAdvancedServoHandle  phid,
int  index,
int *  engagedState 
)

Gets the engaged state of a motor. This is whether the motor is powered or not.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
engagedState The engaged state. Possible values are PTRUE and PFALSE.

int CPhidgetAdvancedServo_setEngaged ( CPhidgetAdvancedServoHandle  phid,
int  index,
int  engagedState 
)

Sets the engaged state of a motor. This is whether the motor is powered or not.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
engagedState The engaged state. Possible values are PTRUE and PFALSE.

int CPhidgetAdvancedServo_getStopped ( CPhidgetAdvancedServoHandle  phid,
int  index,
int *  stoppedState 
)

Gets the stopped state of a motor. This is true when the motor is not moving and there are no outstanding commands.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
stoppedState The stopped state. Possible values are PTRUE and PFALSE.

int CPhidgetAdvancedServo_getServoType ( CPhidgetAdvancedServoHandle  phid,
int  index,
CPhidget_ServoType servoType 
)

Gets the servo type of a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
servoType The servo type.

int CPhidgetAdvancedServo_setServoType ( CPhidgetAdvancedServoHandle  phid,
int  index,
CPhidget_ServoType  servoType 
)

Sets the servo type of a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
servoType The servo type.

int CPhidgetAdvancedServo_setServoParameters ( CPhidgetAdvancedServoHandle  phid,
int  index,
double  min_us,
double  max_us,
double  degrees,
double  velocity_max 
)

Sets the servo parameters of a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
min_us The minimum supported PCM in microseconds.
max_us The maximum supported PCM in microseconds.
degrees The degrees of rotation defined by the given PCM range.
velocity_max The maximum velocity in degrees/second.


Generated on Thu May 3 14:03:27 2012 for Phidget21 by  doxygen 1.5.9