Page 1 of 1

AIO missing decimal point

Posted: 31 Jan 2024, 17:30
by in06khattab
Hi,

The data I receive from a 0-10V Analog Input is in millivolts. I then want to divide that number by 200 in Pictory, but I loose the decimal point.

pi@RevPi17663:~ $ piTest -r MF2_TEMP (this is with no divisor)
2 Byte-Value of MF2_TEMP: 6443 dez (=192b hex)

This is after a divisor of 200
2 Byte-Value of MF2_TEMP: 32 dez (=0020 hex)

The output should be 32.215.
2024-01-31_16-30.png
2024-01-31_16-30.png (3.97 KiB) Viewed 945 times

Re: AIO missing decimal point

Posted: 31 Jan 2024, 19:18
by nicolaiB
The value in process image is of type integer. Multiplier and Divisor are applied to the same integer feld, thus no decimals If you want to have a float value, I suggest to do the processing in your application.

Nicolai

Re: AIO missing decimal point

Posted: 01 Feb 2024, 00:25
by in06khattab
Thanks