emelianov / modbus-esp8266

Most complete Modbus library for Arduino. A library that allows your Arduino board to communicate via Modbus protocol, acting as a master, slave or both. Supports network transport (Modbus TCP) and Serial line/RS-485 (Modbus RTU). Supports Modbus TCP Security for ESP8266/ESP32.
Other
534 stars 188 forks source link

Client server example #237

Closed errogaht closed 2 years ago

errogaht commented 2 years ago

Hi! Thanks a lot for such big work! I have water pump controller (slave) and i can easily read registers (eg. voltage) and write registers (eg. stop/start) So it is possible with RS485 RTU.

I want to have an ESP8266 RTU device with pressure sensor and relay. So i want to read register and write register. Part with sensor is done and it works perfectly! I can read pressure. But i can't figure out how i can implement with the same hardware (8266 + MAX485)abitily to listen writes? (on/off relay) in the docs. you said that it is not supported to change client/server after init. Why? my pressure contoroller works like that ...

Thanks for any advice...

errogaht commented 2 years ago

i found correspondig example modbus-esp8266/examples/Callback/IP-server-MultipleHRegDebug/IPserver-MultipleHRegDebug.ino thanks again!