| Name | Identifies the Data Logger session. The name must be unique within the project. The name must consist of normal letters and the characters "-", ".", and "+". Other special characters are not allowed. |
| Type | Defines the name of the data sink where the recorded data is stored. For each configured Data Logger
session, one data sink is created.Possible values are:
- Database: The data sink is an SQLite database which is first published in the controller RAM and then written to the SD card (according to the value of the 'Write Interval' parameter described below).
As a result, a remanent log file is created whose name is derived from the session name. On the SD card, the database is stored under /opt/plcnext/logs/datalogger/<LogSessionName>.db. You can access the log file via suitable file transfer tools (e.g., WinSCP or ftp tools).
- TSDB: The data sink is a time series database (TSDB) which is located on the controller. In the time series database, the data values of the selected ports and variables are collected and stored.
- Volatile: The data sink is non-remanent. It is published in the controller RAM. The records are not transferred to the SD card and are deleted on a controller shutdown.
Access to the volatile data sink in the controller RAM is possible via PLCnext firmware functions and Remote Service Calls (RSC). The RSC interface allows the communication with the PLCnext core components. Via the ServiceManager which acts as RSC API you can request services, for example to read data from the GDS.
Default value: Database |
| Sampling Interval (ms) | Defines the interval in which the Data Logger subscribes values. A value of 0 means that the task cycle time is used as interval time.The value must be in the following range (enter the value with the corresponding unit, e.g. 10ns): ns: 0 up to 9223372036854775807 µs: 0 up to 9223372036854775807 ms: 0 up to 9223372036854775 s: 0 up to 9223372036854 m: 0 up to 153722867280 h: 0 up to 2562047788Default value: 100ms |
| Publish Interval (ms) | Defines the interval in which the data is transferred from the data buffer to the data sink. Note that the data publishing is not
performed within the real-time context. See next table row for further information.The value must be in the following range (enter the value with the corresponding unit, e.g. 10ns): ns: 1000 up to 9223372036854775807 µs: 1 up to 9223372036854775807 ms: 1 up to 9223372036854775 s: 1 up to 9223372036854 m: 1 up to 153722867280 h: 1 up to 2562047788Default value: 200ms |
| Buffer Capacity (cycles) | Determines the size of the data buffer (in no. of cycles) where the recorded values are cached before they are forwarded to the specified data sink. Value range: 0 up to 65535 Default value: 10Background: In each cycle, the values of all recorded data items of a task are stored temporarily in this ring buffer. The capacity
of the ring buffer determines the maximum number of task cycles that can be recorded before the data must be transferred from the buffer to the data sink. The transfer from the buffer to the data sink is referred to as publishing. |
| Rollover | Defines the handling of data sink files.
-
activated: Once the maximum file size is reached, the file is closed and renamed with an
index starting from 0 (e.g., <LogSessionName>.db0, <LogSessionName>.db1, etc.). Then a new file is created. Every file with
an index is closed and can be copied for evaluation. The current data is always logged
in the database of this session.
-
not activated: Once the maximum file size is reached, a configurable
amount of the oldest records is deleted before the record proceeds. The amount of
data to be deleted is configured with the parameter 'Delete Ratio (%)' (see below).
Default value: not activated |
| Write Interval | Specifies how many data
records are published to the data sink before these values are written to the file on the SD
card.The parameter is only relevant if 'Type' is set to 'Database'. Before closing the database or when the machine controller is switched off, all recorded values
that have not yet been transferred are written to the SD card.
Note
The default value is 1000 to keep write access operations to the SD card as low as
possible. The lower the Write Interval value, the higher the frequency of write accesses to the SD card. A high number of write operations to the SD card may cause performance problems. Possibly, the data cannot
be written to the SD card at the required speed. This may result in the loss of recorded data.
If a low write interval is necessary but leads to performance issues, it may be useful to use a non-remanent data sink in the RAM by setting 'Type = Volatile'. |
Note
Observe the section "Evaluation of the data base for consistent data" below this table. |
|
| Max File Size | Defines the maximum memory size of the log file in bytes. Value range: 16384 up to 150000000 bytes Default value: 5000000
Note
If the value range is exceeded, no log is file created. |
|
| Max Files | Defines the maximum number of rolling files.
The value is only relevant, if the 'Rollover' checkbox is activated. When the maximum number of files is
reached, the oldest file will be deleted. The file index of the closed files will be counted
up further.
Possible values: Value range: -1 up to 4294967295 Default
value: -1.
- 0: The behavior corresponds
to a deactivated rollover ('Rollover' checkbox not activated).
- 1: rollover is activated. If the maximum file size
is reached, a configured amount ('Delete Ratio') of the oldest data in the
database is deleted.
- Integer number > 1: Number of rollover files.
- Negative integer number: The file number limitation
is deactivated. This results in logging activity until the memory is full.
|
| Store Changes | Defines the recording mode.
-
activated = record on change:
The Data Logger only records data when they change. If a value does not change, the value NULL is written to the data base.
-
not activated = endless mode:
Values are recorded continuously in the set interval, independently whether they change or not.
Default value: not activated |
| Delete Ratio (%) | Defines the percentage amount of the maximum memory size to be deleted for the logging of new data before new data is written into
the database. The old data is deleted when the value that is defined via the Max File Size parameter is reached and the 'Rollover' checkbox is not activated. Value range: 1 to 100 (integer value) Default value: 30 |
| Timestamp Format | Possible values:
- ISO 8601
- RAW = 64 bit integer
value
Default value: RAWEach recorded port/variable value is stored with a timestamp in the database. Each item of the same task has the identical time stamp. The timestamp is created in the task cycle based on the system time of the controller. It is set at
the start of the task (task executing event) and maps exactly the cycle time of the task. As a result, the timestamp value of the following task cycle is increased by one cycle duration. The time resolution has a precision of 100 ns.Despite the format, all timestamps are reported using the UTC timezone. The implementation
and internal representation complies to the .NET DateTime class, see Documentation
of DateTime Struct on https://docs.microsoft.com.
|
| Trigger Condition | Defines whether the value sampling is done in the context of a selected task or not.
-
activated = sampling is done in the context of the selected task.
-
not activated = sampling is done in fixed set intervals (parameter 'Sampling Interval').
|
| Task Context | The field is only active if the checkbox 'Trigger Condition' is marked.Select the task in which sampling is to be performed from a drop-down list. The drop-down list offers all task types for selection. The task defines the update rate of the recorded values. Values are subscribed after each cycle of the selected task. The properties of the set task influence the Data Logger session because the subscription rate depends on the cycle time of the synchronization task. If an 'Idle Task' is selected, the visualized values may be inexact or outdated since the cycle time of the
'Idle Task' may vary (depending on the other user tasks on the controller). An 'Event Task' may be executed not cyclically depending on the defined event. |
| Pre Cycles | The field is only active if the checkbox 'Trigger Condition' is marked.Specifies the number of sampling cycles recorded before the trigger event (default value = 10 ms). As soon as the trigger event has occurred, the data recorded during the "pre-trigger cycles" are stored. |
| Post Cycles | The field is only active if the checkbox 'Trigger Condition' is marked.Specifies the number of sampling cycles recorded after the trigger event (default value = 10 ms). As soon as the trigger event has occurred, the data recorded is continued during the number of defined "post-trigger cycles". If this number has been reached, the session is stopped automatically. |
Operand 1 and Operand 2 | The fields are only active if the checkbox 'Trigger Condition' is marked.Variable or port used as trigger condition.Depending on the set operation, one or two operands have to be defined.Open the drop-down list which offers only data items of a suitable data type according to the 'Operation' selected. To define a constant as operand, enter a numeric value, or a Boolean value (FALSE or TRUE). |
| Operation | The field is only active if the checkbox 'Trigger Condition' is marked.Select an 'Operation' from the drop-down list. Depending on the set operation, one or two 'Operands' have to be defined. |