Creating a template
A template (ASCII file containing the master data point with the configured dynamic attributes of the PowerConfigs) is always created by starting from the defined data point type in the PARA module. Right-click on a data point type whose master data point contains PowerConfigs and select the option Create template (1DP/ line) for exporting the ASCII format V 3 resp. the entry Create template (1DPE/line) for the format V 4 from the context menu that opens.
Alternatively, you can right-click in an empty area in the PARA module (not on a data point type) and select the option Create all templates (1DP/line) for V 3 resp. Create all templates (1DPE/line) for V 4 in order to generate all the templates for the data point types defined in the project (that have a master data point). A file in the format V 3 is created per data point type. In the format 4, there is only one file that contains the master data points of all data point types.
A panel opens in which you can define the template name and select the destination path for the ASCII file.
Under Template name, enter the name that you want to for the file. The name of the ASCII file is finally composed of: ”Template name” + ”data point type name” in the format V 3. The naming of format V 4 is composed of defined template names. The extension of the file in both formats is .ascii.
The default Template path in which the file is created is <proj_path/dplist>. If necessary, the destination directory can also be changed in the "Browse" dialog box (click on the browse button displaying the folder icon). Once you have entered all the information, click on OK; the ASCII Manager runs in the background, initiating generation of the ASCII file. Cancel closes the panel without creating a template (ASCII file). The use of the panel for creating a template with format V 4 does not differ from the panel pictured above.
Open the generated file in a text editor (for example, EmEditor). The file might look like this for instance:
The format (V 3) appears in the 1st line/1st column. The 2nd line/1st column contains the string "TypeName", and the 2nd column contains the name of the data point type from which the template was generated. In a template the dynamic attributes of the master data point and its parameter settings are exported (this is shown in the next 4 comment lines). Thus new data points having different parameter settings for the dynamic attributes can be created quickly using the template (simply insert a number of lines in the ASCII file and make the required changes).
The structure is built up line-by-line, i.e. each data point is displayed in a new line. The dynamic attributes are divided into columns. In the screenshot above, a template has been created from the data point type valve. The dynamic attributes of the PowerConfigs for this valve data point type are:
-
Which archive is being used - attribute _class (data type string)
-
Is archival enabled - attribute _archive (data type bool)
The letter specified in the Action column on the far left determines what is to happen to the individual lines (data points) when importing the file:
-
I - Ignore: This line is ignored at import. Any changes to the data point are not updated on the system.
-
M - Modify: The changes made for this line (for example, archival disabled, new units specified etc.) are updated in the database when this ASCII file is imported. New data points can also be created at import. This is simply achieved by inserting extra lines containing the settings for the dynamic attributes that are required for the data point. Attributes whose values have already been configured at the master data point as fixed, are also adopted from this master data point when a new data point is created. The chapter Creating a DP list shows a file containing multiple lines (data points).
-
D - Delete: Deletes the data point defined with this letter in this line. Deletion of the master data point "_mp_" is not supported (if this option is meant to be set for the master data point, an error message is output by the ASCII Manager after the import). Using the V 3 ASCII format you can also delete data points that do not belong to the data point type from which a template/DP list was created. Insert the following line in the ASCII file:
D[TAB]Data point name[ENTER]
A tab must be inserted between "D" and the data point as delimiter. Confirm the input at the end of the line with the Enter key.
Open the generated file for the format V 4 in Excel (For details on Excel functions, see Excel tools, basics). The file was opened in Excel for a better overview. You can of course also open it with an Editor (see the figure above - Generated template for the format V 3 displayed in the Editor). The file could , for example, look like this:
The format (V 4) is in the 1.line / 1.column. The ”r;TypeName” is in the 2.line/1.column. In this template the dynamic attributes of single data point elements at master data point are divided into columns (all the PowerConfigs used in the project with dynamic attributes are taken into account when exporting and the smallest common denominator consequently builds the number of columns in the file, i.e. the file never contains more columns than the number of available dynamic attributes in the project.) The structure is built up per line which means that a data point element is displayed per line. Since there can be several data point types in the file in format V 4, the right membership of different data point elements is displayed via the ”r;TypeName” column. In the figure above a template of data point type Valve was created with the same configuration (PowerConfig ”r;Archiving” with the dynamic attributes ”r;_class” and ”r;_archive”) as it was used when exporting in V 3 (see above).
New data points with different configurations at the dynamic attributes can be created quickly via the template (easy insertion of several lines into the ASCII file and you can make the desired changes). When importing a modified file, only the values that already show a corresponding configuration at the master data point are taken into account. The comment columns show which fields are alterable (for example, in the figure the gray marked column ”r;# Periphery address"). If a cell of this column contains a value (for example, ”r;OPC input”) the on the right side following columns are alterable and are taken into account by the ASCII manager when importing. If no possibility for changing exists, the fields are marked with ”r;---”r;. The ASCII manager ignores these dynamic attributes with the adjusted values during the import also when such fields are provided with values and the file is saved. The configuration in the example above allows the change of archive settings for each new created line (move the scroll bar in Excel to the right until the comment column "# Archive settings" is displayed).
The letters in the column Action have the same meaning while using the format V 4 as in V 3. The letter "D" (Delete) constitutes an exception in the format V 4. The deletion of a data point element/line with the ASCII Manager is not supported with the format V 4.
For more information on working with templates/DP lists in format V3 resp. V4, see also the chapter Examples of working with templates/DP lists).
When exporting multilingual texts (for example, description), these must appear in the ASCII file enclosed in quotation marks. The quotation marks for multilingual texts are also important when importing a file (see also figure of the Excel sheet at the bottom of the page Example of mass configuration).