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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

One Master multiple slaves

Ricardosgeral opened this issue · comments

Hi,
From documentation, I don't understand if the library can be used with multiple slaves.
Just to be clear in my mind, can I make a for loop in master to call each slave consecutively? Will that overload the line bus? should i wait some milliseconds between calls?

task() method in slave will only reply if the master asks something, right?

last question:
what yield() in end of the loop() does?

Sorry for newbie questions

can I make a for loop in master to call each slave consecutively?
Will that overload the line bus? should i wait some milliseconds between calls?

If you are using RTU you have to wait response for the request before sending next one. This is actual regardless you are sending request to the same slave or to different slaves.