Skip to main content

Class BLD510B

Represents the BLD510B motor controller, a Modbus-controlled device.

Assembly: Motors.StepperOnline.dll
View Source
Declaration
public class BLD510B : ModbusPolledDevice

Inheritance: System.Object -> Meadow.Modbus.ModbusPolledDevice

Properties

ErrorConditions

Gets the current error conditions for this controller.

View Source
Declaration
public ErrorConditions ErrorConditions { get; }

Fields

DefaultModbusAddress

The default Modbus address for the V10x device.

View Source
Declaration
public const int DefaultModbusAddress = 1

DefaultBaudRate

The default baud rate for communication with the V10x device.

View Source
Declaration
public const int DefaultBaudRate = 9600

Methods

GetStartStopTerminal()

Gets the status of the start/stop terminal.

View Source
Declaration
public Task<bool> GetStartStopTerminal()
Returns

System.Threading.Tasks.Task<System.Boolean>: A System.Threading.Tasks.Task%601 that represents the asynchronous operation. The result contains a boolean indicating the terminal status.### SetStartStopTerminal(bool) Sets the status of the start/stop terminal.

View Source
Declaration
public Task SetStartStopTerminal(bool startEnabled)
Returns

System.Threading.Tasks.Task: A System.Threading.Tasks.Task that represents the asynchronous operation.

Parameters
TypeNameDescription
System.BooleanstartEnabledTrue to enable start; otherwise, false.

GetDirectionTerminal()

Gets the rotation direction from the direction terminal.

View Source
Declaration
public Task<RotationDirection> GetDirectionTerminal()
Returns

System.Threading.Tasks.Task<Meadow.Peripherals.RotationDirection>: A System.Threading.Tasks.Task%601 that represents the asynchronous operation. The result contains the Meadow.Peripherals.RotationDirection.### SetDirectionTerminal(RotationDirection) Sets the rotation direction for the direction terminal.

View Source
Declaration
public Task SetDirectionTerminal(RotationDirection direction)
Returns

System.Threading.Tasks.Task: A System.Threading.Tasks.Task that represents the asynchronous operation.

Parameters
TypeNameDescription
Meadow.Peripherals.RotationDirectiondirectionThe desired Meadow.Peripherals.RotationDirection.

GetBrakeTerminal()

Gets the state of the brake terminal.

View Source
Declaration
public Task<bool> GetBrakeTerminal()
Returns

System.Threading.Tasks.Task<System.Boolean>: A System.Threading.Tasks.Task%601 that represents the asynchronous operation. The result contains a boolean indicating the brake status.### SetBrakeTerminal(bool) Sets the brake terminal state.

View Source
Declaration
public Task SetBrakeTerminal(bool brakeEnabled)
Returns

System.Threading.Tasks.Task: A System.Threading.Tasks.Task that represents the asynchronous operation.

Parameters
TypeNameDescription
System.BooleanbrakeEnabledTrue to enable brake; otherwise, false.

GetSpeedControl()

Gets the current speed control mode (RS485 or Analog Pot).

View Source
Declaration
public Task<SpeedControl> GetSpeedControl()
Returns

System.Threading.Tasks.Task<Meadow.Foundation.MotorControllers.StepperOnline.SpeedControl>: A System.Threading.Tasks.Task%601 that represents the asynchronous operation. The result is a Meadow.Foundation.MotorControllers.StepperOnline.SpeedControl enum value.### SetSpeedControl(SpeedControl) Sets the speed control mode (RS485 or Analog Pot).

View Source
Declaration
public Task SetSpeedControl(SpeedControl speedControl)
Returns

System.Threading.Tasks.Task: A System.Threading.Tasks.Task that represents the asynchronous operation.

Parameters
TypeNameDescription
Meadow.Foundation.MotorControllers.StepperOnline.SpeedControl mode.

GetNumberOfMotorPolePairs()

Gets the configured number of motor pole pairs.

View Source
Declaration
public Task<byte> GetNumberOfMotorPolePairs()
Returns

System.Threading.Tasks.Task<System.Byte>: A System.Threading.Tasks.Task%601 that represents the asynchronous operation. The result is the number of motor pole pairs.### SetNumberOfMotorPolePairs(byte) Sets the number of motor pole pairs.

View Source
Declaration
public Task SetNumberOfMotorPolePairs(byte numberOfMotorPolePairs)
Returns

System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.

Parameters
TypeNameDescription
System.BytenumberOfMotorPolePairsThe number of pole pairs to configure.

GetStartupTorque()

Gets the configured startup torque.

View Source
Declaration
public Task<byte> GetStartupTorque()
Returns

System.Threading.Tasks.Task<System.Byte>: A System.Threading.Tasks.Task%601 that represents the asynchronous operation. The result is the startup torque value (0-255).### SetStartupTorque(byte) Sets the configured startup torque.

View Source
Declaration
public Task SetStartupTorque(byte value)
Returns

System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.

Parameters
TypeNameDescription
System.BytevalueThe startup torque (0-255).

GetStartupSpeed()

Gets the configured startup speed.

View Source
Declaration
public Task<byte> GetStartupSpeed()
Returns

