-
Notifications
You must be signed in to change notification settings - Fork 52
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
Why does the example show the server sending a request to the client? #35
Comments
We could've used other names but we wanted to avoid master and slave and just use the terms used in networking for a server (which listens for a connection) and a client (which connects to). Also, you can initiate connections from any endpoint, there's no restriction on that, to enable developers to use modbus in more scenarios. |
Could you cite a corresponding standard regarding this? I understand that TCP allows this and perhaps your library does too, but I do not believe it is part of the Modbus standards unless you mean that each end is acting as both client and server (which is fine, but then why label them backwards in the example?). For example, MODBUS Application Protocol Specification V1.1b3 says on page 4 (emphasis added):
Furthermore, all of the sequence diagrams show the flow of data being initiated by the client. The MODBUS MESSAGING ON TCP/IP IMPLEMENTATION GUIDE V1.0b also talks about this in the section titled "1.2 Client / Server Model" (page 2, emphasis added):
|
That's what I wanted to state. This library follows protocol specification (message format), but does not enforce how you initiate connections or which endpoint is responsible for making requests. I use this library for example on a scenario where devices connect to a centralised server but it's the server that then uses the connection to make requests. |
Where you see |
In Modbus(TCP), the terms "server" & "slave" refer to devices that do not initiate contact with other devices but rather only respond to request they receive. The terms "client" & "master" refer to devices that initiate requests. So why does the first example have the server (slave) send a request (
read-coils
address 3-7) to a client (master)? This seems backwards.The text was updated successfully, but these errors were encountered: