Forgive me if this is a very basic question but I'm quite new to modbus programming. I am using the sample code provided here: https://www.campbellsci.ca/blog/access-live-measurement-data-using-modbus to return the panel temperature as a modbus excercise. As the article states, my CR1000X is returning a 32-bit unsigned integer split across two 16-bit registers, returning for example: 16789, 224. My question is: how do I convert this into a useable decimal number? Documentation for PanelTemp says it returns the value in degrees C, so I'm not sure what I'm doing wrong. Thank you.
It is actually mapping the value to a 32-bit floating point number, without byte reversal. If you select the correct data type in whichever Modbus software you are using, the value should display correctly.