Create multiple elements that reference PI points automatically
- Last UpdatedDec 13, 2024
- 3 minute read
- PI System
- PI Server 2024 R2
- PI Server
When you create multiple attributes that reference PI points, you can use template features to automatically create the points. For a complete example of how this works, see Create multiple elements linked to new PI points.
-
In PI System Explorer, define a template for the elements (or update an existing template).
In the template definition of attributes that reference PI points, configure the points for automatic creation:
-
Use substitution parameters, such as , in the point-name specification.
-
Select the tag-creation setting.
Later, when you create elements from this template, PI AF will generate the point name from your specification and create the referenced PI points on Data Archive. As shown in subsequent steps, you can use PI Builder to initiate the point creation or use PI System Explorer.
-
-
In Excel, set the worksheet column headers:
-
On the PI Builder tab, in the Resources group, click Headers to open the Select Object Types and Column Headers window.
-
From the Object Type list, select Element.
-
Click Clear All to clear selected object types except those in the Required Columns group (you cannot clear the required columns).
-
In the Object Types list, expand the Element group, and then select the Template check box and any other columns that you want in the worksheet.
-
In the Attribute Columns group, select the attributes that you want to configure.
When creating multiple elements, you will find it easier to work with attributes displayed in columns of the parent element's row. If necessary, select a different template from the Template list to show available attributes in other element templates.
-
Select any other items that you want to configure.
-
Click OK.
PI Builder adds the selected columns to the worksheet.
-
-
In the worksheet, define the elements you want to create:
-
In the second row, enter values to define the first element.
-
Copy the second row and paste to use as the basis for other elements.
-
Edit subsequent rows to define elements.
You might:
-
Change the element names.
-
Specify an element path in the Parent column to create a hierarchical structure (see Learn about child elements).
-
Make other edits.
-
-
Publish the elements to PI AF:
-
On the PI Builder tab, click Publish to open the Publish Options window.
-
From the Edit Mode list, select Create Only.
-
Select the Create or update PI points check box to request that PI Builder automatically create the PI points that the published elements and attributes need.
If you do not select this check box, you must create or update PI points after publishing the elements.
-
Click OK to publish the elements in the worksheet to PI AF.
PI Builder creates the elements in PI AF and automatically checks in the changes.
-
-
If necessary, create or update PI points.
To use:
Then:
PI Builder
See Create PI points.
PI System Explorer
-
Open PI System Explorer.
-
Select the database in which you created the elements.
-
In the navigation pane, click Elements.
-
Right-click the element that contains the PI point data reference, and then click Create or Update Data Reference. (To generate PI points for multiple elements, right-click the parent element and then click Create or Update Data Reference.)
-
Click Check In to check in your work.
-
This procedure creates all the points that the new elements reference. This only works because the elements were based on a template and the attribute template for the data reference uses the tag-creation option.
Note: After PI System Explorer creates the PI points, it might take some time before the specified interface writes values to Data Archive. Until then, the values appear as Pt. Created.