Thank you for the suggestion. I have my data publishing to the cloud properly now. I am still just having issues with the data type. When I return a hex value it is “4A53” and the decimal is “19027”. The data is apparently being stored as a weird float16 number, and when I run the hex number through a float16 converter provided by the manufacture of the slave device, I get the proper result of “12.6484” which in this case refers to battery voltage. Any ideas how I can make this conversion happen inside of my code? I would rather fill my database with the already converted value than the hex value.
You can try this library for a C++ implementation of half-precission float (aka float16)
I also think there is a ModBus lib floating around in this forum that features float16 functions already.
Thank you sir, I’ve been wrestling with this all day and will hopefully get it to compile with the modbus master library for the electron. I had yet to dabble with compiling in visual studio so it’s been yet another learning experience. In the meantime if you come across that library containing float16 functions you might save me from a late night…