Problème avec int negatif modbus

Hello,

Here’s my problem:
With the Modbus driver, negative values ​​are implemented as 65536.

The problem arose because I’m logging the temperature of my freezer (-21°C), which is a permanently negative temperature. So, in Grafana, I performed an operation of -65536, and that worked.

Now, I’m logging the values ​​from my weather station, so the outside temperature and dew point have both negative and positive values. My previous rule no longer works.

My solution:
Perform the following operation directly in OpenHistorian: IF value > 6000 Then value - 65536 Else value = value.

So, I created:




As you can see, it’s not working.

Thank you for your help.