Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mubbus.cpp bugfix #5

Open
GoogleCodeExporter opened this issue May 12, 2015 · 4 comments
Open

mubbus.cpp bugfix #5

GoogleCodeExporter opened this issue May 12, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

I noticed an error in your library. Line 137 should be MessageLength = 12;
I was getting an error when writing to coils as the response was incorrect.


Original issue reported on code.google.com by [email protected] on 6 Apr 2015 at 4:34

@kasperv79
Copy link

are these corrections verified?

@vhu474
Copy link
Contributor

vhu474 commented Oct 30, 2023

YES. Confirmed and verified to fix the issue on my Weintek HMI screen Modbus. Please merge this into main branch.
ByteArray[4 to 5] corresponds to message length + 1 in bytes. On main, its 2, which is clearly wrong. The modbus message itself is 5 bytes

MessageLength is 8 on main, which i dont know how they got. The Modbus TCP/IP ADU header itself is 8 bytes, not even including the modbus message. This should be 12.

Source: https://www.prosoft-technology.com/kb/assets/intro_modbustcp.pdf

@vhu474
Copy link
Contributor

vhu474 commented Oct 30, 2023

Also, this is the official repo that Controllino uses for their HMIs. I hope this issue gets fixed.

@vhu474 vhu474 mentioned this issue Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants