Reply To: FactoryTalkView SE Server Status Display

#3423
Thumper _
Thumper _
Moderator
  • Topics: 4
  • Replies: 7
  • Total Posts: 11
Karma: 136
Rank: Jedi

Hi Josh.  I found this tech note from Rockwell that should give you the status you are after.   If you have an active Tech Connect support contract with Rockwell you can find it by the article number below.

27597 – Determining the Active and Standby Server Status in a Display Client using RSView SE Software
Background
In View Studio, the status of the primary and secondary servers can easily be determined by opening the respective HMI or Data server’s property page. However in an SE Display Client the only way to determine the current active and standby server status is to use VBA display code. The DisplayClient Object Model provides the method GetServerStatus() which returns a server’s current status along with the name of the computer hosting the active server.

The graphic GFX files attached below provide examples of display code showing how the DisplayClient Object Model can be used to determine the server status for an HMI server and a Data server. Each file is annotated to indicate the display’s applicable CPR release.

Installation and Setup

  1. Using View Studio, import the applicable graphic to the target HMI server. Open the graphic and navigate to the VBA editor
  2. In the VBA editor, modify the following VBA constant variables so that the default servers point to the actual server(s) in the application (Note: constants can be found in the top General declaration section in the VBA code):HMISERVERNAME, HMISERVERAREANAME, DATASERVERNAME, DATASERVERAREANAME
  3. Save the display.

How It Works
The Application object appStatus (declared with the WithEvents qualifier) is used initiate runtime updates of the server status indication whenever the object’s ServiceDisruption and ServiceRecovery</i> events are initiated.

The application’s method <i>GetServerStatus()</i> is used to obtain the current status for each respective server. This method call utilizes four parameters:

  1. strServer (input parameter): specifies the server’s full name including the server’s area. Example: /AreaName:ServerName. (Note: the method GetServerStatus() can also be used to determine the status of the FactoryTalk Directory server. In this case the server string syntax would be FTDirectory only)
  2. ssCPRimaryStatus (output parameter): returns a gfxServerStatusConstant value for the primary server. The returned value can be Active, Standby, or Out-Of-Service
  3. sscSecondaryStatus (output parameter): returns a gfxServerStatusConstant value for the secondary server. The returned value can be Active, Standby, Out-Of-Service, or Undefined and
  4. strActiveComputerName (output parameter): returns the name of computer running the <b>active</b> server.

See below for the attached text file that provides the text version of the (common) VBA code used by these graphics.

Applicability: RSView SE CPR4, CPR6, CPR7, CPR7 Plus and FactoryTalk View SE CPR9

Note: FactoryTalk View SE CPR9 also provides new functionality to determine a server’s state. Allthough the attached displays will function correctly in a CPR9 installation, for the full server-state functionality refer to technote 44624 – FactoryTalk View SE Application – Find Server Status and State Using VBA.