Notice: This page contains information for the legacy Phidget21 Library. Phidget21 is out of support. Bugfixes may be considered on a case by case basis. Phidget21 does not support VINT Phidgets, or new USB Phidgets released after 2020. We maintain a selection of legacy devices for sale that are supported in Phidget21. We recommend that new projects be developed against the Phidget22 Library.
|
1061 User Guide
Getting Started
Checking the Contents
You should have received:
|
In order to test your new Phidget you will also need:
| |
Connecting the Pieces
|
| |
Testing Using Windows 2000 / XP / Vista / 7
Make sure you have the current version of the Phidget library installed on your PC. If you don't, follow these steps:
- Go to the Quick Downloads section on the Windows page
- Download and run the Phidget21 Installer (32-bit, or 64-bit, depending on your system)
- You should see the icon on the right hand corner of the Task Bar.
Running Phidgets Sample Program
Double clicking on the icon loads the Phidget Control Panel; we will use this program to ensure that your new Phidget works properly.
The source code for the AdvancedServo-full sample program can be found in the quick downloads section on the C# Language Page. If you'd like to see examples in other languages, you can visit our Languages page.
Updating Device Firmware
If an entry in this list is red, it means the firmware for that device is out of date. Double click on the entry to be given the option of updating the firmware. If you choose not to update the firmware, you can still run the example for that device after refusing.
Double Click on the icon to activate the Phidget Control Panel and make sure that the Phidget Advanced Servo Controller 8-Motor is properly attached to your PC. |
||
|
Testing Using Mac OS X
- Go to the Quick Downloads section on the Mac OS X page
- Download and run the Phidget OS X Installer
- Click on System Preferences >> Phidgets (under Other) to activate the Preference Pane
- Make sure that the Phidget Advanced Servo Controller 8-Motor is properly attached.
- Double Click on Phidget Advanced Servo Controller 8-Motor in the Phidget Preference Pane to bring up the AdvancedServo-full Sample program. This program will function in a similar way as the Windows version.
Using Linux
For a step-by-step guide on getting Phidgets running on Linux, check the Linux page.
Using Windows Mobile / CE 5.0 / CE 6.0
For a step-by-step guide on getting Phidgets running on Windows CE, check the Windows CE page.
Technical Details
API
We document API Calls specific to this product in this section. Functions common to all Phidgets and functions not applicable to this device are not covered here. This section is deliberately generic. For calling conventions under a specific language, refer to the associated API manual in the Quick Downloads section for that language. For exact values, refer to the device specifications.
Data Structures
enum Phidget_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_HS1425CR,
- PHIDGET_SERVO_HITEC_HS785HB,
- PHIDGET_SERVO_HITEC_HS485HB,
- PHIDGET_SERVO_HITEC_HS645MG,
- PHIDGET_SERVO_HITEC_HS815BB,
- PHIDGET_SERVO_USER_DEFINED
}
Used with the ServoType [get,set] functions. These are servos that have been quantified by Phidget Inc. for your convenience. The Default setting is included for historical reasons, so that the API will be backwards compatible by default. RAW_us_MODE is used for quantifying new servos, or simply when a microsecond based interface makes more sense then a degree based abstraction. USER_DEFINED should never be set directly with ServoType - this is returned when a custom servo type has been defined with setServoParameters.
Functions
int Count() [get]
- Returns the number of servos this PhidgetAdvancedServo can control. In the case of the 1061, this will always return 8. This call does not return the number of servos actually connected.
double Acceleration(int ServoIndex) [get,set]
- Acceleration is the maximum change in velocity the PhidgetAdvancedServo uses when speeding up / slowing down a servo.
- The range of valid Acceleration is bounded by AccelerationMax/AccelerationMin.
- There is a practical limit on how fast your servo can accelerate, based on load and the physical design of the motor.
- This property should always be set by the user as part of initialization. The value does not initialize to the value last set on the device.
double AccelerationMax(int ServoIndex) [get] : Constant
- AccelerationMax is the upper limit to which Acceleration can be set. For the 1061, this will always return 320000.
double AccelerationMin(int ServoIndex) [get] : Constant
- AccelerationMin is the lower limit to which Acceleration can be set. For the 1061, this will always return 19.53125.
double Velocity(int ServoIndex) [get]
- Velocity returns the actual velocity that a particular servo is being driven at. A negative value means it is moving towards a lower position. This call does not return the actual physical velocity of the connected motor.
double VelocityLimit(int ServoIndex) [get, set]
- Gets or sets the maximum absolute velocity that the PhidgetAdvancedServo controller will drive the servo. If it’s changed mid-movement, the controller will accelerate accordingly. If the target position of the controller is near enough, then the VelocityLimit may never be reached.
- This property should always be set by the user as part of initialization.
- There is a practical limit on how fast your servo can rotate, based on the physical design of the motor.
- The range of VelocityLimit is bounded by VelocityMax/VelocityMin
- Note that when VelocityLimit is set to 0, the servo will not move.
double VelocityMax(int ServoIndex) [get] : Constant
- VelocityMax is the absolute upper limit to which Velocity can be set. For the1061, this will always return 6400.
double VelocityMin(int ServoIndex) [get] : Constant
- VelocityMin is the absolute lower limit to which Velocity can be set. For the 1061, this will always return 0.
double Position(int ServoIndex) [get,set]
- Position is used for both the target and actual position for a particular servo. If the servo is currently engaged and a new value is set, then the controller will continuously try to move to this position. Otherwise, this call will return the current position of the servo. This call does not return the actual physical position of the servo.
- The range of Position is bounded by PositionMin/PositionMax
- If the servo is not engaged, then the position cannot be read.
- The position can still be set while the servo is not engaged. Once engaged, the servo will snap to position if it is not there already.
- This property should be set by the user as part of initialization. If not, it will report the last value set on the device (unless the 1061 has been power-cycled).
- Get will return the last value as reported by the device. This means sets to this value will take a small amount of time to propagate.
double PositionMax(int ServoIndex) [get,set]
- PositionMax is the upper limit to which Position can be set, and is initialized to 233. It can be used to prevent the controller from going beyond a servo’s range of motion. A PhidgetException will be thrown if this is set above 233 or below PositionMin.
double PositionMin(int ServoIndex) [get,set]
- PositionMin is the lower limit to which Position can be set, and is initialized to -22.9921875. It can be used to prevent the controller from going beyond a servo’s range of motion. A PhidgetException will be thrown if this is set below -22.9921875 or above PositionMax.
double Current(int ServoIndex) [get]
- Current returns the power consumption in amps for a particular servo. The value returned for a disconnected or idle servo will be slightly above zero due to noise.
bool SpeedRamping(int ServoIndex) [get,set]
- SpeedRamping enables or disables whether the PhidgetAdvancedServo tries to smoothly control the motion of a particular servo. If enabled, then the 1061 will progressively send commands based on velocity, acceleration and position.
- This property should be set by the user as part of initialization. If not, it will report the last value set on the device (unless the 1061 has been power-cycled).
- Get will return the last value as reported by the device. This means sets to this value will take a small amount of time to propagate.
bool Engaged(int ServoIndex) [get,set]
- Enables a particular servo to be positioned. If this property is false, no power is applied to the motors. Note that when it is first enabled, the servo will snap to position, if it is not physically positioned at the same point.Engaged is useful for relaxing a servo once it’s reached a given position. If you are concerned about keeping accurate track of position, Engaged should not be disabled until Stopped = True.
- This property should be set by the user as part of initialization. If not, it will report the last value set on the device (unless the 1061 has been power-cycled).
- Get will return the last value as reported by the device. This means sets to this value will take a small amount of time to propagate.
bool Stopped(int ServoIndex) [get]
- Stopped returns false if the servo is currently in motion. It guarantees that the servo is not moving (unless you are moving it by hand), and that there are no commands in the pipeline to the servo. Note that virtually any API calls will cause Stopped to be temporarily false, even changing Acceleration or VelocityLimit on a stopped servo.
Phidget_ServoType ServoType(int ServoIndex) [get,set]
- Gets / Sets the servo type for an index. There is a list of some common servos that have been predefined by Phidgets Inc. This sets the PCM range (range of motion), the PCM to degrees ratios used internally and the maximum velocity. This allows the degree based functions to be accurate for a specific type of servo.
- Note that servos are generally not very precise, so two servos of the same type may not behave exactly the same. Specific servo motors, as well as servos not in the list, can be independently quantified by the user and set up with the setServoParameters funtion. This is detailed in the technical section.
void setServoParameters(int ServoIndex, double MinUs, double MaxUs, double Degrees, double VelocityMax)
- Sets the parameters for a custom servo motor. MinUs is the minimum PCM in microseconds, MaxUs is the maximum PCM in microseconds, Degrees is the degrees of rotation represented by the given PCM range and VelocityMax is the maximum velocity that the servo can maintain, in degrees/second.
- Quantifying a custom servo motor is detailed in the technical section.
Events
Product History
Date | Board Revision | Device Version | Comment |
---|---|---|---|