<< Click to Display Table of Contents >>
Table Configuration |
To access the configurations of the table used by a Storage, right-click this object in Organizer and select the Properties option to open the window on the next figure.
Storage tab
Each option on the Storage tab has a corresponding property. The available options on this tab are described on the next table.
Available options on the Storage tab
Option |
Description |
---|---|
Database Server |
Defines a Database server. This option is equivalent to Storage's DbServer property |
Defines a table name. This option is equivalent to Storage's TableName property |
|
Discard data from the main table |
Enables or disables discarding data from the main table. Data is considered old according to the Discard data older than option. This option is equivalent to Storage's EnableDiscard property |
Discard data older than |
Determines a time interval, in minutes, hours, days, or months, during which data is kept on the main table. If data is older than the interval on this option, it is discarded. This option is equivalent to Storage's DiscardInterval property and the option to select a time unit for this interval is equivalent to Storage's DiscardTimeUnit property |
Perform discard every |
Determines a discard interval, in minutes, hours, days, or months, for old data on a table. This option is equivalent to Storage's VerificationUnit property |
Move discarded data to the backup table |
Enables or disables storing discarded data on the secondary or backup table. This option is equivalent to Storage's EnableBackupTable property |
Discard from backup data older than |
Determines a maximum time interval, in minutes, hours, days, or months, for data on the backup table until it is discarded, regardless of the time data remains on the main table. For example, to keep data for 24 months on the main table and six more months on the backup table, this option's value must be 30 months. This interval must be longer than the one configured in the Discard data older than option of the main table. This option is equivalent to Storage's BackupDiscardInterval property and the option to select a time unit for this interval is equivalent to Storage's BackupDiscardTimeUnit property |
Create Table |
Generates this table structure on the Database. This option is also available by right-clicking a Storage object in Organizer and selecting the Create DB Structure option |
After defining all table configurations, click Create Table. This action creates a table structure on the database.
The table structure of a Storage is similar to a Historic table, with a table of definitions, a main data table, and a backup table, if selected. For users to identify externally that it is a compressed table, check if the _Fields table was created.
_Fields table
This table contains the Fields described on the next table.
Field |
Description |
---|---|
FieldDeadBand |
Dead band |
FieldDeadBandUnit |
Dead band unit, as a percentage of the previous value or as a percentage of engineering limits (a fixed value) |
FieldDescription |
Field's description |
FieldEU |
Engineering unit |
FieldHighEng |
Tag's higher limit |
FieldID |
Index of a Field registered on a Storage |
FieldLowEng |
Tag's lower limit |
FieldMaxRecTime |
When this time expires, data must be stored automatically |
FieldMinRecTime |
Minimum variation time to store data |
FieldName |
Field's name |
FieldQuality |
Field's quality |
FieldScanTimeMs |
Scan time that must be used to rebuild Tag's chart, in milliseconds |
FieldSize |
Field's size |
FieldSource |
Link used by this Field to obtain its values |
FieldType |
Field's data type |
FieldVARTYPE |
Field's native data type. Possible values are 0: Undefined, 3: Integer, 5: Double, 8: Text, or 11: Bit |
Storage implementation allows users to not worry about how data is stored on tables. However, for a better understanding on how this module works, and also to allow access to other programs, the format of a table is explained next.
Options for table management described in the previous item actually apply to three table sets generated by a Storage, according to the Table Name option.
This happens because, for every type of stored magnitude, a set of tables is automatically generated: a set for analog Tags, another one for texts, and one more set for digital Tags. This way, every Storage can manage up to seven tables, if users specify that three types of Tags must be stored:
•<TableName>_Fields
•<TableName>
•<TableName>_Text
•<TableName>_Bit
•<TableName>_Backup
•<TableName>_Text_Backup
•<TableName>_Dig_Backup
The _Fields table contains a description of Fields to store, which usually store the same information defined in Storage's Fields configuration, in addition to link an automatic index to each Field. All other tables have a fixed format:
•E3TimeStamp: Field that stores date and time of a Tag variation. If the communication protocol supports sending time information, this Field contains a device's timestamp
•Quality: Contains information about point's quality (Bad, Uncertain, or Good), according to its usage in Elipse Power and also according to OPC standards
•Index: Creates a relationship between the stored Field and its respective name stored on the _Fields table
•Value: Stored value. For an analog table it is a Double-type Field, or a real number. For a digital table it is an integer number, and for a text table is a variable-sized NVARCHAR Field, as specified in the StringFieldSize Field