Skip to main content

Class PressureTransmitter

Emulates a pressure sensor that outputs a 4-20mA or 0-20mA current loop signal proportional to the measured pressure within a specified range

Assembly: CurrentLoop.dll​
View Source​
Declaration
public class PressureTransmitter : CurrentLoopSensor

Inheritance: System.Object -> Meadow.Foundation.CurrentLoop.CurrentLoopSensor

Properties​

MinimumSensePressure​

Gets the minimum pressure that this sensor can measure

View Source​
Declaration
public Pressure MinimumSensePressure { get; }

MaximumSensePressure​

Gets the maximum pressure that this sensor can measure

View Source​
Declaration
public Pressure MaximumSensePressure { get; }

Methods​

SetPressure(Pressure)​

Sets the sensor pressure and outputs the corresponding current loop signal. The output current is linearly interpolated between the sensor's current range based on where the pressure falls within the sensor's measurement range.

View Source​
Declaration
public Task SetPressure(Pressure pressure)
Returns​

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

Parameters​
TypeNameDescription
Meadow.Units.PressurepressureThe pressure to simulate
Exceptions​

System.ArgumentOutOfRangeException
Thrown when pressure is outside the sensor's minimum and maximum range