-
Notifications
You must be signed in to change notification settings - Fork 85
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
tcp.write_multiple_registers command is unable to write more than 3 registers, in modbus TCP #120
Comments
Hello @Abolohit, thanks for your comment. I'm not convinced yet that the issues are caused by a bug in this package. Could you provide more info?
|
I am using Modbus TCP. The slave recieves the faulted frames. I am actually sending a IP address to the slave by taking a ip address string and breaking it into 4 integers, then writing those 4 integers to holding registers on the slave. If I use the write multiple registers and send the 4 integers, the last integer(4th) becomes a random number. If I use write multiple registers and send only the first 3 integers and then send the 4th integer separately using write single register, only then I am able to recieve the complete IP Address accurately on my slave. My goal is to send an IP Address to the slave using Modbus TCP, which then gets stored in the holding registers of the slave for future use. Here is a part of my code.
This was my initial attempt at sending the ip address, ip4 fails to be recieved at the slave accurately. I had to use this work around:
|
I have used your library in my umodbus python program to write to 4 holding registers on my modbus slave. The slave recieved only the first 3 registers successfully. The last register gets a garbage value.
To successfully write the last register, I have to use the tcp.write_single_register command seperately to send the last register after the first 3 registers have been sent over TCP.
Thus, I am able to write 4 holding registers only when I used this workaround. Please fix it to make this library perfect!
The text was updated successfully, but these errors were encountered: