Class F55B150_24GL_30S
A 24V, 100RPM, 30:1 gear-reduction BLDC motor
Assembly: Motors.StepperOnline.dll
View Source
public class F55B150_24GL_30S : IVariableSpeedMotor, IMotor
Implements:
Meadow.Peripherals.Motors.IVariableSpeedMotor, Meadow.Peripherals.Motors.IMotor
Properties
MaxVelocity
Gets the maximum run velocity for the motor
View Source
public AngularVelocity MaxVelocity { get; }
Direction
Gets the current rotation direction of the motor.
View Source
public RotationDirection Direction { get; }
IsMoving
Gets a value indicating whether the motor is currently in motion.
View Source
public bool IsMoving { get; }
Fields
DefaultRotationDirection
The default motor rotation direction.
View Source
public const RotationDirection DefaultRotationDirection = Clockwise
Methods
SetSpeed(AngularVelocity)
Sets the desired speed of the motor.
View Source
public Task SetSpeed(AngularVelocity desiredSpeed)
Returns
System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.
Parameters
| Type | Name | Description | 
|---|---|---|
Meadow.Units.AngularVelocity | desiredSpeed | The desired Meadow.Units.AngularVelocity speed. | 
Exceptions
System.ArgumentOutOfRangeException
Thrown if the desired speed exceeds the controller’s maximum value.
Run(RotationDirection, CancellationToken)
Runs the motor in the specified direction.
View Source
public Task Run(RotationDirection direction, CancellationToken cancellationToken = default)
Returns
System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.
Parameters
| Type | Name | Description | 
|---|---|---|
Meadow.Peripherals.RotationDirection | direction | The Meadow.Peripherals.RotationDirection to rotate the motor. | 
System.Threading.CancellationToken | cancellationToken | A token to observe while waiting for the task to complete. | 
RunFor(TimeSpan, RotationDirection, CancellationToken)
Runs the motor for a specified duration in the given direction, then stops.
View Source
public Task RunFor(TimeSpan runTime, RotationDirection direction, CancellationToken cancellationToken = default)
Returns
System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.
Parameters
| Type | Name | Description | 
|---|---|---|
System.TimeSpan | runTime | The System.TimeSpan duration to run the motor. | 
Meadow.Peripherals.RotationDirection | direction | The Meadow.Peripherals.RotationDirection to rotate the motor. | 
System.Threading.CancellationToken | cancellationToken | A token to observe while waiting for the task to complete. | 
Stop(CancellationToken)
Stops the motor.
View Source
public Task Stop(CancellationToken cancellationToken = default)
Returns
System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.
Parameters
| Type | Name | Description | 
|---|---|---|
System.Threading.CancellationToken | cancellationToken | A token to observe while waiting for the task to complete. | 
SetBrakeState(bool)
Sets the state of the motor’s brake.
View Source
public Task SetBrakeState(bool enabled)
Returns
System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.
Parameters
| Type | Name | Description | 
|---|---|---|
System.Boolean | enabled | true to enable the brake; false to disable. | 
SetAccelerationTime(TimeSpan)
Sets the time it takes for the motor to accelerate to the target speed.
View Source
public Task SetAccelerationTime(TimeSpan time)
Returns
System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.
Parameters
| Type | Name | Description | 
|---|---|---|
System.TimeSpan | time | The System.TimeSpan it should take to accelerate. | 
SetDecelerationTime(TimeSpan)
Sets the time it takes for the motor to decelerate to a stop.
View Source
public Task SetDecelerationTime(TimeSpan time)
Returns
System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.
Parameters
| Type | Name | Description | 
|---|---|---|
System.TimeSpan | time | The System.TimeSpan it should take to decelerate. | 
GetActualSpeed()
Reads the current speed of the motor from the controller.
View Source
public Task<AngularVelocity> GetActualSpeed()
Returns
System.Threading.Tasks.Task<Meadow.Units.AngularVelocity>: A System.Threading.Tasks.Task%601 whose result is an
Meadow.Units.AngularVelocity indicating the motor’s actual speed.### RunFor(TimeSpan, RotationDirection, AngularVelocity, CancellationToken)
Runs the motor for a specified duration with the given parameters.
View Source
public Task RunFor(TimeSpan runTime, RotationDirection direction, AngularVelocity angularVelocity, CancellationToken cancellationToken = default)
Returns
System.Threading.Tasks.Task: A task representing the asynchronous operation.
Parameters
| Type | Name | Description | 
|---|---|---|
System.TimeSpan | runTime | The duration for which the motor should run. | 
Meadow.Peripherals.RotationDirection | direction | The rotation direction of the motor. | 
Meadow.Units.AngularVelocity | angularVelocity | The AngularVelocity at which the motor should run (0 to 100). | 
System.Threading.CancellationToken | cancellationToken | Optional cancellation token to stop the operation. | 
Run(RotationDirection, AngularVelocity, CancellationToken)
Runs the motor continuously with the given parameters.
View Source
public Task Run(RotationDirection direction, AngularVelocity angularVelocity, CancellationToken cancellationToken = default)
Returns
System.Threading.Tasks.Task: A task representing the asynchronous operation.
Parameters
| Type | Name | Description | 
|---|---|---|
Meadow.Peripherals.RotationDirection | direction | The rotation direction of the motor. | 
Meadow.Units.AngularVelocity | angularVelocity | The AngularVelocity at which the motor should run (0 to 100). | 
System.Threading.CancellationToken | cancellationToken | Optional cancellation token to stop the operation. | 
Events
StateChanged
Raised when the movement state of the motor changes
View Source
public event EventHandler<bool>? StateChanged
Event Type
System.EventHandler<System.Boolean>
Implements
Meadow.Peripherals.Motors.IVariableSpeedMotorMeadow.Peripherals.Motors.IMotor