Class CurrentTransmitter
Emulates a current sensor that outputs a 4-20mA or 0-20mA current loop signal proportional to the measured current within a specified range
Assembly: CurrentLoop.dll
View Source
Declaration
public class CurrentTransmitter : CurrentLoopSensor
Inheritance: System.Object -> Meadow.Foundation.CurrentLoop.CurrentLoopSensor
Properties
MinimumSenseCurrent
Gets the minimum current that this sensor can measure
View Source
Declaration
public Current MinimumSenseCurrent { get; }
MaximumSenseCurrent
Gets the maximum current that this sensor can measure
View Source
Declaration
public Current MaximumSenseCurrent { get; }
Methods
SetCurrent(Current)
Sets the sensor current and outputs the corresponding current loop signal. The output current is linearly interpolated between the sensor's current range based on where the measured current falls within the sensor's measurement range.
View Source
Declaration
public Task SetCurrent(Current measuredCurrent)
Returns
System.Threading.Tasks.Task: A task representing the asynchronous operation
Parameters
| Type | Name | Description |
|---|---|---|
Meadow.Units.Current | measuredCurrent | The current to simulate measuring |
Exceptions
System.ArgumentOutOfRangeException
Thrown when measured current is outside the sensor's minimum and maximum range