Troubleshooting modbus registers using modbus viewer tool, calibration values

I’m using an AQ-N sensor on RS485 network with Modbus protocol. When reading Modbus register 119 (degree celsius temperature value of the humidity sensor, 2 bytes), the MSB byte value is 0xFF below 25.5°C and 0x00 above 25.5°C. But it should be 0x00 below 25.5°C and 0x01 above 25.5°C !
For example :

  • if the temperature is 19.4°C, the read value is 0xFFC2 instead of 0x00C2.
  • if the temperature is 26.0°C, the read value is 0x0004 instead of 0x0104.

Is it a bug in the AQ-N firmware or am i missing something ?
Alain

Could you please connect with the T3000 front end software and then use the new handy ‘modbus register viewer’ tool to check the registers. Here is an example showing the registers on a T3 programmable controller, if you have troubles I can check into the specific product model and register numbers you’re asking about.

Here is the register view for temperature below 25.5°C :

and for temperature above 25.5°C :

As you can see, the value of Modbus register 119 is wrong.

Since register 119 is also writable, I finally solved the problem by writing the right value corresponding to the temperature in the register.
The degree Celsius temperature is correct now, and the Fahrenheit temperature too.

Register 119 holds the current temperature reading, when you write to this register you are doing a calibration of temperature sensor.
Register 123 is the offset calibration value, when you read register 123 as an ‘unsigned value’ you will read 65267, but when you select the proper format which is a ‘signed value’ , the reading is -269, which means you have a large offset of -26.9C. The number format will explain the large variations you see in register 119 as the temperature crosses the 0 DegC mark as it varies positive and negative.

Please write 0 to register 123 to clear the calibration data or you can calibrate from the T3000 front end, here is a view of calibrating the temperature sensor from the GUI, just type a new number here to match the reading of your calibration device and hit enter. You will see the calibration value bump up or down automatically once the new temperature reading is accepted.