Data to Server and modbus services

Hello, I am using the Data to server service to send Modbus data to a program as an Mqtt message. I use the modem as a broker and publish to the other software as a client.
I poll my modbus device every 3 seconds, to keep fresh data in stored. It was my understanding that when using the modbus services each poll would store the new data over the old in the modems memory.

When I was looking at my mqtt messages via wireshark today, I found that not to be the case. When my data to server is triggered by the 60 period ALL of the modbus data is sent as an mqtt message. So there are 20 messages being published from my broker (the modem) to the client. I do not need that, just the most recent data. Is there a setting or configuration I can change to solve this issue?

**I also would like to note that I have my segment count set to 13 (the number of Modbus reads i have configured) and my maximum packet size set in the broker is 268435456 (I believe this is the max?)

See attached wireshark screenshot


This behaviour is correct. The collected Modbus data is stored in the database, and then data to server pulls it and sends to the server.

The suggestion here would be to configure the timers/period in both, Modbus and Data to Server configurations to match. For instance, set Modbus period to 30 seconds, and Data to Server period to 30 seconds as well.

Kind Regards,

This topic was automatically closed after 15 days. New replies are no longer allowed.