![]() |
|
Modbus Multiple Write Problems (write_multiple=true) - Printable Version +- LogicMachine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10) +--- Thread: Modbus Multiple Write Problems (write_multiple=true) (/showthread.php?tid=6169) |
Modbus Multiple Write Problems (write_multiple=true) - Juande - 28.10.2025 I am creating a profile with Modbus Profiler application I am trying to send a single Modbus TCP frame using function 16 (0x10) to write 4 consecutive registers (0x0003–0x0006) but only register 0x0003 is sent with the function (0x10). I have tried sending from Modbus Poll and it works perfectly and I have also read with Modbus Slave what LM sends and I have received Rx:269-17:49:44.026-00 01 00 00 00 09 01 10 00 03 00 01 02 00 05 Code: {"manufacturer":"DT","description":"DT16",Can you tell me where the error is? Thank you very much!! RE: Modbus Multiple Write Problems (write_multiple=true) - admin - 29.10.2025 Modbus has two different functions for writing a single or multiple registers. Certain devices don't support single register write so write_multiple tells to use multiple register write command for a single register. It will still write only one register, not multiple registers at once. You can use a script to write multiple separate registers in one request. RE: Modbus Multiple Write Problems (write_multiple=true) - Juande - 29.10.2025 (29.10.2025, 08:09)admin Wrote: Modbus has two different functions for writing a single or multiple registers. Certain devices don't support single register write so write_multiple tells to use multiple register write command for a single register. It will still write only one register, not multiple registers at once. You can use a script to write multiple separate registers in one request. Okay, thanks! Is it better to use the profile for reading and writing single records and Lua for writing multiple records? Or should I do everything from a Lua script? RE: Modbus Multiple Write Problems (write_multiple=true) - Daniel - 29.10.2025 You can use profile for all what is possible in profile and a proxy script for the rest. Something like this: https://forum.logicmachine.net/showthread.php?tid=5608&pid=36113#pid36113 |