Engineering Scaling
Jul 19 2024 at 12:00 AM
Overview
This performs an engineering scaling on the value.
\[V_{current} = Eng_{min} + {V_{raw}} \cdot \frac {Abs(Eng_{max} - Eng_{min})}{Abs(Raw_{max} - Raw_{min})}\]Installation
The required NuGet Package for this function is: IoTnxt.Raptor.TransformManager
.AddRaptorTransformManager("TransformSets", (services, configuration, builder) =>
{
builder.AddDefaultTransformationFunctions(services);
})
Example Options File
{
"TransformSets": {
"Scale": {
"F1": {
"Enabled": true,
"FunctionType": "EngineeringScaling",
"EngMin": 0,
"EngMax": 250,
"RawMin": 0,
"RawMax": 10,
"RestrictToRange": true
}
}
}
}
Property Details
| Property Name | Description |
|---|---|
| FunctionType | The value for this function is “EngineeringScaling”. |
| Enabled | Sets whether this Transform Function is enabled. Defaults to true. |
| EngMin | The minimum value of the scaled value. |
| EngMax | The maximum value of the scaled value. |
| RawMin | The minimum value of the raw value. |
| RawMax | The maximum value of the raw value. |
| RestrictToRange | If set to true, the raw value is restricted (clamped) to the raw range. |
