Page 1 of 1

MODBUS PROBLEM

Posted: Sun Jun 04, 2023 1:05 am
by max.tisc
hi team
I have a problem with the modbus, in practice the data I receive are not true, at the beginning they are correct but after a while they start to round starting from the decimals up to the units, which setting am I doing wrong? I made a test flowchart, in video 1 you can see that the decimals are read, in 2 they are at 0
Thank you

Re: MODBUS PROBLEM

Posted: Mon Jun 05, 2023 10:29 am
by BenR
Hello,

I beleive this is the problem, the float is being broken up into two 16-bit values but then both values are being stored to the same 16-bit modbus register.
Problem.png
Problem.png (32.9 KiB) Viewed 1818 times
This means on the other end you are only getting half of the bits of the float variable.

Re: MODBUS PROBLEM

Posted: Mon Jun 05, 2023 8:20 pm
by max.tisc
Thanks Ben, I've been looking around for 2 days, sorry if I wasted your time for this nonsense that I hadn't noticed, now it's working fine
you are always the best
thanks

Re: MODBUS PROBLEM

Posted: Tue Jun 06, 2023 9:27 am
by BenR
No problem, happy to help.

Many thanks for letting us know and glad it's working correctly for you now.