Replies: 1 comment
-
The client is pr definition the master. slave identifies the device you want to communicate with. For serial lines there are no Ip address ! Seems you could benefit from reading the pymodbus documentation as well as the modbus standard. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have some questions regarding the use of pymodbus.
In my project, I have a central control unit that, every 200ms, needs to read power, voltage, and similar values from a series of power modules. If I’ve understood the Modbus protocol correctly, the master (client) that performs the request every 200ms corresponds to my control unit, while the slaves (servers) are the various power modules.
My questions are as follows:
This is unclear to me because, in the example code client_async_calls, the constant
SLAVE
is used (passed to the read/write methods as theslave
parameter, corresponding to the unique identifier of the slave within a Modbus communication network). Shouldn’t the unique identifier be the pair<IP,PORT>
? That is, shouldn’t my control unit openN
Modbus connections with theN
servers (slaves) corresponding to theN
power modules?Additionally, how can I write voltage, power, etc., into the server registers (power modules) so that when the control unit wants to read the value, it gets the correct result? Is it possible to define additional functions within the server to update the registers independently of the master’s requests?
Thank you in advance for your support!
Beta Was this translation helpful? Give feedback.
All reactions