METHOD CleanupAction
CleanupAction is running until one of the following events occurs: When xComplete is TRUE the state STATE.DONE is reached. When xAbort is TRUE the state STATE.ABORTED is reached. When iErrorID ≠ 0 (Zero) the state STATE.ERROR is reached.
After a Ready Condition as input (iErrorIDProposed = 0 and xAbortProposed = FALSE), only the output states
DONE (xComplete is TRUE) or ERROR (iErrorID ≠ 0) are possible.
After a Error Condition as input (iErrorIDProposed ≠ 0), only the output state
ERROR (iErrorID ≠ 0) is possible.
After a Abort Condition as Input (xAbortProposed = TRUE), only the output states
ABORTED (xAbort is TRUE) or ERROR (iErrorID ≠ 0) are possible.
Example
(* common cleanup -- first steps *)
IF xComplete THEN
IF xAbortProposed THEN
(* abort condition -- abort specific cleanup *)
xAbort := TRUE;
xComplete := FALSE;
ELSIF iErrorIDProposed <> 0 THEN
(* error condition -- error specific cleanup *)
iErrorID := SEL(xComplete, 0, iErrorIDProposed);
xComplete := FALSE;
ELSE
(* ready condition -- done specific cleanup*)
END_IF
END_IF
(* common cleanup -- last steps *)
InOut: |
|