Photomechanics API
|
Provides basic turn table functions. More...
Public Member Functions | |
Task | CancelRotation () |
Cancel currently running rotation. More... | |
Task< Int32 > | GetStepsPerRound () |
Get steps per round. More... | |
Task | RotateDegrees (Double degrees) |
Rotate fixed angle. More... | |
Task | RotateSteps (Int32 steps) |
Rotate given amount of steps. More... | |
Task | RotateInfinite (Boolean clockwise) |
Rotate until canceled. More... | |
Task< ITurntableCommand > | StartRotateDegreesCommand (Double degrees) |
Same as RotateDegrees but returns TurntableCommandBase object instead of task. Use if you need to await entering TurntableCommandStatus.Processing state and finishing rotation separately. | |
Task< ITurntableCommand > | StartRotateStepsCommand (Int32 steps) |
Same as RotateSteps but returns TurntableCommandBase object instead of task. Use if you need to await entering TurntableCommandStatus.Processing state and finishing rotation separately. | |
Task< ITurntableCommand > | StartRotateInfiniteCommand (Boolean clockwise) |
Same as RotateInfinite but returns TurntableCommandBase object instead of task. Use if you need to await entering TurntableCommandStatus.Processing state and finishing rotation separately. | |
Task< ITurntableCommand > | StartCancelRotationCommand () |
Same as CancelRotation but returns TurntableCommandBase object instead of task. Use if you need to await entering TurntableCommandStatus.Processing state and finishing cancel rotation command separately. | |
Task | SetTargetSpeed (Double degreesPerSecond) |
Set maximal rotation speed. More... | |
Task< Double > | GetMaxAllowedSpeed () |
Get maximal speed allowed by turn table. More... | |
Task< Double > | GetMaxAcceleration () |
Get maximal acceleration supported by turntable. More... | |
Task< Double > | GetInitialSpeed () |
Get initial rotation speed. More... | |
void | OverrideStepsPerRound (Int32 newStepsPerRound) |
Override default steps per round with user provided value. More... | |
void | DisableStepsPerRoundOverride () |
Revert value set by OverrideStepsPerRound. | |
Provides basic turn table functions.
Task IRotationProvider.CancelRotation | ( | ) |
Cancel currently running rotation.
TurntableOperationFailedException | Thrown when turn table returns fail result of operation. |
Task< Int32 > IRotationProvider.GetStepsPerRound | ( | ) |
Get steps per round.
Used by methods that are working with degrees for correct conversion.
Task IRotationProvider.RotateDegrees | ( | Double | degrees | ) |
Rotate fixed angle.
Due to the fact that most turntables use stepper motor steps instead of degrees, small rounding error might occur. Use RotateSteps with custom rounding error compensation logic to avoid error accumulation.
degrees | Amount of degrees to rotate. |
TurntableOperationFailedException | Thrown when turn table returns fail result of operation. |
Task IRotationProvider.RotateSteps | ( | Int32 | steps | ) |
Rotate given amount of steps.
Useful when maximal rotation accuracy is needed and degrees-steps conversion rounding error is not acceptable. For example, to rotate 360 degrees by making 36 turns 10 degree each and return exact same location.
steps | Steps to rotate. |
TurntableOperationFailedException | Thrown when turn table returns fail result of operation. |
Task IRotationProvider.RotateInfinite | ( | Boolean | clockwise | ) |
Rotate until canceled.
clockwise | Rotation direction. |
TurntableOperationFailedException | Thrown when turn table returns fail result of operation. |
Task IRotationProvider.SetTargetSpeed | ( | Double | degreesPerSecond | ) |
Set maximal rotation speed.
degreesPerSecond | Speed value in degrees per second. |
TurntableOperationFailedException | Thrown when turn table returns fail result of operation. |
Task< Double > IRotationProvider.GetMaxAllowedSpeed | ( | ) |
Get maximal speed allowed by turn table.
TurntableOperationFailedException | Thrown when turn table returns fail result of operation. |
Task< Double > IRotationProvider.GetMaxAcceleration | ( | ) |
Get maximal acceleration supported by turntable.
Usually acceleration is unlimited, but for trapezoidal acceleration profile it makes sense to use a=v and for S-Curve go slightly higher.
TurntableOperationFailedException | Thrown when turn table returns fail result of operation. |
Task< Double > IRotationProvider.GetInitialSpeed | ( | ) |
Get initial rotation speed.
TurntableOperationFailedException | Thrown when turn table returns fail result of operation. |
void IRotationProvider.OverrideStepsPerRound | ( | Int32 | newStepsPerRound | ) |
Override default steps per round with user provided value.
All new firmwares can send their steps per round and speed restrictions, so this should not be used. However, turntables with legacy firmware usually can't do that and user may need to provide this value manually using this method.