Data to Server activate by trigger

Hello,

This functionality isn’t supported, but there’s a workaround to consider. Keep in mind, though, that this might not be ideal for your specific use case.

To start, it’s crucial to understand that Data To Server supports various data sources. Databases are used with most of the data sources, like Modbus. The service retrieves Modbus data from the database, it does not request it directly. Modbus TCP/Serial client periodically sends requests to Modbus devices, storing this data in the database. Therefore, Data to Server doesn’t directly request Modbus data; it extracts it from the database.

Given this, there’s no direct method to send the latest Modbus data when an alarm is triggered. However, here’s an alternative you might find acceptable:

Enable the MQTT broker (allow anonymous access in Broker settings → Miscellaneous) on your RUT and add an MQTT data input in your Data to Server. Configure this MQTT data input to listen on a specific topic on the local RUT broker (127.0.0.1). Then, set up Modbus alarms to send MQTT messages to the local broker when triggered.

In this scenario, when a Modbus alarm triggers and sends an MQTT message to the broker, Data to Server will receive this MQTT message. It will then transmit data to the server using this message and any other available data at that moment. This means that if the Modbus database has relevant data, it will be immediately sent when the MQTT message is received.

It’s important to note that this assumes there is Modbus data present in the database. This approach can be useful if, for example, you have a shorter request period in your Modbus Client configuration (e.g., 30 seconds) and a longer period in Data to Server (e.g., 10 minutes). This way, if there’s data in the database, it will be sent to your server when the Modbus alarm triggers the MQTT message to the broker.

Kind Regards,