PhidgetMotorControl |
A class for controlling a PhidgetMotorControl. See your product manual for more specific API details, supported functionality, units, etc.
PhidgetMotorControl | A class for controlling a PhidgetMotorControl. |
Events | Events supported by PhidgetMotorControl. |
Properties | |
InputCount | Gets the number of digital inputs supported by this controller. |
MotorCount | Gets the number of motors supported by this controller. |
EncoderCount | Gets the number of encoders supported by this controller. |
SensorCount | Gets the number of sensors supported by this controller. |
Ratiometric | Gets the ratiometric state for the board. |
SupplyVoltage | Gets the supply voltage for the board. |
Functions | |
getAccelerationMin | Gets the minimum acceleration that a motor can be set to. |
getAccelerationMax | Gets the maximum acceleration that a motor can be set to. |
getInputState | Gets the state of a digital input. |
getAcceleration | Gets the last acceleration that a motor was set at. |
getVelocity | Gets the current velocity of a motor. |
getCurrent | Gets the current current draw of a motor. |
getEncoderPosition | Gets the current current draw of a motor. |
getBackEMFSensingState | Gets the state of BackEMF sensing on a motor. |
getBackEMF | Gets the current BacKEMF value for a motor. |
getBraking | Gets the current braking value for a motor. |
getSensorValue | Gets the value of a sensor (0-1000). |
getSensorRawValue | Gets the raw 12-bit value of a sensor (0-4095). |
setAcceleration | Sets the acceleration for a motor. |
setVelocity | Sets the velocity for a motor. |
setBackEMFSensingState | Enables/Disables BackEMF sensing on a motor. |
setBraking | |
setEncoderPosition | Sets/Resets the position of an encoder. |
Properties | |
Ratiometric | Sets the ratiometric state for a board. |
Events supported by PhidgetMotorControl. Pass these constants to the addEventListener() function when adding event listeners to a Phidget object.
PhidgetDataEvent.INPUT_CHANGE | digital input change |
PhidgetDataEvent.VELOCITY_CHANGE | velocity change |
PhidgetDataEvent.CURRENT_CHANGE | current change |
PhidgetDataEvent.CURRENT_UPDATE | current updates (fixed rate) |
PhidgetDataEvent.POSITION_CHANGE | encoder position change (Array:[timeChange, posnChange]) |
PhidgetDataEvent.POSITION_UPDATE | encoder position updates (fixed rate) |
PhidgetDataEvent.BACKEMF_UPDATE | backemf updates (fixed rate) |
PhidgetDataEvent.SENSOR_UPDATE | analog sensor updates (fixed rate) |
Gets the number of digital inputs supported by this controller.
public function get InputCount():int
Gets the number of motors supported by this controller.
public function get MotorCount():int
Gets the number of encoders supported by this controller.
public function get EncoderCount():int
Gets the number of sensors supported by this controller.
public function get SensorCount():int
Gets the ratiometric state for the board.
public function get Ratiometric():Boolean
Gets the supply voltage for the board.
public function get SupplyVoltage():Number
Gets the minimum acceleration that a motor can be set to.
public function getAccelerationMin( index: int ):Number
Gets the maximum acceleration that a motor can be set to.
public function getAccelerationMax( index: int ):Number
Gets the state of a digital input.
public function getInputState( index: int ):Boolean
Gets the last acceleration that a motor was set at.
public function getAcceleration( index: int ):Number
Gets the current velocity of a motor.
public function getVelocity( index: int ):Number
Gets the current current draw of a motor.
public function getCurrent( index: int ):Number
Gets the current current draw of a motor.
public function getEncoderPosition( index: int ):Number
Gets the state of BackEMF sensing on a motor.
public function getBackEMFSensingState( index: int ):Boolean
Gets the current BacKEMF value for a motor.
public function getBackEMF( index: int ):Number
Gets the current braking value for a motor.
public function getBraking( index: int ):Number
Gets the value of a sensor (0-1000).
public function getSensorValue( index: int ):int
Gets the raw 12-bit value of a sensor (0-4095).
public function getSensorRawValue( index: int ):int
Sets the acceleration for a motor.
public function setAcceleration( index: int, val: Number ):void
Sets the velocity for a motor.
public function setVelocity( index: int, val: Number ):void
Enables/Disables BackEMF sensing on a motor.
public function setBackEMFSensingState( index: int, val: Boolean ):void
public function setBraking( index: int, val: Number ):void
Sets/Resets the position of an encoder.
public function setEncoderPosition( index: int, val: int ):void