Back

Topic

[KB1130]HDS Files format

Tags: File Format, HDS

4 years ago
By HOTE
Options
Print
Applies to:PcVue 15 onwards

Summary:This document describes the content of each HDS configuration files.
Warning 1: Modifying manually these files can cause irreversible damage.
Warning 2: This article is only for internal usage, see with the referent before recommending any modification of these files.
Find also another article on HDS files (KB1129, HDS Files list).

Details:

HDS.ini file

[General] section
Parameter name Description Default value
DefaultMaxBufferedEvents Specifies the default value for MaxBufferedEvents parameter for each new project. It can also be defined in the “HDSConf.dat” configuration file of a specific existing project (see below explanation for this parameter). 20000
DefaultMaxPurgedRecords Specifies the default value for MaxPurgedRecords parameter for each new project. It can also be defined in the “HDSConf.dat” configuration file of a specific existing project (see below explanation for this parameter: MaxPurgedRecords). 30000
DefaultLocalDatabasesDir Specifies the default directory for databases.The default database directory specifies the location where the HDS creates all the databases files.If the first character of DefaultLocalDatabasesDir is “.” then the directory is consider as a relative path to the executable directory. In other cases the DefaultLocalDatabasesDir parameter is used as an absolute path. “..\Databases\”

HDSConf.dat file

[General] section
Parameter name Description Default value
DefaultDataConnectionType Type of database used if a default connection string is defined. 2 means SQL Server. 2
DefaultConnectionString Part of the default connection string with no security element requiring encryption. Used for any new database created in the project. “”
DefaultSecureConnectionString Part of the default connection string requiring encryption if needed (login and passsword of the sql user). Used for any new database created in the project. “”
UseUnicode Specifies how the HDS stores textual data in database columns.This parameter only affects the creation of SQL Server databases carried out by the HDS. SQL Server stores textual data in columns using two methods of character encoding: Unicode or Multi-Byte Character Set (MBCS).This parameter has the following 2 possible values:

  • 0 = MBCS encoding.
  • 1 = Unicode encoding.
0
QuickStop Specifies how the HDS is shutdown.When the application is shutdown it can take a considerable amount of time for the HDS to stop. This is because the HDS has to flush all the data in its memory buffers to the databases.It is possible to force the HDS to shutdown without flushing the data to the databases by setting this parameter to 1. This option can be very useful during the project development phase where the loss of data is not important.This parameter has the following 2 possible values:

  • 0 = The HDS is shutdown normally after flushing all the data in its memory buffers to the databases.
  • 1 = The HDS is shutdown quickly without flushing all the data in its memory buffers to the databases. If you use this option during the project development remember to remove it before the project is commissioned.
0
AuditSystemVariables Creates two new system variables:HDS.DataChangedCount: counts the number of data input (data to write) during the AuditSystemVariablesRate interval.HDS.WritedRecords: counts the number of data outuput (data written) during the AuditSystemVariablesRate interval. 0
AuditSystemVariablesRate Specifies the interval (in seconds) to refresh the HDS.DataChangedCount & HDS.WritedRecords. Every time the values are refreshed, the counters are reset. It could be interesting to know the values every 60 seconds and calculate the average number of records per second. 0
AutomaticStart If set to 0, the HDS is started but the connections to the Databases are not established. Can be used in developpement phase if you don’t want to generate records. 1
TraceFileFilter Mask of the information to write into the log file. See KB1131 for more information. 7
TraceFileSubFilter Sub Mask of the information to write into the log file. See KB1131 for more information. 0
TraceWindowFilter Mask of the information to show into the hds log dialog. See KB1131 for more information. 7
TraceWindowSubFilter Sub Mask of the information to show into the hds log dialog. See KB1131 for more information. 0
EnableUI Determines the displaying of the HDS user interface.The HDS user interface is accessible by double clicking on the HDS icon in the system tray.This parameter has the following 2 possible values:

  • 0 = disabled.
  • 1 = enabled.
