EasyManua.ls Logo

Allen-Bradley 1756-CNB - Example 2: Structured Text

Allen-Bradley 1756-CNB
186 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Publication 1756-UM523F-EN-P - December 2006
90 Configure and Program the Controller
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
If Switchover_Happened = on, then
1. Execute the instructions that you want to execute after a switchover.
2. Turn off the Switchover_Happened bit.
Put your instructions here.
comment
comment
comment
comment
code

Table of Contents

Related product manuals