SQL Data-recording with Redundant Servers

I have have a Standalone CitectSCADA System (2015) which executes Cicode on an event triggered by a PLC to log batch data to SQL.  The Cicode then "confirms" the datarecord by writting back to the PLC.  We are upgrading to running redundant 2018R2 CitectSCADA servers but I am unsure of how to configure the Cicode/event to only execute on one server (switching to the other in the event of failure).

Parents
  • Instead of using loops it is probably better to use tagsubscriptions. You can use the TagSubscribe() for that, there are various parameters you can define. In the callback function you can define the logging of data to the SQL and the confirmation to the controller. I usually also subscribe the values that have to go into the SQL database. In that way you don't have to use TagRead(), which can have a negative influence on the performance if you use it heavilly. You can start the subscription on the Alarm or Report Server. In the callback function use IF StrToInt(ServerInfoEx ("Alarm/Report" , 0)) = 1 THEN to only do the logging and confirmation once on the 'active' server component. The callback function is only triggered when the value of the subscribed tag changes.
Reply
  • Instead of using loops it is probably better to use tagsubscriptions. You can use the TagSubscribe() for that, there are various parameters you can define. In the callback function you can define the logging of data to the SQL and the confirmation to the controller. I usually also subscribe the values that have to go into the SQL database. In that way you don't have to use TagRead(), which can have a negative influence on the performance if you use it heavilly. You can start the subscription on the Alarm or Report Server. In the callback function use IF StrToInt(ServerInfoEx ("Alarm/Report" , 0)) = 1 THEN to only do the logging and confirmation once on the 'active' server component. The callback function is only triggered when the value of the subscribed tag changes.
Children
No Data