Datalogs
Datalogs are used to store historical values of tags in the configured database for historical reporting.
Sym3 doesn’t supply any means to access the datalogs in storage. Datalogs are only accessible by querying the database table DimDatalog directly.
The amount of datalog samples,, the max number of days in storage and cached is configurable. See “Server Settings”
To enable Datalogs you MUST change the value of Enable Datalog from “false” to “true” in AlarmServer Configuration settings.
Please note that enabling Datalogs are NOT dependant upon a client, Datalogging is performed on the Server and continues to log even if no clients are connected.
Create a new Datalog (+)
New Datalogs can be created in Sym3 using the Datalog Manager that can be accessed with Ribbon > Home > Datalogs
Click on + creates a new Datalog with a default name (Datalog1) in the Datalog Manager Panel. Double-click on this name to change it. This name has to be unique in this list.
Delete a Datalog (-)
Open the Datalog Manager, select the entry to be deleted and click on -
A confirmation screen will appear, ensure this is the correct Datalog and click Yes to delete it.
Delete all Datalogs (-*)
Pressing this button prompts the user that they will be deleting all Datalog. A Yes response removes all Datalog from the list. This is most often used to clear all Datalogs before a re-import to update some changes.
Import Datalogs
Opens a file open window that should be browsed to a suitable CSV Datalog import file. If any inconsistencies or errors are encountered then these appear in a window and no Datalogs are imported.
Export Datalogs
Opens a file open window that should be browsed to a suitable location to save the CSV Datalog export file. You can export invalid or faulty Datalogs.
Search
The Search field provides a filter such that only Datalogs matching the filter are displayed in the list. To see all Datalogs, ensure this field is empty.
Datalog fields
Each of the Datalog fields displayed in the Datalogs Manager Panel are:
Name | Description |
---|---|
Name | Unique name of the Datalog |
Expression | Expression to evaluate. See “Expressions” |
Editing a Datalog
- Clicking on the Property Editor option in the Ribbon bar to open the Property Editor Panel.
- Either select an entry from the Datalogs Panel or, from the Project Explorer panel, select Datalogs to open the Datalog manager
The settings for the selected Datalog will appear in the Property Editor Window and allow changes to its properties:
Name | Description |
---|---|
Name | Unique name of the Datalog |
Expression | A Datalog MUST have an expression. Expression to evaluate. See “Expressions” |
Equipment | Select from a list of the equipment in the Project |
Equipment Property | Equipment property name |
Sampling Type | Select one of:
|
Sampling Period | Sampling Period in seconds. Only applies to Periodic Sampling type. When this time expires a new entry for the value will be written into the table, changed or not. This value can not be set shorter than 1 second to preserve performance. Keep this value as large as possible to avoid performance issues. |
Store Data Type | Select the storage type from one of:
|
Import/Export file structure
The Datalog file for both Export and Import should have a CSV structure similar to:
Name,Expression,Equipment,Equipment Property,Sampling Type,Sampling Period,Trigger,Store Data Type
Datalog1,Shape1.Color,,,Periodic,1,WhileActive,Byte
Datalog2,true,Shape2,Color,Periodic,1,WhileActive,Short
Shape3,%this.Name%.Color,Shape3,Color,ValueChange,5,WhileActive,String
Datalog4,Shape4.Color,,,ValueChange,10,WhileActive,Double
SQL tables
For each valid Datalog entry there will be:
- One record in the DimDatalog table describing the Datalog parameters and the associated table name for the samples.
- A new table with the name of ‘Datalog_’ + Datalog name + ‘_’ + Store data type. e.g. A Datalog with the name ‘Shape3’ and a type of ‘Boolean’ will have a table name of ‘Datalog_Shape3_Boolean’. This table contains all the sample for this datalog within the AlarmServer Server storage limits.
- For each sample in the Datalog there will be a record with the fields:
- LogTime: Time stamp for the sample (in CCYY-MM-DD hh:mm:ss.ccc format)
- ItemValue: The value at the time the sample was taken.
- Quality: The current quality for the Tag. A zero indicates a Good (reliable) quality while any other value indicates potential uncertainty in the value it returns. 192=Simulated?
Diagnostics
when successfully configured, the Datalog entry should create tables and sample records in the database specified in the config file. If this does not happen then check these steps:
-
Ensure the Sym3 Alarm Service is running. The client usually displays an error if not able to connect to the Alarm server.
-
Open the ProgramData\Sym3\Sym3 Operator\Logs\Sym3.Alarm.Server.Config.log and check for a timestamped entry of “Processing X datalog configuration” which should reflect the same number of DataLog entries. If it does not match then a DataLog entry may not have been configured correctly.
-
Open the Settings > Alarm Server page of the Server Settings Web setup and check the values for
-
Enable Datalog = ’true’ - Default = False.
-
Database Type = ‘SQLServer’ - Ensure SQLServer is selected to create the tables
-
Connection String - Ensure valid settings for a database connection. The default connection string is:
Server=localhost;database=DATABASE_NAME;Integrated Security=SSPI;
-
Make sure you have replaced DATABASE_NAME with a valid database name in this string as this is the default value and will not work as it is. Verify the Server IP address is the IP address for the database server.
-
-
Open the file ‘Sym3.Alarm.Server.Database.log’. If you have the error:
Failed to create NHibernate session factory - An invalid or incomplete configuration was used while creating a SessionFactory.
This indicates you do not have sufficient access rights to the Database table specified. To confirm this, open the file ‘Sym3.Alarm.Server.NHibernate.log’ and look for the entry;
Login failed for user 'NT AUTHORITY\SYSTEM'.
A user other than NT AUTHORITY\SYSTEM may appear. See “SQL Settings” for details on assigning appropriate user rights for this user.
After making changes to the user access rights, the Alarm and Operator Servers should be restarted to take effect. Check that the tables are created in the specified database once the servers are started.