How float be handle in esp32s3

espleon
Posts: 3
Joined: Mon Jun 17, 2024 2:22 am

How float be handle in esp32s3

Postby espleon » Tue Jun 18, 2024 3:05 am

when I test modbus rtu slave eample in esp32s3, I found the float have stronge problem. I set the holding_reg_params.holding_data0 = 1000.213 in code, it is a float nubmer, then I read this number use modbus poll by computer but I get the nubmer is 1003.36. and I test a group of numbers, find that the float number have problem like this as well. I don't know why? it is stronge ways in esp32s3 for float numbers.
Attachments
33.jpg
33.jpg (165.84 KiB) Viewed 785 times

Who is online

Users browsing this forum: No registered users and 182 guests