Quote Originally Posted by timmers View Post
RESULT = ((ECHO - MIN) / (MAX - MIN)) * 1000
I think, it won't work:

(ECHO - MIN) / (MAX - MIN) will be between 0 and 1 and will be truncated to 0.

Try:

ZW VAR WORD
ZW=MAX-MIN:RESULT= (ECHO-MIN)*1000:RESULT=DIV32 ZW

That will work with 16 Bit-Variables and don't use to big numbers.