Holds a single decimal (fractional) number. Use this instead of IntTag whenever the value needs places after the decimal point — temperatures, percentages, measured distances, calculated rates, and so on.
A decimal number.
DecimalTag supports one Transform:
| Transform | Syntax | Effect |
|---|---|---|
| SCALE | SCALE(inMin,inMax,outMin,outMax) | Rescales the raw value from an input range to an output range, using standard linear scaling: output = ((value - inMin) / (inMax - inMin)) * (outMax - outMin) + outMin |
Example: a 4–20mA sensor loop is read as a raw 4–20 and needs converting to a 0–10 bar pressure reading:
SCALE(4,20,0,10)
DecimalTag also uses the Type Attributes field (separate from Transform) for two things, which can be combined: