Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Batch Management

Methods

  • Last UpdatedAug 26, 2016
  • 4 minute read

This section describes the methods available for the BatchHook class.

Batch Complete

The BatchHook_BatchComplete subroutine is called by Batch Manager at the completion of each batch.

Syntax

Private Sub BatchHook_BatchComplete(ByVal pIBatch As Object)

End Sub

Parameters

pIBatch

Data Type: BOBatch

Batch data provided by Batch Manager

Batch Initialization

The BatchHook_BatchInit function is called by Batch Manager for each batch that is initialized. This function requires a return value that indicates whether initialization should continue or stop. A return value of zero does not allow initialization. A return value of one permits initialization. The default return value is zero. When initializing more than one batch using the Initialize All option, this batch initialization routine is called for each batch.

Syntax

Private Sub BatchHook_BatchInit(ByVal pIBatch As Object) As Long

End Function

Parameters

pIBatch

Data Type: BOBatch

Batch data provided by Batch Manager

Batch Prepare

The BatchHook_BatchPrepare function is called by Batch Manager at the start of each batch. This function requires a return value that indicates whether the batch should continue with the start or not start at all. A return value of zero does not allow the batch to start. A return value of one permits the batch to start. The default return value is zero. A message property exists that you can use to define a custom error message that is displayed when the return value is zero. The message is not displayed if the return value is one.

Syntax

Private Sub BatchHook_BatchPrepare(ByVal pIBatch As Object) As Long

End Function

Parameters

pIBatch

Data Type: BOBatch

Batch data provided by Batch Manager

Equipment Allocation Change

The BatchHook_EquipAllocChange subroutine is called by Batch Manager when a unit or connection is allocated or released.

Syntax

Private Sub BatchHook_EquipAllocChange(ByVal pIBatch As Object, ByVal pIEquipment As Object)

End Sub

Parameters

pIBatch

Data Type: BOBatch

Batch data provided by Batch Manager

pIEquipment

Data Type: BOEquipment

Equipment data provided by Batch Manager

Evaluate Connection for Allocation

The BatchHook_EvalConnAllocation function is called by Batch Manager when connection allocation is required. This function requires a return value that indicates whether the batch should allocate the specified connection. A return value of zero does not allocate the connection. A return value of one permits the connection to be allocated. The default return value is zero.

Syntax

Private Function BatchHook_EvalConnAllocation(ByVal pIBatch As Object, ByVal pIEquipment As Object) As Long

End Function

Parameters

pIBatch

Data Type: BOBatch

Batch data provided by Batch Manager

pIEquipment

Data Type: BOEquipment

Equipment data provided by Batch Manager

Evaluate Unit for Allocation

The BatchHook_EvalUnitAllocation function is called by Batch Manager when unit allocation is required. This function requires a return value that indicates whether the batch should allocate the specified unit. A return value of zero does not allocate the unit. A return value of one permits the unit to be allocated. The default return value is zero.

Syntax

Private Function BatchHook_EvalUnitAllocation(ByVal pIBatch As Object, ByVal pIEquipment As Object) As Long

End Function

Parameters

pIBatch

Data Type: BOBatch

Batch data provided by Batch Manager

pIEquipment

Data Type: BOEquipment

Equipment data provided by Batch Manager

Log Equipment Status Change

The BatchHook_LogEquipStatus subroutine is called by Batch Manager when the status of a unit or segment is changed and the information about the change is being written to history.

Syntax

Private Sub BatchHook_LogEquipStatus(ByVal pIEquipStatus As Object)

End Sub

Parameters

pIEquipmentStatus

Data Type: BOEquipStatus

Equipment status data provided by Batch Manager

Operation Complete

The BatchHook_OperationComplete subroutine is called by Batch Manager at the completion of each operation.

Syntax

Private Sub BatchHook_OperationComplete(ByVal pIBatch As Object, ByVal opname As String, ByVal processinstance As String)

End Sub

Parameters

pIBatch

Data Type: BOBatch

Batch data provided by Batch Manager

opname

Data Type: String

Name of the operation

processinstance

Data Type: String

Name of the process instance assigned to the operation

Operation Prepare

The BatchHook_OperationPrepare subroutine is called by Batch Manager at the start of each operation.

Syntax

Private Sub BatchHook_OperationPrepare(ByVal pIBatch As Object, ByVal opname As String, ByVal processinstance As String)

End Sub

Parameters

pIBatch

Data Type: BOBatch

Batch data provided by Batch Manager

opname

Data Type: String

Name of the operation

processinstance

Data Type: String

Name of the process instance assigned to the operation

Phase Complete

The BatchHook_PhaseComplete subroutine is called by Batch Manager at the completion of each phase.

Syntax

Private Sub BatchHook_PhaseComplete(ByVal pIBatch As Object, ByVal pIPhase As Object, ByVal pIEquipment As Object)

End Sub

Parameters

pIBatch

Data Type: BOBatch

Batch data provided by Batch Manager

pIPhase

Data Type: BOPhase

Phase data provided by Batch Manager

pIEquipment

Data Type: BOEquipment

Equipment data provided by Batch Manager

Phase Prepare

The BatchHook_PhasePrepare subroutine is called by Batch Manager at the start of each phase.

Syntax

Private Sub BatchHook_PhasePrepare(ByVal pIBatch As Object, ByVal pIPhase As Object, ByVal pIEquipment As Object)

End Sub

Parameters

pIBatch

Data Type: BOBatch

Batch data provided by Batch Manager

pIPhase

Data Type: BOPhase

Phase data provided by Batch Manager

pIEquipment

Data Type: BOEquipment

Equipment data provided by Batch Manager

Routine States

During startup, the BatchHook_RoutineStates subroutine is called by the Batch Manager to determine which hooks have been enabled. It is optionally called by the Batch Manager when it is shutting down. If the Batch Manager is shutting down, the pIRoutines parameter will either be NULL or empty. You must specifically request to have this method called on termination by enabling the wwRoutineStatesOnTerm constant during initialization.

Syntax

Private Sub BatchHook_RoutineStates(ByVal pIRoutines As Object)

End Sub

Parameters

pIRoutines

Data Type: BORoutines

Routine enabling object provided by Batch Manager

Unit Procedure Complete

The BatchHook_UnitProcedureComplete subroutine is called by Batch Manager at the completion of each unit procedure.

Syntax

Private Sub BatchHook_UnitProcedureComplete(ByVal pIBatch As Object, ByVal unitprocedurename As String, ByVal processinstance As String)

End Sub

Parameters

pIBatch

Data Type: BOBatch

Batch data provided by Batch Manager

unitprocedurename

Data Type: String

Name of unit procedure

processinstance

Data Type: String

Name of the process instance assigned to the unit procedure

Unit Procedure Prepare

The BatchHook_UnitProcedurePrepare subroutine is called by Batch Manager at the start of each unit procedure.

Syntax

Private Sub BatchHook_UnitProcedurePrepare(ByVal pIBatch As Object, ByVal unitprocedurename As String, ByVal processinstance As String)

End Sub

Parameters

pIBatch

Data Type: BOBatch

Batch data provided by Batch Manager

unitprocedurename

Data Type: String

Name of unit procedure

processinstance

Data Type: String

Name of the process instance assigned to the unit procedure

TitleResults for “How to create a CRG?”Also Available in