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

Holding registers #5

Open
hembyggarn opened this issue Jan 12, 2024 · 2 comments
Open

Holding registers #5

hembyggarn opened this issue Jan 12, 2024 · 2 comments

Comments

@hembyggarn
Copy link

Hi!
I found your library wery easy to use but since I´m not so used to ModbusRTU I was looking for a good example in how to read and write to other registers than the coil but I didn´t find any good ones.
So, I´m trying.... :) I´m building a heating control system with several nodes. One of them shall read temperatures (float) and write them to the holding registers so the master can reach them. I´m obviously doing something wrong so I tried to create ten holding register and fill them all with the same data. When the master asks for them the slave send them but NOT the data I have put there. The strange thing is that if I write the same data in all of them the data that will be sent should all be the same. But NO. It is sending different data in each register. I don not know what to do. Best regards Hasse
Skärmklipp

@vishnumaiea
Copy link
Member

Hello @hembyggarn.

This could be due to a previously reported issue #4. Please use the latest development branch in your project and see if it fixes the problem.

@vishnumaiea
Copy link
Member

vishnumaiea commented Jan 28, 2024

Another thing you can check is the response of the writeHoldingRegister() function. If the write operation is successful, it should return 1; and -1 otherwise.

You can also post your test code here so that I check if there is anything wrong with your code.

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

2 participants