Commanding Manual Switchovers
In addition to the
system conditions that cause an automatic Switchover, a manual Switchover can be commanded by:
-
writing to bits 1 and 2 of the Command Register at
%SW60.
This write operation can be accomplished by:
-
sending a RUN -> STOP command from Control Expert to the Primary CPU
-
Offline command from the Primary CPU keypad
NOTE: Before doing any switchover by application program, ensure that the standby PLC is ready to assume the Primary role. Refer to the chapter
Quantum-specific System Words for more information about the %SW182-%SW183 and %SW176-%SW177 system words.
NOTE: The intended use of user application Switchover (in %SW60) is to react to. detected error by the application. Do not use this method for periodic Switchovers.
NOTE: If for some reason the application has to Switchover periodically, the period between switchovers must not be less 120sconds.
Example of Switchover with PLC B Initially in Standby Mode
In this example, the initial state of the system is as follows:
By writing new values to bits 1 and 2 of the %SW60 command register, you can command a change in the operating modes of the Hot Standby controllers. The following table describes the four commands and their results:
New Values Written to %SW60
|
Resulting PLC Operating Modes
|
Effects
|
Bit 1
|
Bit 2
|
PLC A
|
PLC B
|
0
|
0
|
Offline
|
Offline
|
System is not controlling the application
|
0
|
1
|
Offline
|
Standby
↓
Primary
|
|
1
|
0
|
Primary
|
Offline
|
|
1
|
1
|
Primary
|
Standby
|
|
* In this case, we are not directly commanding a Switchover. Instead, we are commanding PLC A to enter an Offline state and we are relying on the system logic to recognize this and change PLC B from standby to Primary during the next scan.
|
NOTE: All changes to the command register %SW60 must be written to the Primary PLC. This register is copied from the Primary to the standby PLC during each MAST task. Therefore, any changes you make directly to the standby PLC's command register will be overwritten by this transfer without taking effect.
Example of Switchover not Possible
In the event of a detected error in the Primary CPU and if the mode of the standby CPU is Offline, the standby CPU is not ready to assume the role of Primary CPU. No switchover is possible.