Submitting your feedback...
Knowledge Base Article
KB00446 - Comparing Phase 1 and Phase 2 Failover of the PI OPC Interface
Product: PI Interface for OPC DA
Version(s): 2.3.10 and later

Please note: Phase 1 failover has been deprecated and all users should implement Phase 2 UniInt failover. This article is being kept for reference purposes.


Issue

How does the UniInt Phase 2 failover apply to the PI Interface for OPC DA? How do the Phase 1 and Phase 2 failovers compare?

Solution

Below is a diagram highlighting the Shared File Node in the Phase 2 failover:
st-widget-{image: phase2_failover.png}

Interface Failover Phase 1 vs. Phase 2

  1. Synchronization of UniInt Failover (UFO) points

Phase 1

Synchronization is done in the OPC server/data source. Three UFO control points are created on the data source: ActiveID, Heartbeat1, and Heartbeat2. Six UFO control points are created in PI, an input tag and an output tag for each type: ActiveID, Heartbeat1, and Heartbeat2. The interface will write to the failover control points on the data source and then read the values from the data source and send the data to PI as an input tag. The output tags in PI will be updated when the interface writes to the data source.

Note: The interface must be able to read from and write to the control points on the data source for phase1 failover.
 

Phase2

Synchronization is done in a shared file. No UFO control points are created on the data source. Five UFO control points are created in PI: ActiveID, Heartbeat1, Heartbeat2, DeviceStatus1 and DeviceStatus2. The interface will write the data to the shared file and after updating the shared file the interface will write the data to PI.

Note: The shared file can be on one of the interface nodes or on a separate node but should not be on the PI server node. Both copies of the interface require both read and write privileges to the shared file.
 
  1. UniInt Failover (UFO) tags, UFO tag configuration, and UFO failover interval (update rate)

Phase1

  • UFO tag creation can be done through ICU. The tags can either be exported to a spreadsheet from ICU or the provided UFO tag spreadsheet can be used.
  • Requires UFO output tags
  • UFO failover interval is defined by the scan class update rate for the input tags
  • No UFO DeviceStatus tags
st-widget-{image: Phase1.png}
 

Phase2

  • UFO tag creation is preferably done directly through PI ICU (1.4.6 or later), without having to preconfigure UFO tags in a spreadsheet
  • No UFO output tags
  • UFO failover interval is set in PI ICU (/UFO_Interval). The default is 5 seconds.
  • Requires UFO DeviceStatus tags
st-widget-{image: Phase2.png}
 
  1. Parameters that may trigger a failover (HeartBeat, Active_ID, DeviceStatus)

Phase 1

  • HeartBeat not updating
  • Manually updating the ActiveID tag on the data source or manually updating the ActiveID input tag in PI ( Active_IN )
 

Phase 2

  • HeartBeat not updating
  • Manually updating the ActiveID tag in PI
  • DeviceStatus contains value greater than 0. The valid range of values for device status is 0 to 99. This value is written by the interface. Manually updating the value in PI will have no effect on the interface. DeviceStatus values: 0 - 0 (Good) 10 - 2 (Connected) 50 - 50 (ForceFailover, only occurs when UniInt watchdog tags are defined) 95 - 3 (Device/s in error, i.e. COM_ERROR) 99 - 4 (Intf Shutdown)
Another device status value that may be observed is "90". This is written by UniInt which indicates that interface is starting. This event should only occur briefly. UniInt cannot write the value to the tag until all the tags are loaded (so that UniInt can find the tag). But shortly after the tags are loaded, the interface should update the status to something else e.g. 0 (for Good), 3 (for COM_ERROR), etc.

Note: See the UniInt Interface User Manual and PI Interface for OPC DA User Manual for detail on UI_DEVSTAT.
 

A note on message logs

When the Primary interface sees the backup interface become available a message will be written to the log file indicating this status "Backup interface available". This message is NOT printed if the OPC server sending data to the backup interface is currently not collecting data.
 

Background

If there is no item available on the OPC server, both interfaces send bad device status to UniInt. So the primary interface thinks that the backup is not ready since the backup cannot get any data out of the OPC server. That's why the pipc.log on primary interface node says that "backup interface not available". You still can do failover, but both interfaces are equally bad, i.e., no data comes back from OPC server. As long as you have items available on the OPC server, the backup interface would send good devices status to UniInt. Then the primary interface thinks backup interface is good.
 
  1. Failover types and modes

Phase 1 (one UFO type)

  • HOT
 

Phase 2 (three UFO types)

  • COLD
  • HOT
  • WARM