1
EnableTraceWindow Determines the displaying of the “Trace” window in the HDS user interface.The “Trace” window enables some debug facilities in the HDS.This parameter has the following 2 possible values:

  • 0 = disabled.
  • 1 = enabled.
1
MaxBufferedEvents HDS can treat a certain amount of records at a time. Any record that cannot be treated immediately will be stored as a buffered event. This parameter specifies the maximum number of incoming events buffered for treatment by the HDS.When HDS reaches the MaxBufferedEvents value, it stops accepting new events from any source (Overflow).If this parameter is not defined the DefaultMaxBufferedEvents parameter value from “HDS.ini” file is used. Default value = DefaultMaxBufferedEvents value from “HDS.ini” file or 20000.
MaxPurgedRecords Specifies how the HDS manages the built in mechanism for limitation based on age of data for contingent purge.This parameter is taken into account only for SQL Server databases.When purging a database, SQL Server records all the transactions in the database log file (.ldf). If purging a large number of records this can generate a very large file.There are two ways in which purging may be managed, controlled by this parameter :

  • Using the SQL Server built in purge mechanism. The SQL server handles the purge itself with no limitation on the number of records purged. This has the potential to create problems if a very large log file is created. This mechanism will be used if MaxPurgedRecords is set to 0.
  • Using the HDS to purge records a block at a time. In this case the size of the log file is limited by the number of records in each block. When this parameter is not explicitly set to 0,  treatments for limitation based on age of data for contingent purge are divided up to treat only MaxPurgedRecords at once.

If this parameter is not defined the DefaultMaxPurgedRecords parameter value from “HDS.ini” file is used.

Default value = DefaultMaxPurgedRecords value from “HDS.ini” file or 30000.
MaxTables Specify the maximum number of tables loaded by a project. Maximum to set = 1000. 500
HistoricalLanguage Language ID used to store associated labels in historic. 1033
UseDefaultLocalDatabasesDir If this flag is set to 1 the default database path is the one specified in HDS.INI (DefaultLocalDatabasesDir parameter)If this flag is set to 0 the default database path is the one specified in the LocalDatabasesDir parameter in HDSConf.dat (see below) 1
LocalDatabasesDir Specifies the directory for databases.The database directory specifies the location where the HDS creates all the databases files.If the first character of LocalDatabasesDir is “.” then the directory is consider as a relative path to the executable directory. In other cases the LocalDatabasesDir parameter is used as an absolute path. “%SV Dir%\Databases\”
[Performance] section
Parameter name Description Default value
TimeSortingPeriod The time interval during which data will be stored in the buffer before being written to the database (should help reduce database fragmentation). 0
MaxBeforeRequery If TimeSortingPeriod is in use, every MaxBeforeRequery buffer written, the buffer is reinitialized to avoid memory loss (ADO bug fix) 200
MaxBookmarkInTable The writing buffer can contain MaxBookmarkInTable rows. When the buffer is full, writing to the database is triggered. This value should not exceed 1000 (limitation from ADO driver recordset management). 40
PendingRecordsPeriod If the number of pending records is bellow its maximum value (see MaxBufferedEvents parameter), every PendingRecordsPeriod, the pending records buffer is written in the database.Minimum = 1 000 (unit is ms) 10000
PassiveBufferPeriod Use for Archive Active Unique mode only.Maximum time to detect and trigger a switching on an association.Minimum = 1 000 (unit is ms) 30000
[MAINTENANCE_TASK\MaintenancePlanName] section
Parameter name Description Default value
Description Description as defined by user “”
ObjectOrigin Must stay at 0 for compatibility reasons 0
ObjectVersion Must stay at 0 for compatibility reasons 0
ReportVariableName Name of a trigger bit variable. Set to 1 during maintenance plan execution. Reset to 0 at the end of last maintenance task of the maintenance plan. “”
StationList Historical server list used for the maintenance plan execution. If the server list contains an active unique association of historical servers, only the active station will execute the maintenance plan. “”
JobName Internal name given to the maintenance plan. “HDS_PLAN01_MAINTENANCE_PLAN”
Inhibit Must stay at 0 for compatibility reasons 0
[MAINTENANCE_TASK\MaintenancePlanName\MaintenanceTaskName] Common section
Parameter name Description Default value
Description Description as defined by user “”
ObjectOrigin  Must stay at 0 for compatibility reasons 0
ObjectVersion  Must stay at 0 for compatibility reasons 0
UseDefaultDataBase 0 = The default database is not used1 = The default database is used 1
DataBaseName Name of the database used (can be left empty if the default database is used) “”
DataBaseTask 1 = EXPORT2 = PURGE3 = IDXDEFRAG (index defrag)4 =CUSTOM5 = SHRINK
ContinuePlanIfFailed Not implemented 0
Inhibit Must stay at 0 for compatibility reasons 0
StepIndex Index of the step for the execution order
[MAINTENANCE_TASK\MaintenancePlanName\MaintenanceTaskName] section (FOR EXPORT TASK ONLY)
Parameter name Description Default value
ExportHeader If = 1 then include columns headers in exported files 1
ExportPath Path used for export “”
ExportExtension File extension for exported files dat
ExportFormat File format for exported files1 = Text2 = ADTG3 = Xml 1
ExportDelimiter Delimiter used in exported files “;”
ExportNullValue Text used to replace null values in exported files “”
ExportTimeNumber Number of “ExportTimeInterval”
Min = 1
Max = 999
1
ExportTimeInterval 1 = Minute2 = Hour3 = Day4 = Week5 = Month6 = Year 3
ExportUseDefaultExportPath Use default path for export 1
ExportTimeShiftingNumber  Same as ExportTimeNumber, but for time offset configuration 1
ExportTimeShitftingInterval  Same as ExportTimeInterval, but for time offset configuration 3
[MAINTENANCE_TASK\MaintenancePlanName\MaintenanceTaskName] section (FOR PURGE TASK ONLY)
Parameter name Description Default value
TimeNumber 3
TimeInterval 1 = Minute2 = Hour3 = Day4 = Week5 = Month6 = Year 5
[MAINTENANCE_TASK\MaintenancePlanName\MaintenanceTaskName] section (FOR CUSTOM TASK ONLY)
Parameter name Description Default value
CustomMaintenanceValue  Contains the custom Transact-SQL script “”

