Change system-wide default values for compression attributes
- Last UpdatedFeb 09, 2023
- 3 minute read
To avoid loss of significant changes for a PI point until the compression attributes can be tuned for each PI point, change Data Archive default values for the compression attributes.
Note: Changing Data Archive attribute default values is a global change that applies to all clients that create PI points without explicitly setting the attributes whose default values are changed.
To change compression attribute default values so that PI points created by the observer do not lose significant updates, the two primary strategies are:
-
Turn compression completely off for new points by setting the Compressing attribute to 0.
-
Change the CompDev attribute to zero or the smallest deviation for any new PI point.
Changing the CompDev attribute to 0 allows some compression. For PI points with CompDev attribute set to 0, Data Archive does not store successive identical values.
Alternatively, determine compression deviation for the data source measurement that has the smallest range of values. If the default CompDev attribute value is set to the smallest deviation, significant updates are archived for all points. However, measurements with larger ranges may archive more events than necessary.
The remainder of this section explains the procedure for changing default attribute values in Data Archive. Information about the piconfig utility is in the PI Data Archive Reference Guide.
-
Log on to the Data Archive computer using a Windows account that has Data Archive administrator privileges.
Generally, an out-of-the-box Data Archive installation gives the PI System administrator privileges to any Windows account that can log on to the local computer. If the Data Archive is secured as recommended after installation, you will need a specific Windows account, which you obtain from the administrator who secured the Data Archive.
-
Run a manual Data Archive backup.
Ensure that the files for PI Base and PI Snapshot subsystems are in the backup. Backing up archives is not necessary.
-
Open a Windows command window.
-
Choose (or create) a folder where you can create and edit files. In the command window, change the working directory to the folder by entering: cd folderPath
-
Start the piconfig utility by entering: "piserver%adm\piconfig". The piconfig utility issues a prompt that ends with PIconfig>. The double quotation marks in the command are necessary because the %piserver% environment variable usually contains spaces.
-
Enter the following commands:
-
@mode list
-
@tabl piatrset
-
@ostr attrib,type,default
-
@ostr ...
-
@outp original_defaults.txt
-
@sele set=base
-
@ends
-
@outp
Note: In the above piconfig commands, the argument for the second @ostr command is literally three periods. The first @outp command redirects output to a file and piconfig discontinues prompting. After the second @outp command, piconfig resumes prompting.
-
-
Use a text editor to open original_defaults.txt that piconfig created in the working directory for the command window.
-
Make the following revisions to original_defaults.txt:
-
Add the following lines to the beginning of the file:
-
@tabl piatrset
-
@mode edit
-
@istr set
-
@istr attrib,type,default
-
@istr ...
-
base
-
Note: In the above lines, the argument for the last @istr command is literally three periods and the last line does not begin with "@".
-
Remove the line for the digitalset attribute.
-
Change the line for the creator attribute to creator,uint32,0.
-
Change the line for the changer attribute to changer,uint32,0.
-
Add the following lines to the end of the file:
-
@ends
-
@mode list
-
-
-
Save the revised original_defaults.txt. You can use this file to restore the attribute defaults to the current values.
-
Copy original_defaults.txt as compression_defaults.txt and open compression_defaults.txt with a text editor.
-
Make one of the following changes to the compression_defaults.txt file:
-
To disable compression for all new PI points, change the line for compressing to compressing,BYTE,0.
-
For minimal compression, change the line for compdev to compdev,Float32,minDeviation where minDeviation is either 0, to compress only successive events with the same value, or the smallest deviation for any new PI point.
-
-
Return to the command window where piconfig is running and enter the following:
-
@inpu compression_defaults.txt
-
-
To verify that the attribute defaults changed, either:
-
Enter the following piconfig commands:
-
@mode list
-
@tabl piatrset
-
@ostr attrib,type,default
-
@ostr ...
-
@sele set=base
-
@ends
-
-
Use PI SMT as explained earlier in this section. Since PI SMT caches information from the Data Archive, you must open PI SMT after the attribute default changes are made with piconfig.
-
-
Enter @quit to exit from piconfig.