andresarmento / modbus-esp8266

A library that allows your ESP8266 to communicate via Modbus protocol, acting as a slave (master in development). Supports IP via wireless network (Modbus IP).
BSD 3-Clause "New" or "Revised" License
146 stars 236 forks source link

can't use slave ID with TCP Client? #14

Open HollyGates opened 2 years ago

HollyGates commented 2 years ago

Hi there, thanks for this library. I have got the example going on my ESP32 for modbus TCP client and I can read and write registers from my PC using modbus TCP query program from SimplyModbus. However, the client (ESP32) behaves the same no matter what I set the modbus slave ID to - it doesn't seem to pay any attention to that number.

In this application I'm working on I need to be able to respond differently depending on which slave ID the query is sent to. Is there a way to check ID for an incoming request?

Thanks for any thoughts.