RedundantDIObject runtime behavior
- Last UpdatedJul 19, 2024
- 4 minute read
Runtime behavior pertains to the running state of a deployed object. Once deployed and operating, the RedundantDIObject can assume one of the following states:
-
Startup. This state describes the operations performed by the object when the object is being initialized. The RedundantDIObject begins tracking whether the target DIObjects are deployed and onscan, the ConnectionStatus is connected, subscribes to the configured Ping Items on each data source, and checking for a non-zero ProtocolFailureReasonCode. Data acquisition has not been started yet.
-
Going onscan. This state describes the operations performed by the object when it is about to start the data acquisition process. Reading and writing to data items in the low-level device will immediately follow. All dynamic attributes requested by clients are subscribed to. The object will go into the Continuous execution state.
-
Continuous execution. This state describes the operations when the object is running. In this state, the RedundantDIObject:
-
Adds newly activated attributes to the Active DI source. If the ScanMode is set to ActiveOnDemand, adds the attributes in an inactive state to the backup DI source. Otherwise, the attributes are added in an Active state.
-
Updates attributes with new values if new data comes from the Active DI source.
-
Services read and write requests.
-
Monitors the connection to the Active and Standby DI sources. If the connection to the Active fails, it switches to the Standby. Also updates the DISourceActive, DISourceStandby, StatusPrimaryDISource, StatusBackupDISource attributes. When switchover occurs, it updates the SwitchTime, SwitchTimePrevious, SwitchReason, SwitchReasonPrevious, SwitchCnt, and SwitchAlarm attributes.
-
Monitors the item quality of the ping items in all scan groups in both the Active and Standby sources. When no ping item is specified for a scan group, the first item in the scan group requested by a client is used as the ping item.
-
Detects alarm conditions, if alarming is enabled.
-
Raises a connection alarm if connection to both DI sources fails or when the SwitchCnt attribute’s value reaches the SwitchMax attribute’s value. The connection alarm will be reset to false automatically when the connection to one of the DI sources is restored.
-
Monitors the data quality for DIObject data values and updates runtime error statistics if the quality is not Good.
-
-
Going offscan. This state describes the operations performed by the object when it is about to stop its data acquisition process. Reading and writing to data items in the low-level device will immediately stop. The object is set to offscan state and it unsubscribes to all dynamic attributes in all DAGroups. The object is going out of the Continuous execution state. The ConnectionStatus attribute is set to "Disconnected."
-
Shutdown. This state describes the operations performed by the object when it is about to clean up its data connections and then stops the data acquisition process.
-
Special set handling. This state describes the special operations supported by the object when it is set (written to). These operations include:
-
Setting DISourcePrimary attribute- You can change the primary DI source at runtime. If the primary DI source is currently the active DI source, a switchover occurs. All items that were currently subscribed are removed, all transactions in progress are forcefully completed, and the quality of the items not processed is set to Bad. The same subscriptions are made to the new Active DI source and all attributes are updated.
-
Setting DISourceBackup attribute- You can change the backup DI source at runtime. If the backup DI source is currently the active DI source, a switchover occurs. All items that were currently subscribed are removed, all transactions in progress are forcefully completed, and the quality of the items not processed is set to Bad. The same subscriptions are made to the new Active DI source and all attributes are updated.
-
Setting SwitchReset attribute- You can reset the SwitchCnt attribute to zero (0) and the SwitchoverAlarm.Alarmed attribute to false by setting the SwitchReset attribute to True.
-
Setting SwitchMax- You can reset the SwitchMax attribute to a new value. Switch is not limited when this value is -1. Switch is not allowed when this value is zero (0).
-
Setting ForceFailoverCmd attribute- You can trigger a switchover between Active and Standby DI sources by setting ForceFailoverCmd to True. Switchover only occurs if the SwitchMax attribute has not been reached previously or if the SwitchMax value is -1. Also, if the Standby DI source is in Bad state, no switchover occurs. If a Force-Failover is completed successfully, SwitchoverAlarm.Alarmed is set to true, SwitchCnt is incremented, SwitchReason is set to "ForceFailover", and SwitchTime, SwitchTimePrevious and SwitchReasonPrevious are updated. DISourceActive and DISourceStandby attributes are also updated.
-
-
Time propagation. When the RedundantDIObject object receives a data update from the active DI source, the time stamp received is used to update the attribute. When the RedundantDIObject object receives a poke request, it forwards the poke request that contains the value and time stamp to the active DI source.