Rockwell Automation 1794-Lxxxx PhaseManager User Manual
Page 75

Publication LOGIX-UM001B-EN-P - April 2010
75
Equipment Phase Instructions (PSC, PCMD, POVR, PFL, PCLF, PXRQ, PRNP, PPD, PATT, PDET)
Appendix A
Example:
Relay Ladder
Structured Text
In the prestate routine of an equipment phase…
(*If the drain valve does not go to the commanded
state, then set the failure code of this equipment
phase = 102.*)
If Drain_Valve.FaultAlarm Then
PFL(102);
End_If;
(*If the Drain_Tank equipment phase = running and
its failure code = 102, issue the hold command and
send the equipment phase to the holding state.*)
If Drain_Tank.Running And (Drain_Tank.Failure =
102) Then
PCMD(Drain_Tank,hold,0);
End_IF;
In the prestate routine of an equipment phase…
If Drain_Valve.FaultAlarm = 1 (The valve did not go to the commanded state.) then
Failure code for the equipment phase = 102.
If Drain_Tank.Running = 1 (The Drain_Tank equipment phase is in the running state.)
And Drain_Tank.Failure = 102 (failure code for the equipment phase)
Then
Change the state of the Drain_Tank equipment phase to holding via the hold command.