System.Threading.Tasks.Task<System.Byte>: A System.Threading.Tasks.Task%601 that represents the asynchronous operation. The result is the startup speed value (0-255).### SetStartupSpeed(byte) Sets the configured startup speed.

View Source
Declaration
public Task SetStartupSpeed(byte value)
Returns

System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.

Parameters
TypeNameDescription
System.BytevalueThe startup speed (0-255).

GetAccelerationTime()

Gets the configured acceleration time.

View Source
Declaration
public Task<TimeSpan> GetAccelerationTime()
Returns

System.Threading.Tasks.Task<System.TimeSpan>: A System.Threading.Tasks.Task%601 whose result is a System.TimeSpan representing the time it takes to accelerate.### SetAccelerationTime(TimeSpan) Sets the acceleration time.

View Source
Declaration
public Task SetAccelerationTime(TimeSpan value)
Returns

System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.

Parameters
TypeNameDescription
System.TimeSpanvalueA System.TimeSpan (0-25.5 seconds) representing how long it takes to accelerate.
Exceptions

System.ArgumentOutOfRangeException
Thrown if the specified <code class="paramref">value</code> is out of the 0-25.5 second range.

GetDecelerationTime()

Gets the configured deceleration time.

View Source
Declaration
public Task<TimeSpan> GetDecelerationTime()
Returns

System.Threading.Tasks.Task<System.TimeSpan>: A System.Threading.Tasks.Task%601 whose result is a System.TimeSpan representing the time it takes to decelerate.### SetDecelerationTime(TimeSpan) Sets the deceleration time.

View Source
Declaration
public Task SetDecelerationTime(TimeSpan value)
Returns

System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.

Parameters
TypeNameDescription
System.TimeSpanvalueA System.TimeSpan (0-25.5 seconds) representing how long it takes to decelerate.
Exceptions

System.ArgumentOutOfRangeException
Thrown if the specified <code class="paramref">value</code> is out of the 0-25.5 second range.

GetMaxCurrent()

Gets the configured maximum current limit.

View Source
Declaration
public Task<byte> GetMaxCurrent()
Returns

System.Threading.Tasks.Task<System.Byte>: A System.Threading.Tasks.Task%601 whose result is a byte representing the maximum current setting (0-255).### SetMaxCurrent(byte) Sets the maximum current limit.

View Source
Declaration
public Task SetMaxCurrent(byte value)
Returns

System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.

Parameters
TypeNameDescription
System.BytevalueA byte (0-255) representing the maximum current setting.

GetMotorType()

Gets the configured motor type.

View Source
Declaration
public Task<MotorType> GetMotorType()
Returns

System.Threading.Tasks.Task<Meadow.Foundation.MotorControllers.StepperOnline.MotorType>: A System.Threading.Tasks.Task%601 whose result is the Meadow.Foundation.MotorControllers.StepperOnline.MotorType for the current motor configuration.### SetMotorType(MotorType) Sets the motor type.

View Source
Declaration
public Task SetMotorType(MotorType value)
Returns

System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.

Parameters
TypeNameDescription
Meadow.Foundation.MotorControllers.StepperOnline.MotorType to set.

GetDesiredSpeed()

Gets the desired speed when using RS485 control mode. Ignored when using analog control.

View Source
Declaration
public Task<ushort> GetDesiredSpeed()
Returns

System.Threading.Tasks.Task<System.UInt16>: A System.Threading.Tasks.Task%601 whose result is a System.UInt16 representing the desired speed setting.### SetDesiredSpeed(ushort) Sets the desired speed when using RS485 control mode. Ignored when using analog control mode.

View Source
Declaration
public Task SetDesiredSpeed(ushort speed)
Returns

System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.

Parameters
TypeNameDescription
System.UInt16speedA System.UInt16 representing the desired speed value.

GetModbusAddress()

Gets the Modbus address configured on the controller.

View Source
Declaration
public Task<byte> GetModbusAddress()
Returns

System.Threading.Tasks.Task<System.Byte>: A System.Threading.Tasks.Task%601 whose result is a System.Byte representing the current Modbus address.### SetModbusAddress(byte) Sets the Modbus address for the controller.

View Source
Declaration
public Task SetModbusAddress(byte value)
Returns

System.Threading.Tasks.Task: A System.Threading.Tasks.Task representing the asynchronous operation.

Parameters
TypeNameDescription
System.BytevalueA System.Byte representing the new Modbus address (1-250).
Exceptions

System.ArgumentOutOfRangeException
Thrown if <code class="paramref">value</code> is out of the valid range (1-250).

GetActualSpeed()

Gets the actual speed of the motor, as reported by the controller.

View Source
Declaration
public Task<ushort> GetActualSpeed()
Returns

System.Threading.Tasks.Task<System.UInt16>: A System.Threading.Tasks.Task%601 whose result is a System.UInt16 representing the current actual speed.## Events

ErrorConditionsChanged

Event triggered when the error conditions change.

View Source
Declaration
public event EventHandler<ErrorConditions>? ErrorConditionsChanged
Event Type

System.EventHandler<Meadow.Foundation.MotorControllers.StepperOnline.ErrorConditions>