Yes, I suspect REAL is the way to go; DINTs do not have digits past the decimal (or hex or binary
) points.
TL;DR
For an ugly and/or risky alternative, you could keep the DINT and declare that instead of entering gallons on the HMI, the user is entering decigallons (or deci-whatever the unit is in your process), and keep using the DINT. This will work as long as the required entry value will not go beyond 2.14E9 or so. Also, you would have to modify your program to interpret the DINT value as ten times the target value, so you would probably end up using a REAL anyway, but at least you might not have to add logic to parse a decimal point (and the HMI handles that anyway, right?).
I say risky because in this ****amamie system the user must
always enter the last digit i.e. the first decimal digit after the implied decimal point,
even if that digit is zero, and some folks accustomed to the old system might forget to do so when that digit is zero.
Also, an algorithm similar to this is how the Deep Impact spacecraft extended mission ended.
Are those enough caveats to convince you to use the REAL? Good.