PhidgetStepper

PhidgetStepper

A class for controlling a PhidgetStepper.  See your product manual for more specific API details, supported functionality, units, etc.

Summary
PhidgetStepperA class for controlling a PhidgetStepper.
EventsEvents supported by PhidgetStepper.
Properties
InputCountGets the number of digital inputs available on this controller.
MotorCountGets the number of motors supported by this controller.
Functions
getAccelerationMinGets the minimum settable acceleration for a motor.
getAccelerationMaxGets the maximum settable acceleration for a motor
getPositionMinGets the minimum position that a motor can travel to.
getPositionMaxGets the maximum position that a motor can travel to.
getVelocityMinGets the minimum velocity that a motor can be set to.
getVelocityMaxGets the maximum velocity that a motor can be set to or return.
getCurrentMinGets the minimum settable current limit for a motor.
getCurrentMaxGets the maximum settable current limit for a motor.
getInputStateGets the state of a digital input.
getAccelerationGets the last set acceleration for a motor.
getVelocityGets the current velocity for a motor.
getVelocityLimitGets the last set velocity limit for a motor.
getCurrentLimitGets the last set current limit for a motor.
getCurrentGets the current current draw for a motor.
getCurrentPositionGets the current position of a motor.
getTargetPositionGets the last set target position.
getEngagedGets the engaged state of a motor.
getStoppedGets the stopped state of a motor.
setAccelerationSets the acceleration for a motor.
setVelocityLimitSets the upper velocity limit for a motor.
setCurrentPositionSets the current position of a motor.
setTargetPositionSets a new target position for a motor.
setCurrentLimitSets the upper current limit for a motor.
setEngagedSets the engaged state of a motor.

Events

Events supported by PhidgetStepper.  Pass these constants to the addEventListener() function when adding event listeners to a Phidget object.

PhidgetDataEvent.INPUT_CHANGEdigital input change
PhidgetDataEvent.VELOCITY_CHANGEvelocity change
PhidgetDataEvent.POSITION_CHANGEposition change
PhidgetDataEvent.CURRENT_CHANGEcurrent change

Properties

InputCount

public function get InputCount():int

Gets the number of digital inputs available on this controller.

Returns

The number of digital inputs.

MotorCount

public function get MotorCount():int

Gets the number of motors supported by this controller.

Functions

getAccelerationMin

public function getAccelerationMin(index: int):Number

Gets the minimum settable acceleration for a motor.

Parameters

indexmotor index

getAccelerationMax

public function getAccelerationMax(index: int):Number

Gets the maximum settable acceleration for a motor

Parameters

indexmotor index

getPositionMin

public function getPositionMin(index: int):Number

Gets the minimum position that a motor can travel to.

Parameters

indexmotor index

getPositionMax

public function getPositionMax(index: int):Number

Gets the maximum position that a motor can travel to.

Parameters

indexmotor index

getVelocityMin

public function getVelocityMin(index: int):Number

Gets the minimum velocity that a motor can be set to.  Note that the minimum velocity that a motor can return is -(velocityMax)

Parameters

indexmotor index

getVelocityMax

public function getVelocityMax(index: int):Number

Gets the maximum velocity that a motor can be set to or return.

Parameters

indexmotor index

getCurrentMin

public function getCurrentMin(index: int):Number

Gets the minimum settable current limit for a motor.  Note that current limit is not supported on all stepper controllers.

Parameters

indexmotor index

getCurrentMax

public function getCurrentMax(index: int):Number

Gets the maximum settable current limit for a motor.  Note that current limit is not supported on all stepper controllers.

Parameters

indexmotor index

getInputState

public function getInputState(index: int):Boolean

Gets the state of a digital input.  Note that not all stepper controllers have digital inputs.

Parameters

indexinput index

getAcceleration

public function getAcceleration(index: int):Number

Gets the last set acceleration for a motor.

Parameters

indexmotor index

getVelocity

public function getVelocity(index: int):Number

Gets the current velocity for a motor.

Parameters

indexmotor index

getVelocityLimit

public function getVelocityLimit(index: int):Number

Gets the last set velocity limit for a motor.

Parameters

indexmotor index

getCurrentLimit

public function getCurrentLimit(index: int):Number

Gets the last set current limit for a motor.  Note that current limit is not supported by all stepper controllers.

Parameters

indexmotor index

getCurrent

public function getCurrent(index: int):Number

Gets the current current draw for a motor.  Note that current sense is not supported by all stepper controllers.

Parameters

indexmotor index

getCurrentPosition

public function getCurrentPosition(index: int):Number

Gets the current position of a motor.

Parameters

indexmotor index

getTargetPosition

public function getTargetPosition(index: int):Number

Gets the last set target position.

Parameters

indexmotor index

getEngaged

public function getEngaged(index: int):Boolean

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

Parameters

indexmotor index

getStopped

public function getStopped(index: int):Boolean

Gets the stopped state of a motor.  If this is true, it indicates that the motor is not moving, and there are no outstanding commands.

Parameters

indexmotor index

setAcceleration

public function setAcceleration(index: int,
val: Number):void

Sets the acceleration for a motor.  The motor will accelerate and decelerate at this rate.

Parameters

indexmotor index
valacceleration

setVelocityLimit

public function setVelocityLimit(index: int,
val: Number):void

Sets the upper velocity limit for a motor.

Parameters

indexmotor index
valvelocity

setCurrentPosition

public function setCurrentPosition(index: int,
val: Number):void

Sets the current position of a motor.  This will not move the motor and should not be called if a motor is moving.

Parameters

indexmotor index
valcurrent motor position

setTargetPosition

public function setTargetPosition(index: int,
val: Number):void

Sets a new target position for a motor.  The motor will immediately start moving towards this position.

Parameters

indexmotor index
valtarget motor position

setCurrentLimit

public function setCurrentLimit(index: int,
val: Number):void

Sets the upper current limit for a motor.  Note that not all stepper controllers support current limit.

Parameters

indexmotor index
valcurrent limit

setEngaged

public function setEngaged(index: int,
val: Boolean):void

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

Parameters

indexmotor index
valengaged state
Base Phidget class from which all specific device classes inherit.
public function get InputCount():int
Gets the number of digital inputs available on this controller.
public function get MotorCount():int
Gets the number of motors supported by this controller.
public function getAccelerationMin(index: int):Number
Gets the minimum settable acceleration for a motor.
public function getAccelerationMax(index: int):Number
Gets the maximum settable acceleration for a motor
public function getPositionMin(index: int):Number
Gets the minimum position that a motor can travel to.
public function getPositionMax(index: int):Number
Gets the maximum position that a motor can travel to.
public function getVelocityMin(index: int):Number
Gets the minimum velocity that a motor can be set to.
public function getVelocityMax(index: int):Number
Gets the maximum velocity that a motor can be set to or return.
public function getCurrentMin(index: int):Number
Gets the minimum settable current limit for a motor.
public function getCurrentMax(index: int):Number
Gets the maximum settable current limit for a motor.
public function getInputState(index: int):Boolean
Gets the state of a digital input.
public function getAcceleration(index: int):Number
Gets the last set acceleration for a motor.
public function getVelocity(index: int):Number
Gets the current velocity for a motor.
public function getVelocityLimit(index: int):Number
Gets the last set velocity limit for a motor.
public function getCurrentLimit(index: int):Number
Gets the last set current limit for a motor.
public function getCurrent(index: int):Number
Gets the current current draw for a motor.
public function getCurrentPosition(index: int):Number
Gets the current position of a motor.
public function getTargetPosition(index: int):Number
Gets the last set target position.
public function getEngaged(index: int):Boolean
Gets the engaged state of a motor.
public function getStopped(index: int):Boolean
Gets the stopped state of a motor.
public function setAcceleration(index: int,
val: Number):void
Sets the acceleration for a motor.
public function setVelocityLimit(index: int,
val: Number):void
Sets the upper velocity limit for a motor.
public function setCurrentPosition(index: int,
val: Number):void
Sets the current position of a motor.
public function setTargetPosition(index: int,
val: Number):void
Sets a new target position for a motor.
public function setCurrentLimit(index: int,
val: Number):void
Sets the upper current limit for a motor.
public function setEngaged(index: int,
val: Boolean):void
Sets the engaged state of a motor.
Close