Sending and receiving a data request from a device through MQTT from Ewon

Hi,
I have a system made up of different station (made up of a PLC and and Ewon router) connected to an Ignition gateway through MQTT that send data when those values changes.
Sometimes it happens that the gateway looses the tags stored in the MQTT Engine provider: that sometimes happens because the server goes down or other mysterious reasons.
The simpler way to get back those tags is to simply sending them back from the stations.
To be able to send all the tags back from the SCADA I created for each station:

  • The OPC tag (send_val) that when 1 and sent to the station triggers the data sending (all ther OPC tags have a script on them that when the value changes they get sent to the station)
  • An expression tag (Quality_bad_val) that check the quality of the the other tags and when those are bad goes to 1.
  • A button that becomes visible when the Quality tag goes to 1 and is binded to the send_val tag
    So when the server goes down the OPC tags quality go to BAD > the tag Quality_bad_val goes to 1 >the button appears > the user sees it and click on it > the tag send_val goes to 1 and gets sent > the station receive it and send the data back.
    The problem appears when the server goes down another time because the send_val tag is already at 1 adn the request doesn’t get sent.
    I tried different solution but they have their problems too:
  • At first I was usig a momentary button that triggered the send_val tag for 5 seconds put then I tried implementing it on the Perspective side of the project and I remembered that there are no momentary button in Perspective
  • I made a script on the tag Quality_bad_val so that when the data gets received and it goes to 0 it changes the send_val value to 0. This solution doesn’t work because some stations are often offline and aren’t able to send the data back and the Quality_bad_val stays on 1 and those station are stuck
    My next attemp is to create a timer script on the Gateway the every few seconds write the tag send_val to 0, I really don’t like this approach though.
    Do you have any solution that you can share?
    Thanks, regards

Daniele