For the PI OPC DA Interface (PI OPCInt), there are 3 different WARM modes to choose: WARM_1: Backup interface only connects (does not create groups) to OPCserver WARM_2: Backup interface connects to the OPCserver, creates groups inactive, and add tags WARM_3: Backup interface connects to the OPCserver, creates groups active (but does not advise the groups), and add tags
 

Notes on Phase2 trade-off: Data Loss vs. Load on OPCserver

COLD ------------ WARM_1 -------------- WARM_2 ------------- WARM_3 ------------------ HOT

No Load ---------------------------- (more Load) ------------------------------> most Load

most Data-loss ------------------ (less Data-loss)--------------------------> no Data-loss

 

Similarities between UFO Phase 2 and Phase 1

  • An interface updates its ActiveID when assuming control of the primary role.
  • The Primary interface updates both interface state tags on change.
  • The Primary interface writes data (normal data tags) into PI.

Notes

IMPORTANT! Use the PI Interface Configuration Utility (PI ICU) to configure UFO Phase 2 in PI OPC DA Interface (PI OPCInt)


To avoid confusion in UFO phase 2 types/modes for the PI OPC DA Interface (PI OPCInt), you should use PI ICU (1.4.6 or later) to configure the interface and should not be making changes in the interface BAT file. In the ICU, you select the type of UFO Failover (COLD, WARM, or HOT) at the UniInt layer. If you select WARM UFO type, you should then select which WARM mode is desired (WARM_1, WARM_2, or WARM_3) at the OPCInt layer.

The confusion may arise from the specification of /UFO_Type in the .bat file if WARM UFO is selected (in PI ICU at the UniInt layer). The distinction between HOT or WARM type failover is the absence or presence of /FM parameter, whose value (1, 2, or 3) corresponds to which WARM mode is selected (in PI ICU at the PI OPCInt layer). This is a characteristic specific to PI OPCInt for PI ICU version 1.4.6 or later.
  • COLD /UFO_Type=COLD
  • WARM_1 /UFO_Type=HOT /FM=1
  • WARM_2 /UFO_Type=HOT /FM=2
  • WARM_3 /UFO_Type=HOT /FM=3
  • HOT /UFO_Type=HOT

The PI ICU (version 1.4.6 or later) was designed with this characteristic due to the fact that for PI OPCInt to achieve WARM UFO behavior, UniInt UFO type has to be set to HOT (/UFOType=HOT), as PI OPCInt requires more calls to be made than available by the UniInt /UFOType=WARM setting.

It is recommended to check the log file to confirm that the correct UFO types/modes have been selected.

Below are UniInt messages that indicate the failover type

UniInt msg for COLD failover

OPCpi> 2> UniInt failover: Successfully Initialized:

This Failover ID (/UFO_Id): 1

Other Failover ID (/UFO_OtherId): 2

Type (/UFO_Type): COLD

Synchronization file (/UFO_Sync): \\FileSvrNode\shared_folder\opcint_OPC_shared-file.dat

Update Interval (/UFO_Interval): 5000 millisecond

Debug Level (/UFO_Debug): 0x00000000

UniInt msg for WARM and HOT

OPCpi> 2> UniInt failover: Successfully Initialized:

This Failover ID (/UFO_Id): 1

Other Failover ID (/UFO_OtherId): 2

Type (/UFO_Type): HOT

Synchronization file (/UFO_Sync): \\FileSvrNode\shared_folder\opcint_OPC_shared-file.dat

Update Interval (/UFO_Interval): 5000 milliseconds

Debug Level (/UFO_Debug): 0x00000000

OPCInt message that indicates UFO WARM modes

OPCInt msg for WARM failover:

OPCpi> 2> Warm_1 failover mode set.

OPCpi> 2> Warm_2 failover mode set.

OPCpi> 2> Warm_3 failover mode set.

Triggers in PI OPCInt 2.3.10.0 or later that can cause UniInt to set Device Status to a value other than 0

  • At interface startup (or reconnection to OPCsrv), if the percentage of valid tags is less than the specified value. The switch to specify this percentage is /RP. The default value is 80.
  • If the number of UniInt watchdog tags with Bad Quality is larger than the specified value. The switch to specify this value is /uwq. The default is 0.
  • If the OPC server has not responded to more than 10 refresh calls in a scan class. This is valid for polled tags.
  • If there are no (normal data) tags configured with the corresponding pointsource of the running OPCInt

Triggers in PI OPCInt 2.3.10.0 or later that can cause alerts in the NOC or Managed PI

  • Heartbeat not updating
  • Device Status value other than 0

Article ID: KB00446 Created: 2011-04-06
Article Type: Informational Last Updated: 2014-03-05