Methods
The following section provides a summary of each method associated with the
Batch Phase Execution
control and a description of how each method is used. There are no parameters associated with any of these methods.Method summary
Method | Return value | Description |
---|---|---|
CheckPoint | True = success False = failure | Called to force an update of the checkpoint data file. |
Initialize | True = success False = failure | Used to initialize the control. The control will not function properly if this method is not invoked. |
LogTagNames | True | Used to write all tag names to the activity log file. |
TerminateState | None | Your application must call this method to complete the transition of an Active state. |
CommandAbort | True = success False = failure | Used to transition the phase to ABORTING. |
CommandHold | True = success False = failure | Used to transition the phase to HOLDING. |
CommandReset | True = success False = failure | Used to transition the phase to IDLE. |
CommandRestart | True = success False = failure | Used to transition the phase to RESTARTING. |
CommandStart | True = success False = failure | Used to transition the phase to RUNNING. |
CommandStop | True = success False = failure | Used to transition the phase to STOPPING. |
Method description
- Checkpoint: This method is invoked to update the checkpoint data file. Typically, this is not needed since the checkpoints are saved as needed at the end of every PLI scan. It should only be called AFTER theInitializemethod has been called and executed successfully.
- Initialize: This method performs all initialization and MUST be called before the phase will execute properly. It only needs to be called once and in fact, will not execute again if called more than once. You should check the return value and not allow the application to continue if this method fails.Initializedoes the following:
- Loads checkpoint data if required (firesOnCheckPointFailif the checkpoint read fails).
- Creates and initializes all tags.
- Creates the watchdog.
- Creates a timer based on theIntervalproperty.
- Fires theOnPowerUpevent.
- LogTagNames: This method writes all tag names to the activity log file. It is used as a tool to view the current tag names. It should only be called AFTER theInitializemethod has created and initialized the tags. It will always return a value of TRUE.
- TerminateState: This method is used to terminate an active state and transition the phase to the next desired state. In other words, it will cause the phase to change state as shown in the following table:Current stateTransitioned state upon call of TerminateStateABORTINGABORTEDHOLDINGHELDSTOPPINGSTOPPEDRESTARTINGRUNNINGRUNNINGCOMPLETE
The phase programmer must useTerminateStatewithin the phase logic to transition the phase state at the appropriate time. Refer to thePCD Programmer Technical Reference Guidefor complete instructions regarding state transition logic.
- Transition command methods: The Transition Command methods allow the phase programmer to change the state of the phase from within the source code. The state transition rules must be followed in order for the PLI within theBatch Phase Executioncontrol to honor the command. The following table shows the command name, the state to which the phase will transition, and the state(s) that the phase must be in for the command to be honored.MethodPhase transitions to:Phase state must be:CommandAbortABORTINGHOLDING, STOPPING, RUNNING, RESTARTING, or HELDCommandHoldHOLDINGRUNNING or RESTARTINGCommandResetIDLECOMPLETE, ABORTED, or STOPPEDCommandRestartRESTARTINGHELD (and the phase has not failed)CommandStartRUNNINGIDLE (and the phase has not failed)CommandStopSTOPPINGHOLDING, RUNNING, RESTARTING, or HELD
Provide Feedback