![]() |
These calls are specific to the Phidget Advanced Servo object. See your device's User Guide for more specific API details, technical information, and revision details. The User Guide, along with other resources, can be found on the product page for your device.
#define ADVSERVO_MAXSERVOS 8 |
Gets the number of motors supported by this controller
phid | An attached phidget advanced servo handle. |
count | The motor count. Gets the last set acceleration for a motor. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
acceleration | The acceleration Sets the acceleration for a motor. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
acceleration | The acceleration Gets the maximum acceleration supported by a motor |
phid | An attached phidget advanced servo handle |
index | The motor index. |
max | The maximum acceleration. Gets the minimum acceleration supported by a motor. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
min | The minimum acceleration Gets the last set velocity limit for a motor. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
limit | The velocity limit. Sets the velocity limit for a motor. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
limit | The velocity limit. Gets the current velocity of a motor. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
velocity | The current velocity. Gets the maximum velocity that can be set for a motor. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
max | The maximum velocity Gets the minimum velocity that can be set for a motor. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
min | The minimum velocity. Sets a velocity change event handler. This is called when the velocity changes. |
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. Gets the current position of a motor. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
position | The position. Sets the position of a motor. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
position | The position. Gets the maximum position that a motor can go to. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
max | The maximum position. Sets the maximum position that a motor can go to. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
max | The Maximum position. Gets the minimum position that a motor can go to. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
min | The minimum position Sets the minimum position that a motor can go to. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
min | The minimum position Sets a position change event handler. This is called when the position changes. |
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. Gets the current current draw for a motor. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
current | The current. Sets a current change event handler. This is called when the current draw changes. |
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. Gets the speed ramping state for a motor. This is whether or not velocity and acceleration are used. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
rampingState | The speed ramping state. Possible values are PTRUE and PFALSE. Sets the speed ramping state for a motor. This is whether or not velocity and acceleration are used. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
rampingState | The speed ramping state. Possible values are PTRUE and PFALSE. Gets the engaged state of a motor. This is whether the motor is powered or not. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
engagedState | The engaged state. Possible values are PTRUE and PFALSE. Sets the engaged state of a motor. This is whether the motor is powered or not. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
engagedState | The engaged state. Possible values are PTRUE and PFALSE. Gets the stopped state of a motor. This is true when the motor is not moving and there are no outstanding commands. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
stoppedState | The stopped state. Possible values are PTRUE and PFALSE. Gets the servo type of a motor. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
servoType | The servo type. Sets the servo type of a motor. |
phid | An attached phidget advanced servo handle |
index | The motor index. |
servoType | The servo type. Sets the servo parameters of a motor. |
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. |
Definition at line 253 of file cphidgetadvancedservo.h.
#define ADVSERVO_MINMAX_PACKET 0x10 |
Definition at line 256 of file cphidgetadvancedservo.h.
#define ADVSERVO_NORMAL_PACKET 0x00 |
Definition at line 255 of file cphidgetadvancedservo.h.
#define ADVSERVO_PGOOD_FLAG 0x01 |
Definition at line 263 of file cphidgetadvancedservo.h.
#define MOTOR_DISABLED_ADVSERVO 0x40 |
Definition at line 260 of file cphidgetadvancedservo.h.
#define MOTOR_DONE_ADVSERVO 0x20 |
Definition at line 259 of file cphidgetadvancedservo.h.
#define NO_RAMPING_FLAG_ADVSERVO 0x80 |
Definition at line 261 of file cphidgetadvancedservo.h.
typedef struct CPhidgetServoParameters * CPhidgetServoParametersHandle |
enum CPhidget_ServoType |
The Phidget Servo Type sets the relationship of degrees to PCM width
Definition at line 18 of file cphidgetadvancedservo.h.
int getServoParameterIndex | ( | CPhidget_ServoType | type | ) |
Definition at line 513 of file cphidgetadvancedservo.c.
PHIDGET21_API double CCONV servo_degrees_to_us | ( | CPhidgetServoParameters | params, |
double | degrees | ||
) |
Definition at line 530 of file cphidgetadvancedservo.c.
PHIDGET21_API double CCONV servo_degrees_to_us_vel | ( | CPhidgetServoParameters | params, |
double | degrees | ||
) |
Definition at line 540 of file cphidgetadvancedservo.c.
PHIDGET21_API double CCONV servo_us_to_degrees | ( | CPhidgetServoParameters | params, |
double | us, | ||
unsigned char | round | ||
) |
Definition at line 524 of file cphidgetadvancedservo.c.
PHIDGET21_API double CCONV servo_us_to_degrees_vel | ( | CPhidgetServoParameters | params, |
double | us, | ||
unsigned char | round | ||
) |
Definition at line 534 of file cphidgetadvancedservo.c.
PHIDGET21_API int CCONV setupNewAdvancedServoParams | ( | CPhidgetAdvancedServoHandle | phid, |
int | Index, | ||
CPhidgetServoParameters | newVal | ||
) |
Definition at line 484 of file cphidgetadvancedservo.c.