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

Data Archive Reference

How a batch object converts to an event frame

  • Last UpdatedOct 04, 2024
  • 6 minute read

The PI Batch Database contains objects that are organized in a hierarchy: PI Campaign, PI Batch, PI UnitBatch, and PI SubBatch:

  • A PI Campaign represents a logical group of PI Batch objects.

  • A PI Batch represents a set of activities used in production of a batch and includes a collection of PIUnitBatches.

  • A PI UnitBatch represents a period of processing or activity for a specific piece of equipment.

  • PI Subbatches are subsets of a PI UnitBatch; they cannot exist as stand-alone objects.

In the PI Batch Subsystem there is just one type of object, called a Batch.

PI Campaigns are migrated to event frames as an instance of the PICampaign_Migrated template. Event frames that are derived from the PICampaign_Migrated template include a collection of event frames based on the PIBatches_Migrated template. For any given PI Campaign, the PI Batch collection should match the event frame collection in the corresponding event frame for that PICampaign, assuming all those PI Batches exist in Data Archive at the time of migration.

PI Campaign information

Equivalent information in the event frame

Start time

Start time

End time

End time

Campaign ID

Event frame name

PI Batch collection

Child event frame collection

PIProperties

AF attributes

PI Batches are migrated to event frames as an instance of the PIBatch_Migrated template. Event frames derived from the PIBatch_Migrated template include a collection of event frames based on the PIUnitBatch_Migrated template. For any given PI Batch, the PIUnitBatch collection should match the event frame collection in the corresponding event frame for the PIBatch, assuming that all those PIUnitBatches and the referenced PIUnit exist in Data Archive at the time of migration.

PI Batch information

Equivalent information in the event frame

Start time

Start time

End time

End time

Batch ID

Event frame name

Product

AF attribute named Product

Recipe

AF attribute named Recipe

PIUnitBatch collection

Child event frame collection

PIProperties

AF attributes

Parent PI Campaign

Parent event frame

PIUnitBatches are tied to a PIUnit in the Module Database. PI UnitBatches are migrated to event frames as an instance of the PIUnitBatch_Migrated template. Event frames based on the PIUnitBatch_Migrated template also have a reference to the Element that represents the PIUnit in the Module Database. PI Unit Batches include a collection of PISubBatches. Event frames derived from the PIUnitBatch_Migrated template include a collection of event frames based on the PISubBatch_L1_Migrated template . For any given PIUnitBatch, the PISubBatch collection should match the child event frame collection in the corresponding even tframe for the PIUnitBatch, assuming that all those PISubBatches exist in Data Archive at the time of migration.

PI Unit Batch information

Equivalent information in the event frame

Start time

Start time

End time

End time

Procedure Name

Event frame name (if not blank)

Batch ID

AF attribute named BatchID. If Procedure Name is blank, the Batch ID is used as the event frame name.

Product

AF attribute named Product

Referenced PIUnit

Referenced Element

PISubBatch collection

Child event frame collection

Parent PI Batch

Parent event frame

PISubbatches are associated with a PIUnitBatch. PISubBatches can be nested any number of levels deep. PISubBatches at level 1 are migrated as event frames derived from the PISubBatch_L1_Migrated template. PISubBatches at level 2 are migrated as event frames derived from the PISubBatch_L2_Migrated template. PISubBatches at level 3 are migrated as event frames derived from the PISubBatch_L3_Migrated template. PISubBatches at level 4 and greater are migrated as event frames derived from the PISubBatch_L4_Migrated template.

PI Sub Batch information

Equivalent information in the event frame

Start time

Start time

End time

End time

Name

Event frame name

PIHeading

Not represented in the event frame

Child PISubbatch collection

Child event frame collection

Parent object (could be a PIUnitBatch or a PISubBatch)

Parent event frame

