Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.

Log in or register to post/reply in the forum.

PanelTemp output over Modbus

Jules Oct 29, 2020 10:08 PM

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.

JDavis Oct 30, 2020 10:46 AM

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.

Log in or register to post/reply in the forum.