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 190 forks source link

How to write multiple coil #362

Closed Soft-Eng-Soft closed 3 weeks ago

Soft-Eng-Soft commented 2 months ago

Hi emelianov How to write multiple coil

Minosoft1510 commented 1 month ago

Hey, I have the same issue too. When trying to Write multible Coils in sequence to different Slaves it only does the first one. what am i doing wrong?

void loop() { if (!mb.slave()) { mb.writeCoil(1, 1, coils[1], cbWrite); mb.writeCoil(2, 1, coils[2], cbWrite); } mb.task(); delay(25); }