Data to Server processing serial modbus with triggered measurement shows random spikes in data

Hello,

Sure. Let me know how it goes.

Another option would be to completely remove the Modbus Trigger request from the Modbus service and, instead, create a script using crontabs to send it to the Modbus slave every minute. By doing this, the frequency will be precisely 60 seconds per minute. The script will consistently send the request at the exact one-minute mark, while the Modbus service will have a different starting time. This ensures that the requests won’t overlap.

Here’s an example of the Modbus command:

ubus call modbus_master tcp.test '{"ip":"127.0.0.1","port":502,"id":1,"timeout":1,"function":3,"first_reg":1025,"reg_count":"1","data_type":"16bit_int_hi_first","no_brackets":1}'

You can find other scripting examples on the forum. For example, the following post here can be useful.

Another thing you can do is to change the frequency so that the issue occurs less often. For example, 53 and 60 seconds. With this frequency, it should be ~53 mins before it overlaps.

Kind Regards,