How to script a "refresh" of a $UserDefined instance with attributes which are stuck with Bad data quality

I am familiar with the following reconnection script for DI objects:

Expression (WhileTrue): Me.ConnectionStatus <> 2

Script body: Me.Reconnect = True;

 

Does a similar approach exist to refresh a UserDefined instance that has attributes with Bad data quality?

We are experiencing some issues with one of our OPC connections: When we lose connection to the OPC Server, it reconnects as expected, but some of the attributes which depends upon this connection do not update, as they get stuck with Bad data quality. When this happens, we have to manually redeploy the affected instances, after the redeploy has been completed all the attributes start to update as expected. Any input as to how this can be handled automatically with a script would be much appreciated!

IsBad() and _Attributes[] can be used to check if any of the instance's attributes has Bad data quality. The piece I am missing is how I can refresh the instance's connections in a similar manner to that of a redeploy. Maybe I can have a script which sets the InputSource of any Bad attribute to "---", before it resets it to what it originally was set to?

Parents Reply Children
No Data