In general, programming a Quantum Hot Standby controller with Control Expert is very similar to programming any other standalone Quantum controller using Control Expert. Most of your programming skills in other development environments and for other devices are applicable for the Quantum Hot Standby.
However, there are some important considerations:
-
The application programs on both PLCs must be identical. If not, the PLC reports a “logic mismatch":
-
If the Hot Standby PLCs are operational at the time a logic mismatch occurs, the Standby controller enters the Offline operating mode.
-
If a logic mismatch exists during a simultaneous startup of both the Hot Standby PLCs, one PLC starts as the Primary and the other PLC remains in the Offline operating mode.
-
If the controllers are started sequentially and a logic mismatch exists, the second PLC that attempts to start starts in the Offline mode.
-
When the Hot Standby controllers test for a logic mismatch, they check if the application program loaded on both PLCs are identical.
-
If the application programs on each PLC are different, the result is a logic mismatch.
-
Some changes to the application programs are possible while online; other changes require an offline update. For more information, refer to
Application Modifications.
-
When connecting Control Expert to a Hot Standby system, keep in mind that:
-
Generally, the information in Control Expert is the same whether you connect to the Primary PLC or to the Standby PLC. Most registers on the Standby PLC reflect the values provided by the Primary PLC during each MAST task.
-
Some differences between the data on the Primary PLC and the Standby PLC exist. These exceptions include the located System Word (%SW61) and User Application data maintained independently on each PLC.
-
Writing values to the Standby PLC registers is ineffective because the next database transfer from the Primary PLC overwrites these values.
NOTE: Only located data in the non-transferred area are not overwritten by data from the Primary PLC.
In a Quantum Hot Standby system, the Standby controller must remain ready to assume the role of the Primary controller. This requires that both controllers run identical applications, and that the Standby controller is provided with current application data and state information from the Primary controller once per scan. The transfer of the Primary controller data and state information to the Standby controller is achieved by using MAST tasks.
Exclusive Use of MAST Tasks
The following programming methods are examples that must not be used in a Hot Standby application:
-
preemptive, asynchronous, or interrupt-driven (EVENT) tasks
-
FAST/AUX tasks
-
immediate I/O
-
section schedulers
-
events and edge triggers, etc.
-
IU_ERIO function block
They can impact the performance of the MAST tasks and cause discrepancies between Primary and Standby output values in the event of a Switchover.
Be careful when using explicit messages and time stamping:
-
If explicit messages are used, some messages may be sent twice and answers may be lost during a switchover.
-
If time stamping are used, some time stamps may be lost during a switchover.
Only MAST tasks support data synchronization between the Primary and Standby controllers.
How Hot Standby MAST Tasks Differ
Hot Standby MAST tasks are different from the normal MAST tasks from Standalone Quantum PLCs. In a Quantum Hot Standby PLC, the execution of a MAST task involves extra steps necessary to support redundancy.
These additional steps provide the following:
An example of a Standalone MAST task follows:
The Hot Standby version of the MAST task introduces an additional step for the “Hot Standby System Functions”, the transmission of the database from the CPU to the Copro.
An example of a Hot Standby version of the MAST task follows:
The time required to transfer the database to the Copro, and for the Copro to communicate this information to the Standby, scales linearly with the size of the database. For more information on Hot Standby MAST tasks actions and durations, refer to
Database Exchange and
Adjusting MAST Task Properties.
Debugging your Hot Standby application program is now a two-stage process:
-
The application on a single Hot Standby PLC as if it were a standalone application. This allows the use all of the debugging features available in Control Expert, such as watch-points, etc.
-
Debug your application when it has been uploaded to two Hot Standby PLCs in a working redundant system, but in a non-production environment. On this platform, evaluate performance specific to Hot Standby redundancy. Only a subset of Control Expert debug features can be used during this stage.
Primary, Standby or Offline Execution
In a Quantum Hot Standby system, your application is executed differently depending on whether it is running on the Primary PLC or on the Standby PLC. The full application program is executed on the Primary controller, while the Standby only runs the first section of the MAST task.
According to the user configuration, the Offline PLC can execute:
This is important because some system behaviors must be commanded in the first section of the MAST tack. For example, the Standby PLC's Reverse Transfer Registers (%SW62 -%SW65) can contain custom diagnostic information for use by the full program on the Primary PLC.