
10
1063_0_Product_Manual - October 27, 2010 2:54 PM
Documentation
Programming Manual
The
Phidget Programming Manual
documents the Phidgets software programming model in a language and device
unspecific way, providing a general overview of the Phidgets API as a whole. You can find the manual at
www.
phidgets.com
>> Programming.
Getting Started Guides
We have written Getting Started Guides for most of the languages that we support. If the manual exists for the
language you want to use, this is the first manual you want to read. The Guides can be found at
www.phidgets.com
>>
Programming,
and are listed under the appropriate language.
API Guides
We maintain API references for COM (Windows), C (Windows/Mac OSX/Linux), Action Script, .Net and Java. These
references document the API calls that are common to all Phidgets. These API References can be found under
www.
phidgets.com
>>
Programming
and are listed under the appropriate language. To look at the API calls for a specific
Phidget, check its Product Manual.
Code Samples
We have written sample programs to illustrate how the APIs are used.
Due to the large number of languages and devices we support, we cannot provide examples in every language for
every Phidget. Some of the examples are very minimal, and other examples will have a full-featured GUI allowing
all the functionality of the device to be explored. Most developers start by modifying existing examples until they
have an understanding of the architecture.
Go to
www.phidgets.com
>> Programming
to see if there are code samples written for your device. Find the
language you want to use and click on the magnifying glass besides “Code Sample”. You will get a list of all the
devices for which we wrote code samples in that language.
API for the PhidgetStepper Bipolar 1-Motor
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. For exact values, refer to the device specifications.
Functions
int MotorCount() [get]
Returns the number of motors this PhidgetStepper can control. In the case of the 1063, this will always return 1.
This call does not return the number of motors actually connected.
double Acceleration(int MotorIndex) [get,set]
Acceleration is the maximum change in velocity the PhidgetStepper uses when speeding up or slowing down the
motor. This is specified in the same units used for Position - in the case of the 1063, 1/16th steps.
If your motor is heavily loaded, or not supplied with a high enough voltage, there will be a practical limit on how
•
fast it can accelerate. If the acceleration is set too high, the motor may not be able to respond quickly enough
and end up missing steps.
The range of acceptable Acceleration is bounded by the software properties AccelerationMax and
•
AccelerationMin.
Acceleration should be set explicitly before beginning to use the PhidgetStepper, and will read as unknown until
•
set by the application.
VelocityLimit and Acceleration are set on the device in one discrete operation - if Acceleration is not set when
•
VelocityLimit is set, it will default to (AccelerationMax / 2).