Modbus scan rate

In a solar park project, I am reading multiple inverters with different Modbus IDs through a Modbus Gateway. The problem is that performing many polls in a short time saturates the channel. Therefore, I need a way to set a scan rate per slave or per query to manage how often each device is polled. Thank you.

The rate of the Tag Group these tags belong to is really the only control you have over the polling.

Do you have a single device connection defined to this Modbus gateway or do you have one per slave?

Yes, there is a single connection to the Modbus gateway to poll multiple slaves according to the Modbus ID each one has. Is there a way to define that each slave is polled, for example, every 5 seconds?

No, not easily.

You could create a Tag Group for each slave and put it into Driven mode, then drive the execution yourself on whatever schedule you like. There can be some additional difficulties in this approach if the Modbus device/gateway you're connected to closes "idle" connections after some time and you're polling slower than whatever that time is.

Do you have any script examples for polling a Modbus device at a specified interval?

If it's an issue, you may have to go to using Kepware for a Modbus driver. Kepware makes things like this easy to poll devices serially so that the connection doesn't get overloaded. I don't know about @pturmel's driver, but he may have something like this in his driver also, but since I haven't used it, I'm not certain.

We don't have KEPServer, so we need a script to adjust the Modbus polling intervals.