AddPIUnitBatch Method (PIModule)

             

Creates and adds a PIUnitBatch to the server for this PIModule.

 

Syntax

object.AddPIUnitBatch strBatchID, varProduct, varStartTime, [varEndTime]

The AddPIUnitBatch method syntax has these parts:

Part

Description

object

An object expression that evaluates to the PIModule object.

strBatchID

A string containing the batch identifier (BatchID).

varProduct

A VARIANT containing the Product assigned to the PIUnitBatch.

varStartTime

A VARIANT representing the start time of the PIUnitBatch. The VARIANT may be a PITime, DATE, String, or numeric. Interpretation of DATE, strings and numerics is consistent with PITime's interpretation.

varEndTime

Optional VARIANT representing the end time of the PIUnitBatch. The VARIANT may be a PITime, DATE, String, or numeric. Interpretation of DATE, strings and numerics is consistent with PITime's interpretation. Normally a PIUnitBatch is created at the start of the batch therefore the end time is not known.

 

Remarks

If successful, this method returns the created PIUnitBatch object. The PIModule must be configured as a PIUnit for this method to work; see the IsPIUnit property.

PIUnitBatch objects represent activity on specific equipment, therefore, they are always created on a PIModule.

 

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error

Description

pseNOGENSERVER

The underlying server abstraction layer could not be accessed.

 

Enabling Operational Intelligence