- This topic has 6 replies, 2 voices, and was last updated 5 years, 1 month ago by Anonymous.
- October 18, 2018 at 10:57 am #3422AnonymousKarma: 0Rank: Padawan
I’m working on a FTVIEW SE project that uses distributed clients and redundant servers.
I want to add a Multi-State indicator on the main screen that shows “Primary Server Active” or “Secondary Server Active“, depending on which server the client is pulling from. I feel what I’m wanting to do is fairly simple, I just cant find the tag or expression associated with it. Anyone have experience with this, or have any suggestions?
Thanks in advance!October 18, 2018 at 12:00 pm #3423ThumperParticipantKarma: 141Rank: 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
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
- Using View Studio, import the applicable graphic to the target HMI server. Open the graphic and navigate to the VBA editor
- 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
- 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:
- 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)
- ssCPRimaryStatus (output parameter): returns a gfxServerStatusConstant value for the primary server. The returned value can be Active, Standby, or Out-Of-Service
- sscSecondaryStatus (output parameter): returns a gfxServerStatusConstant value for the secondary server. The returned value can be Active, Standby, Out-Of-Service, or Undefined and
- 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.October 18, 2018 at 2:13 pm #3432AnonymousKarma: 0Rank: Padawan
Yeah, I figured it would have to be done in VBA. We dont have a Tech Connect account currently, so I cant download their reference files. Thanks for the info, though.October 18, 2018 at 2:42 pm #3433ThumperParticipantKarma: 141Rank: Jedi
I have attached the 3 documents they reference in the tech note. Hopefully they help.
Attachments:You must be logged in to view attached files.October 18, 2018 at 2:51 pm #3435ThumperParticipantKarma: 141Rank: Jedi
I have zipped the GFX files
Attachments:You must be logged in to view attached files.October 18, 2018 at 5:40 pm #3437AnonymousKarma: 0Rank: Padawan
Thanks! Yeah I also found Rockwell included a “Server Status” Display in the Libraries tab. I’m just trying to do something a little different to conserve space on the page.October 23, 2018 at 2:04 pm #3449AnonymousKarma: 0Rank: Padawan
Just an update. I found Rockwell’s pre-made “Server Status” Display inside FTViewSE. Used a button on home screen to open that. Also, used similar VBA Code to detect disconnect / reconnect events and change BG Color of the button for indication.
- You must be logged in to reply to this topic.