MangoAutomation / modbus4j

A high-performance and ease-of-use implementation of the Modbus protocol written in Java. Supports ASCII, RTU, TCP, and UDP transports as slave or master, automatic request partitioning and response data type parsing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to write multi values that are not continuous in one request?

zhtisi opened this issue · comments

I want to write multiple values( not continuous ) to one modbus slave. For example, I want to write 1 to offset 1, 2 to offset 5, 3 to offset 10. In order to do this, I can only send three requests. But doing this is much slower than sending one request, especially when there are a lot of offsets to be written. Is there any way to write multi values that are not continuous in just one request?

Or is there any other way to fulfill this requirement(write multi values that are not continuous quickly) ?