Gets or sets a motor's current position.
Namespace:
PhidgetsAssembly: Phidget21.NET (in Phidget21.NET.dll) Version: 2.1.9.34
Syntax
C# |
---|
public long CurrentPosition { get; set; } |
Visual Basic (Declaration) |
---|
Public Property CurrentPosition As Long |
Visual C++ |
---|
public: property long long CurrentPosition { long long get (); void set (long long value); } |
Remarks
Use this to (re)set the current physical position of the motor to a specific position value or to get the current position
for the motor.
This does not move the motor, and if the motor is moving, setting a value to this will cause it to stop moving.
Set TargetPosition value to move the motor to a position.
The valid range is between PositionMin and PositionMax.
This value is in (micro)steps. The step unit will depend on the Stepper Controller. For example, the Bipolar
Stepper controller has an accuracy of 16th steps, so this value would be in 16th steps.
Exceptions
Exception | Condition |
---|---|
Phidgets..::.PhidgetException | If this Phidget is not opened and attached, or if the position in unknown. |