Redundancy functions

Use the redundancy functions to retrieve the server status in a redundant pair.
The server pair can be
FactoryTalk View
HMI servers,
FactoryTalk Linx
servers, OPC DA servers, OPC UA servers, or
FactoryTalk Alarms and Events
servers.
The status value is returned as a constant integer in decimal or hexadecimal. You can then use these values to reflect different status of your servers. For example, you can create color animations or multistate indicators to show different colors, captions, or images.
The following table lists redundancy functions:
This function
Returns this value
PrimaryServerStatus
(
ServerName
)
Returns a constant integer that presents the status of the primary server.
The argument is an absolute reference to a server. It can only be a literal string with the format
/AreaName/ServerName
, where
AreaName
is the name of the area and
ServerName
is the name of the server. The argument must be enclosed in double quotes, for example,
PrimaryServerStatus("/Area1/HMI_Demo")
.
SecondaryServerStatus
(
ServerName
)
Returns a constant integer that presents the status of the secondary server.
The argument is an absolute reference to a server. It can only be a literal string with the format
/AreaName/ServerName
, where
AreaName
is the name of the area and
ServerName
is the name of the server. The argument must be enclosed in double quotes, for example,
SecondaryServerStatus("/Area1/HMI_Demo")
.
Note
: In certain cases of a poor network or a large number of clients running at the same time, the returned constant may be empty or not reflect the true server status. To solve this problem, in FactoryTalk Administration Console, go to
System > Policies > System Policies > Health Monitoring Policy Properties
to increase the value of computer detection interval or network failure detection interval. For more information on these policies, see
FactoryTalk Services Platform Help
.
The following table shows the server status constants returned by the redundancy functions.
Decimal
Hexadecimal
Server status
Description
-2147483647
0x80000001
Unknown
The server status is unknown.
-2147483646
0x80000002
Not loaded
The server is not currently in use and has not notified the system that it is running.
-2147483645
0x80000003
Failed or host unreachable
This may be one of the following:
  • The server has failed.
    If redundancy has been configured, the partner server may provide service.
  • The client computer cannot reach the computer hosting its server.
    For example, this state applies if communications fail between this computer and the computer hosting the network directory server or HMI server.
-2
0xFFFFFFFE
Not configured
Redundancy has not been configured for a secondary server.
1
0x00000001
Loading
The server's processes are starting up, and the server is currently loading processes and components.
2
0x00000002
Starting
The server has finished loading its processes and components; it is currently reading configuration and performing other tasks in order to become available for use.
3
0x00000003
Ready to provide service
The server is ready to become the active server.
4
0x00000004
Active
The server is the active partner in an active - standby pair.
5
0x00000005
Standby
The server is the
Standby
partner in an active - standby pair. This state does not apply if servers are not configured for redundancy.
6
0x00000006
Active (no partner or cannot reach partner)
This may be one of the following:
  • Redundancy is not configured and the server is the
    Active
    server.
  • A pair of servers is configured for redundancy, but one of the servers cannot connect with its partner.
7
0x00000007
Synchronizing with Active
The server is transitioning into the
Standby
state. This state does not apply if servers are not configured for redundancy.
8
0x00000008
Synchronizing with Standby
The server is transitioning into the
Active
state. This state does not apply if servers are not configured for redundancy.
9
0x00000009
Synchronized, ready to be Active
The server is ready to become the active partner in an active - standby pair. From this state, the server transitions immediately to the
Active
state. This state does not apply if servers are not configured for redundancy.
10
0x0000000A
Synchronized, ready to be Standby
The server is ready to become the standby partner in an active - standby pair. From this state, the server transitions immediately to the
Standby
state. This state does not apply if servers are not configured for redundancy.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal