90
Configure and Program the Controller
comment
comment
comment
comment
code
Publication 1756-UM523F-EN-P - December 2006
If Switchover_Happened = on, then
1. Execute the instructions that you want to execute after a switchover.
2. Turn off the Switchover_Happened bit.
Example 2: Structured Text
//Get the ID of the primary chassis.
//That is always the chassis that runs the code.
//Store the ID in Chassis_ID_Now.
//Chassis_ID_Now -- DINT.
GSV(REDUNDANCY,,PhysicalChassisID,Chassis_ID_Now);
//If this is the first scan
//Then set the last value of the chassis ID = the ID of this chassis
//Chassis_ID_Last -- DINT.
If S:FS then
Chassis_ID_Last := Chassis_ID_Now;
End_If;
//If the chassis ID changes, a switchover happened.
//If a switchover happens then
//Turn on the Switchover_Happened bit.
//Set the last value of the chassis ID = the ID of this chassis
//Switchover_Happened -- BOOL
Put your instructions here.