Application Server $DDESuiteLinkClient Redundancy Methods

 

Download this preconfigured object here.

 

Wonderware’s Industrial Application Server provides several methods to ensure data integrity. From having a hot standby available for processing objects with Application Engine Redundancy to local buffering of historian data in case of connection loss to Industrial SQL Server, Wonderware has made system robustness a focal point. In the pursuit of those goals, Wonderware has provided a $RedundantDIObject which allows the user to identify a primary connection to the PLC as well as a backup location - switching between those two sources is automated by the object.

 

In some cases, when migrating an InTouch application into Application Server for example, all that is required is functionality similar to the IOSetAccessName() function in InTouch where an existing PLC connection is reconfigured dynamically to look to an alternate location. This type of operation can certainly be achieved using the $DDESuiteLinkClient and extending it’s functionality with scripting. The following is one method to implement this switchover. A version of the enhanced object, $qDDESuiteLinkClient, is included with this note.

 

$qDDESuiteLinkClient

 

It is good practice to create Derived Templates from the version that is supplied during installation. This allows you to maintain independent configuration for this specific application. The $qDDESuiteLinkClient was derived from the$DDESuiteLinkClient and added the switchover functionality.

 

NOTE: The attributes that are locked will not be able to be changed when the instance is created.

 

General Settings:

  • Enable the Detect Connection Alarm option.
  • The Server Node, Server Name, and Communication Protocol and be adjusted at the instance level.

Topic Settings:

  • Topic configuration and the Attribute listing (if required) can be configured at the instance level.

Object Information Settings:

  • The Object Information is basic information about the object and can be updated at the instance level.

Scripts Tab:

There are a couple of scripts that were added to enable the automated switchover:

Name:

ConnectionAlarm_cot (Attempt Reconnect)

Script Info:

Script:

' Reset Retry Count
me.FailoverRetryCount = 0;
 

 

Name:

ConnectionAlarm_cwt (Attempt Reconnect, Switch to alternate)

Script Info:

Script:

' Delcare variables for use in the script
   dim retryCount as Integer;

' Assign initial values for the variables
   retryCount = me.FailoverRetryCount;

' increment retry counter
'  if less that max retries - reinitialize connection
'  if max retries exceeded - switch server location, reset retry count
   retryCount = retryCount + 1;

  
if retryCount > me.FailoverMaxRetries then
      if me.ServerNode == me.ServerPrimaryLocation then
         me.cmdSetToBackup = 1;
     
else
         me.cmdSetToPrimary = 1;
     
endif;
     
retryCount = 0;
  
else
      me.Reconnect = 1;
  
endif;    

' Assign script variables to Attributes
   me.FailoverRetryCount = retryCount;
 

 

Name:

ConnectionAlarm_cot (Attempt Reconnect)

Script Info:

Script:

' Reinitialize Connection
   me.Reconnect = 1;
 

 

Name:

cmdSetToPrimary_cwt (Switch to the Primary Server Location)

Script Info:

Script:

' Set the server location to the Primary, Reinitialize
   me.ServerNode = me.ServerPrimaryLocation;
  
me.Reconnect = 1;

' Reset the command trigger
   me.cmdSetToPrimary = 0;
 

 

Name:

cmdSetToBackup_cwt (Switch to the Backup Server Location)

Script Info:

Script:

' Set the server location to the Backup, Reinitialize
   me.ServerNode = me.ServerBackupLocation;
  
me.Reconnect = 1;

' Reset the command trigger
   me.cmdSetToBackup = 0;
 

 

Name:

InitializeObject (general object initialization)

Script Info:

Script:

' This script can be used to initialize anything in the application. This example sets a UDA on the engine that it is hosted on for other objects to reference.
  myEngine.DIPrefix = me.Tagname + ".TAGNAME.";

' Set Initialized Status
  me.objInitialized = 1;

 

UDAs Tab:

Here are the details around the UDAs that are added:

Name

Data Type

Category

Array

Initial Value

cmdSetToBackup Boolean User Writeable No Off/False
cmdSetToPrimary Boolean User Writeable No Off/False
FailoverEnable Boolean User Writeable No On/True
FailoverMaxRetries Integer User Writeable No 3
FailoverRetryCount Integer User Writeable No 0
objInitialized Boolean User Writeable No Off/False
ServerBackupLocation String User Writeable No localhost*
ServerPrimaryLocation String User Writeable No localhost*

* Server Locations should be set to computer names that are running the IO Server

Extensions Tab:

The Extensions tab can be used if you would like to Alarm or Historize any of the added UDAs. Implementing this is optional.

 

To learn more, feel free to contact our technical support team!

 

 

©2005 Q-mation, Inc. All rights reserved. All trademarks are the property of their respective owners.