The PI Batch Subsystem is an older database than the PI Batch Database. Data in PI Batch Subsystem is different than PI Batch database data and the units referenced in the Batch Subsystem data are also different from the PIUnits in the Module Database. There is a way to "link" a Batch Subsystem unit to a PIUnit in the Module Database, but the two databases remain different (for information about how to set this up, see Prepare batch data sources and consumers for migration. Batch Subsystem data that is linked in this way is also migrated with PI Batch Database data to event frames. PI Batch Subsystem data has no hierarchy, however, it is functionally equivalent to PIUnitBatches. Therefore, Batch Subsystem batches are migrated as event frames derived from the PIUnitBatch_Migrated template.

PI Batch Subsystem information

Equivalent information in the event frame

Start time

Start time

End time

End time

BatchID

Event frame name

Product

Product

Referenced unit

Referenced Element

PI Properties are converted to AF attributes

In the Batch Database, PI Properties are stored at the root level of the batch hierarchy, only, in the batch properties collection. Each node in the collection is the name of the recipe level (procedure, unit procedure, operation, or phase). A PI Property has a name and a value, and the value has a data type. You can nest one batch property under another.

When you migrate your batch data to event frames, an AF attribute is created to represent the batch property; you can set AF attributes at any level of the batch hierarchy. For the migrated PI properties:

  • The AF attribute name is the same as the name of the corresponding batch property.

  • The batch property hierarchy, if any, is preserved in the hierarchy of the AF attributes.

  • The type of the AF attribute, as shown in the Value Type field in PI System Explorer, is shown in the following table.

    Batch property data type

    AF attribute Value Type

    For Value Type Anything, AF attribute Value points to object

    Boolean

    Boolean

    Byte

    Byte

    Byte Array

    Byte Array

    Date

    DateTime

    Double

    Double

    Double Array

    Double Array

    Float

    Single

    Float Array

    Single Array

    Long

    Int32

    Long Array

    Int32 Array

    Null

    <Anything>

    • For PI Properties that store objects such as a PIAlias or a PIModule, Value Type for the AF attribute is set to <Anything> and the value of the attribute points to the same object to which the PIProperty pointed.

    Null

    Object

    Not supported

    PIAlias

    PIAlias

    PIHeading

    PIHeading

    PIModule

    PIModule

    PIPoint

    PIPoint

    PIProperty

    PIProperty

    PIUnitBatch

    PIUnitBatch

    PIValue

    PIValue

    Server

    PIServer

    Short

    Int16

    Short []

    Int16 Array

    String

    String

Setting the security descriptor on event frames

In the PI Batch Database, access control lists (ACLs) manage who can access and update a PI Batch object. These ACLs are based on records in the database security table (DBSECURITY). Each PI Batch object, PI Campaign, PI Batch, and so on, has a record that defines permissions. Note that permissions for PIUnitBatches and PI Subbatches are set by the record for PI Units.

Active Directory objects, such as event frames, have security descriptors that control access to the AF objects. Security descriptors are data structures that contain the ACL of the object, which includes all of the permissions that apply to that object. When someone tries to access the object, the operating system security-subsystem examines the object's security descriptor to see if access should be granted, and if the requested action is permitted.

When you migrate to event frames, the ACLs on the batch objects are translated into a Windows security descriptor for the event frame. The migration process takes any PI Identities that are mapped to the users and groups in the ACL, and uses them to define the Windows security descriptor. This security descriptor is used within AF to control access to the event frame.

Migration process

When you initiate batch to event frame migration, the conversion follows this outline:

  1. The archive subsystem walks through all the archives and generate events. PIUnits are explored first, and within each PIUnit the walk starts from the most recent PIUnitBatch and proceeds backwards in time.

  2. The events for PI UnitBatches are posted to an event queue.

  3. The archive subsystem generates events for all PIBatches, starting with the most recent and proceeding backwards in time. These events are posted to the queue.

  4. The archive subsystem generates events for all PI Campaigns, starting with the most recent and proceeding backwards in time. These events are posted to the queue.

  5. The AF Link tool starts reading these events and generating event frames.

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