PhidgetEncoder |
A class for controlling a PhidgetEncoder. See your product manual for more specific API details, supported functionality, units, etc.
| PhidgetEncoder | A class for controlling a PhidgetEncoder. |
| Events | Events supported by PhidgetEncoder. |
| Properties | |
| InputCount | Gets the number of digital inputs supported by this encoder. |
| EncoderCount | Gets the number of encoder inputs supported by this encoder. |
| Functions | |
| getPosition | Gets the absolute position of the encoder. |
| getIndexPosition | Gets the absolute position of the last index pulse. |
| getTimeChange | Gets the ammount of time that passed between the last two position change events, in milliseconds. |
| getInputState | Gets the state of a digital input. |
| getEnabled | Gets the enabled state of an encoder |
| setPosition | Sets/Resets the position of the encoder. |
| setEnabled | Sets the enabled state of an encoder |
Events supported by PhidgetEncoder. Pass these constants to the addEventListener() function when adding event listeners to a Phidget object.
| PhidgetDataEvent.INPUT_CHANGE | digital input change |
| PhidgetDataEvent.POSITION_CHANGE | position change -Note that this is a relative position change, not an absolute position. |
Gets the number of digital inputs supported by this encoder.
public function get InputCount():int
Gets the number of encoder inputs supported by this encoder.
public function get EncoderCount():int
Gets the absolute position of the encoder.
public function getPosition( index: int ):int
Gets the absolute position of the last index pulse.
public function getIndexPosition( index: int ):int
Gets the ammount of time that passed between the last two position change events, in milliseconds.
public function getTimeChange( index: int ):int
Gets the state of a digital input.
public function getInputState( index: int ):Boolean
Gets the enabled state of an encoder
public function getEnabled( index: int ):Boolean
Sets/Resets the position of the encoder.
public function setPosition( index: int, val: int ):void
Sets the enabled state of an encoder
public function setEnabled( index: int, val: Boolean ):void