I have a question about how to handle register address. #2553
-
Hello everyone. I have a question about how to handle address. Is there a way to do this by incrementing the address by 1 when mapping the register and then storing it in the data block? -------- Logs ----------
(print result) [address 30001's value] Modbus Client Closed
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I don't have enough experience, and there are many things I don't understand. https://github.com/pymodbus-dev/pymodbus/blob/dev/pymodbus/datastore/context.py pymodbus > datastore > context.py address += 1 What is the intention of this? I deliberately commented out this part and tried the Server, and it seemed to resolve the address discrepancy. However, I expect this will only apply to my environment, so I don't think it's the right thing to do. thank you. |
Beta Was this translation helpful? Give feedback.
-
The intention is that older modbus devices did that address 1 in the server was to be requested as address 0 in the communication. The newer data stores in pymodbus uses the communication address meaning 0==0. But what is the real problem....you CONFIGURE the server in one way and REQUEST the data in another way ? just wait until you start with coils that are adressed differently or non-shared register spaces. Anyhow if you want changes then pull requests are welcome. |
Beta Was this translation helpful? Give feedback.
-
Veo… Cómo configurar el servidor: Al solicitar datos, en client.py, por ejemplo, los datos se obtienen de HoldingRegister utilizando read_holding_registers(). No creo que estén solicitando ninguna configuración de servidor o datos particularmente extraños. . . tal vez. . . Gracias por tu respuesta. (Traducción: Japonés → Español) |
Beta Was this translation helpful? Give feedback.
The intention is that older modbus devices did that address 1 in the server was to be requested as address 0 in the communication.
The newer data stores in pymodbus uses the communication address meaning 0==0.
But what is the real problem....you CONFIGURE the server in one way and REQUEST the data in another way ? just wait until you start with coils that are adressed differently or non-shared register spaces.
Anyhow if you want changes then pull requests are welcome.