Datalogger Manual
Status:
This information applies to Datalogger version 1.43.237.177. (8 juli 2021)
New for this version: Added support for simultaneous logging to CsLog2020.
Contents:
Other links:
Other links:
Overview
The DataLogger logs ConSys data to SQL log databases. Data can be logged to either the original ConSys log database from 1998 and/or the new SQL log database, CsLog2020. The parameters to log are setup in groups. All parameters in a group is logged together at fixed intervals set with the group. Logging can be enabled/disabled based on conditions set by ConSys parameters. ConSys data from log parameters are requested from ConSys at each log period.
CsLog2020 use internal buffers to store log parameters. There is a log buffer for each logged parameter. When a buffer for a log parameter is full a new log buffer is created, and the full buffer is transferred to an internal que to be written to the ODBC log database. At regular intervals (every hour) all active buffers are transferred to the write que and new buffers are created for all parameters. This to ensure that loggings are not getting to old before they are written to the ODBC log database. When logging is stopped – or the DataLogger closed – all buffers are written to the ODBC log database.
Log Tree items
Logging types:
: Timer Loggings - Root
tree for all time based loggings
: Independend loggings
- Loggings defined by dataserver criteria's - not implemented yet.
Timer loggings, Log Groups:
The parameters in the sub tree of a log group is logged together when the log group is active. The logging interval - as well as the log conditions - is defined in the log group. All parameters logged at in the same log group will be logged with identical timestamps. The log group icon show the state of the log group:
: Logging is inactive.
: The log group is
disabled - no loggings made for this group.
: At least one of the
parameters used in the log conditions for this group is not getting data - or
has invalid data. Could be due to incorrect parameter definitions or missing
connection to the ConSysLoader instance for the condition parameter. NO DATA IS
LOGGED IN THIS STATE.
: The log condition is
not fulfilled - no data logged.
: Log conditions
fulfilled - logging active.
Log Items:
Parameters to be logged. All data is logged as floating point values (bits and words converted to floating point). The log item icon show the state of the item:
: Logging is inactive.
: The item has valid
log data - and is logged if the group logging condition is fulfilled.
: The data for this
parameter is not valid. Could be due to invalid data from device, invalid
parameter name or missing connection to the ConSysloader instance for the
parameter. NO DATA IS LOGGED FOR THIS PARAMETER IN THIS STATE.
Logging control and status
Before logging is started by ‘Log’ the SQL database to log to must be selected. It is possible to log to either the ‘Original Log Database’ or ‘CsLog2020’ or both databases. Select ‘Enable logging’ for the databases to log to. The ‘enable’ settings are stored with the DataLogger setup file.

Status for CsLog2020:
Parameters are only logged by the DataLogger if they are belonging to a log group with log type set to ‘Data Logger’.
The log group for a parameter is set in the configuration database in the parameter table.
#logged parameters: Number of parameters being logged to CsLog2020 – i.e. belonging to a log group set to log with DataLogger.
#not logged parameters: Number of parameters not being logged because they are not in a log group set to log with DataLogger.
ODBC connection, errors, con.failures: Status of the CsLog2020 ODBC database connection. Lists total number of errors. If a ODBC write fails log data is not list - the failed buffer(s) are keept in the DataLogger until writing to the ODBC database is succesfull.
#Buffers wait write: Number of CsLog2020 buffers that are full and are waiting to be written. 0 as long as ODBC connection is ok and all buffers are written as they are ready.
Total #buffers written: The total number of CsLog2020 buffers succesfully written to the Log Database since logging stated.
Total #values written: The total number of parameter values succesfully written to the Log Database since logging stated.

The two lists ‘CsLog2020 Logged parameters’ and ‘CsLog2020 Not logged parameters’ lists the parameters being logged/not logged. The first number after the parameter name in the lists is the log group id. The second number is the parameter id.
Status Cluster
To avoid two instances of the DataLogger is running and making duplicated loggings in the log databases, a ‘Status Cluster Name’ can be specified. The status cluster is a ConSys parameter cluster that must have the following parameters:

cRun: A storage device control bit. Set TRUE by DataLogger when logging is started – and FALSE when logging is stopped. If TRUE when trying to start logging the logging can not be started and an error message is shown. The logging will start when/if cRun becomes FALSE.
aliveOLogPeriod: A storage device pulse count word (a0:10). When DataLogger is logging to the original database a value between 300 and 310 is written to this parameter every second to signal that the data logging is active. When the data logging is stopped, the value is set to zero.
sOLogRun: The storage device alive bit (a0=9) corresponding to aliveOLogPeriod. When active, another DataLogger using the same cluster can not be started. Will start when/if this bit becomes inactive
aliveCs20Period and sCsLog20Run: Like aliveOLogPeriod and sOLogRun for CsLog2020.


Command line
start options
DataLogger <filename>:
/start or /s:
/dsn=<DNC name for ODBC log database>
Command line sample:
DataLogger /start /dsn=ConSysLog_9808 "\\isa\data\Astrid\Setups\Data Logs\DefaultLog.cdl"
Last Modified 08 July 2021