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

Fixes problem with set multiple Register/Coils #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Laserlicht
Copy link

No description provided.

Memory should free'd only when reading form _frame completed (_frame = frame!!! -> same address).
@blddk
Copy link

blddk commented Apr 29, 2017

There still seems to be some kind of problem with multiple items.
The first two return their status correct, both for coils and inputs. Input registers seems to work fine.

Coils and inputs returns their status at high.

Copy link

@volkerdh volkerdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please read my comment to this issue in the comment section. By moving the section for building the response after the section for writing to registers you might by no löonger compliant to Modbus error handling as you might respond with an error (due to impossible malloc() for the response) although having already successfully changed Modbus register content. I like to suggest going a different way (described in my comment to this issue in the comment section): We should better use a second independent frame buffer for input and thus enable to malloc() the output frame buffer for the response before changing Modbus registers.

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

Successfully merging this pull request may close these issues.

None yet

3 participants