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

modbusClientFormatWriteMultipleCoilsReq: add a mask on the last byte #11

Open
bullitmaster opened this issue Apr 2, 2021 · 0 comments

Comments

@bullitmaster
Copy link

Hi!

Maybe you should add a mask to the last byte if the number of coils is not a multiple of 8?

osMemcpy(request->outputValue, value, request->byteCount);

See document page 29: https://modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf
Quote: "Unused bits in the last data byte should be zero– filled."

Best regards,
Aleksandr (aka bullitmaster)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant