Add Method (PIBatchDB object)

             

Adds a PIBatch object to the server PIBatchDB and returns a PIBatch object.

 

Syntax

object.Add strBatchID, varProduct, varRecipe, varStartTime, [varEndTime]

The Add method syntax has these parts:

Part

Description

object

An object expression that evaluates to a PIBatchDB object.

strBatchID

BatchID assigned of PIBatch.

varProduct

A VARIANT containing the Product assigned to the PIBatch.

varRecipe

A VARIANT containing the Recipe assigned to the PIBatch.

varStartTime

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

verEndTime

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

 

Remarks

PIBatch objects, as well as the time series batch objects, PICampaign, PIUnitBatch and PITransferRecord, are stored in the PI Data Archive. Therefore creation requires that the target archive be the primary archive or the target archive was created after the installation of PI 3.3.

 

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