HDSTrend.dat file

Parameter name Description Type
TRD_HDS Mandatory field. String
VariableName Variable name to set as trend. String
Description Description of this trend. String
UseDefaultDatabase Set to 1 to use default database otherwise set to 0. Boolean
DatabaseName Set database name to use. Not taken into account if UseDefaultDatabase is set to 0. String
UseDefaultTable Set to 1 to use default table otherwise set to 0. Boolean
TableName Set table name to use. Not taken into account if UseDefaultTable is set to 0. String
UseDefaultOpcGroup Set to 1 to use default OPC group otherwise set to 0. Boolean
OpcGroupName Set OPC group name to use. Not taken into account if UseDefaultOpcGroup is set to 0. String
LogicalGroupName Set HDS archive unit name to use. String
ConfiguredAsPrimary Configure trend as primary. Boolean
UsedAsPrimary Obsolete and  ignored. Boolean
ObjectOrigin Must stay at 0 for compatibility reasons. Long
ObjectVersion Must stay at 0 for compatibility reasons. Long
DisableInvalidTrendOnExit Do not record NS value on exit (default=0) Boolean
InhibitingVarName Inhibiting bit variable name String
InhibitingConditionTo1 Inhibiting condition.
– 1 : Trend is inhibited if InhibitingVarName bit value = 1.
– 0 : Trend is inhibited if InhibitingVarName bit value = 0.
Boolean

Ex:
TRD_HDS,BUILDING.FLOOR_02.ROOM_002.AC.SETPOINT,,1,,1,,1,,U_DB1,1,1,0,0,0,,1
TRD_HDS,System.DATASERVER2,description of the trend,0,DB1,0,TRENDTABLE1,0,TRENDGROUP1,U_DB1,1,1,0,0,1,GENERAL.Inhibit,0

Created on: 19 Aug 2021 Last update: 12 Feb 2026