Identical Application Programs
In a fault-tolerant redundant system and under normal operating conditions, both controllers must load the identical application programs). The application program is updated every scan by transferring data from the Primary CPU to the Standby CPU. Both controllers conduct tests to detect if a mismatch exists between the application programs.
Differences between the following conditions cause a mismatch in the application program:
NOTE: To exclude animation tables and comments (on variables) from an uploaded application without causing a mismatch
When a mismatch exists, a Switchover is not possible, and the Standby CPU controller does not go online. However, there are situations when you may want to allow a mismatch between the application programs. To enable this condition, use the Quantum Hot Standby Application Mismatch feature.
NOTE: Switchover cannot occur while the Standby CPU controller is offline.
Application Mismatch Definition
Application Mismatch is a Quantum Hot Standby feature that allows a mismatch between the application programs and the I/O configuration of the Primary CPU and Standby CPU.
Use the Application Mismatch feature to modify an application program and the I/O configuration while the process remains redundant.
Use the Build Project function to perform an application mismatch with Control Expert.
NOTE: Schneider Electric recommends that the Rebuild All Project not be used to create an application mismatch. The Rebuild All Project function creates a completely new project even if nothing has been changed in the application.
In the Quantum Hot Standby system, all memory is allocated by a memory manager, which automatically maps the logical memory to physical memory locations.
This dynamic data memory layout is the heart of the programming flexibility and platform independence that Control Expert provides, but on a Quantum Hot Standby system with different user logic, dynamic data memory layout makes a cyclical data update very difficult. Therefore, mismatches occur.
An application mismatch, without stopping the process controlled by the application program, allows the following:
-
modification (edit) online of an application program in the
Standby CPU while the Primary CPU controls the process
-
modification (edit) online of an application program in the
Primary CPU while the Primary CPU controls the process
-
download an offline-modified application program to the Standby CPU and perform a Switchover to run the modified application program
-
perform a CCOTF modification of the I/O configuration on the Primary PLC
Use one of these methods to create an application mismatch condition:
-
select Online in the Standby CPU On Application Mismatch group in the Control Expert Hot Standby Tab dialog.
This action requires the application program to be downloaded to the PLC.
-
set the Command Register system bit %SW60.3 to 1.
This action must be performed online in the Primary CPU.
Transferring User Data during a Mismatch
The following table shows which user data is transferred when a mismatch occurs:
Data Type
|
Transferred on Application Mismatch
|
Located variables (State RAM)
|
Yes
|
Unlocated global variables
|
Yes (not for the 140 CPU 671 60S CPU),
unless variables exist ONLY in modified controller
|
DFB & EFB instance data
|
Yes,
unless data exist ONLY in modified controller
|
SFC variable area
|
Yes (not for the 140 CPU 671 60S CPU),
unless associated SFC section is modified, refer to Modifying an SFC Section
|
System Bits and Words
|
Yes
|
Using Application Mismatch with Care
Ensure that there is no mismatch between I/O maps or configurations.
Selecting the Standby CPU On Application Mismatch option, allows overriding the default condition (Standby CPU going offline).
If you change the parameter in this field from Offline to Online, the Standby CPU remains online if an application mismatch is detected between the application programs of the Standby CPU and Primary CPU.
Updating Section Data in an Application Program
All data of a section is updated every scan only if the data in the Standby CPU is the same as in the Primary CPU.
If the sections are equal on the Primary CPU and the Standby CPU, the following section data is updated:
-
internal states of Elementary Function Blocks (EFBs) used in the section, for example, Timers, Counters and PID
-
all Derived Function Block (DFB) data blocks of each DFB instantiated in the section, including nested DFBs
Updating Global Data in an Application Program
With Application Mismatch enabled, the application program global data is updated with every scan. Global data that does not exist on both controllers is not updated.
The application program’s updated global data includes both:
The process of updating the application program global data in a Hot Standby system affects:
-
declared variables
All declared variables are updated on every scan if they are declared on both controllers.
-
updating Standby CPU
If a complete application program transfer is done to the controller that did not receive the modified changes, then both controllers have equal application programs and the Standby CPU controller is fully updated.
-
deleted and re-declared variables
If, due to a modification, a global variable has been deleted first, and then re-declared, this variable would be treated as a new variable, even if the same name is used. The update procedure must then be followed to bring the controllers to the same state.
NOTE: The system reserves space for these variables whether they are used in the controller application program or not.
Unused variables consume space and require time to be transferred from the Primary CPU to the Standby CPU. Therefore, in the Primary CPU application program, Schneider Electric does not recommend using variables that are defined but not used.