Required PC-based phase methods
The
Initialize
and TerminateState
methods are required for the PC-based phase to function properly. Initialize
You must invoke the
Initialize
method in order to create OPC tags and establish the
PLI’s scan interval. This is done by calling the Initialize
method, and is usually
performed in the Form_Load()
event. The following is an example of calling the
Initialize
method: Private Sub Form_Load() Charge.Initialize ‘Initialize the control End Sub
TerminateState
The TerminateState
method is used to terminate the active state.
You must call this method if you wish the phase to complete its current state. The five active
states are RUNNING, HOLDING, STOPPING, RESTARTING, and ABORTING. For example, calling
TerminateState
while RUNNING will transition the phase to COMPLETE. The following is
an example of calling the TerminateState
method:Const UploadAllReports = 2000 Select Case Agitate.StepIndex Case 4: ‘ ensure that previous request is complete If Agitate.Request = 0 Then Agitate.Report(1) = txtAgitateElaspedTime.Text If Not Agitate.Owner Then ‘ upload all report parameters Agitate.Request = UploadAllReports End If Agitate.StepIndex = 5 End If Exit Sub Case 5: ‘ ensure that report upload is complete If Agitate.Request = 0 Then Agitate.TerminateState ‘Terminates the active state End If Exit Sub End Select
Provide Feedback