Skip to main content

i4scada Knowledge Base

i4scada Logs

Abstract

A signal log definition configures the method of storing the value of a signal depending on a condition. If the log condition is fulfilled, the signal value is logged.

Signal Logs can be defined using the dedicated view located in the Logging section of the Studio. The Logging view displays the list of existing signal logs and allows the user to add new ones.

Capture2079.jpg

Logging panel

A signal log definition configures the method of storing the value of a signal depending on a condition. If the log condition is fulfilled, the signal value is logged. It also defines the duration of storage, the maximum number of logs for the same definition and the database to be used as storage, compression testing, and exception reporting.

Right-clicking on the Logging item in the Logging tree menu will open the contextual menu. The Logging contextual menu provides a single option for creating new log definitions.

Capture1642.jpg

Logging contextual menu

Contextual menu of Logging node

Description

New

Creates new log definition.

Right-clicking on an existing log definition listed in the main panel will open the contextual menu, providing the options to edit, add or delete log definitions, import and export log definitions, expand or collapse the Logging Details panel and refresh the log definitions list.

Capture1646.jpg

Listed Logging contextual menu

UI Option

Description

Edit

Edits the cell in which the contextual menu has been opened (where the user right-clicked).

New

Creates new log definition.

Delete

Deletes the selected log definition.

Export

Exports the current log definitions in an XML format.

Import

Imports log definitions in an XML file.

Condition Details

Expands / collapses the Logging Details panel.

Refresh

Reloads the list of log definition.

Further on, the Logging Details panel is split up in 3 TABs, that allow user with possibility to define specific Logging attributes:

  1. General TAB - contains general attributes that define the Log:

    • Active - if enabled, the Log is taken into account by the i4scada Server. Otherwise, the Log is ignored. 

    • Log Tag - is the name label of the Log.

    • Signal Name - represents the Signal that will be logged using this definition. The Signal is selected when creating the Log definition, but can be updated by clicking the Signal Browser button Select_signal.jpg.

    • Description - an additional description for the log.

    • Condition name - Name of the Logging Condition. Selection of the Condition name is done from the drop-down list.

    • Max Days - represents the number of days to keep the Log before purging. The first logged value reaching this specified age will be deleted when a new value is stored.

    • Max Numbers - represents the maximum number of Logs to be stored. Once this number is reached, the oldest logged value will be deleted when a new one is stored.

    • Log Database - Name of the database where the Logs will be stored. If no database is specified, the logs will be stored in the default project database, inside the dedicated table.

    • IoT enabled - if enabled log must be accessed using the IoT Hub. 

    TAB_general.jpg

    Logging General tab

  2. Compression TAB - allows the user to enable / disable Logging compression. 

    Scope of Compression logging is to enhance data storage efficiency and thereby conserve disk space. The compression uses an algorithm, called the Swinging door to determine which logs should be stored in the archive.

    The Swinging door algorithm is based on 3 values: most recently archived signal value, the current signal value and the incoming signal value. 

    • Compression Algorithm - if value is "None" the compression logging function is turned OFF. To enable Compression logging, it is required to set the SwingingDoor algorithm, using the drop-down list.

      Note

      Turning compression OFF is not recommended. However, doing this can become appropriate in case of laboratory or manually entered  values, where each log / event is important. Setting compression to "None" all exceptions are archived.

      An alternative to turning compression off is to set the SwingingDoor algorithm but leave the Compression deviation to 0. In this case, successive identical values (or values aligning perfectly along a line) are not archived.

      For example, if a value of "High" is sent to the archive followed by another "High" value, the second value is not added. As another example, if a sequence of values "1", "2", "3", "4" occur at even time intervals, the 2 and 3 are not archived because their values can be calculated from the slope between 1 and 4.

    • Compression Deviation - This is the most significant compression parameter representing the half-width of the deviation blanket. The deviation blanket is extended between the last recorded value and the new value, with a width equal to twice the compression deviation specification. The Compression Deviation can be expressed as floating point values, by manual input or by using the increase / decrease arrows.

    • Compression Maximum Time Interval - The compression maximum time is usually set to one value that covers all points in the system. It should be large enough that a point that does not change at all uses very little archive space. For example, a compression maximum time of one work shift (8 hours) is often a good choice. The unit of measure for the Maximum Time Interval is the millisecond.

    • Compression Minimum Time Interval - The compression minimum time has as scope to prevent highly demanding values from using a large amount of archive space. For example, a new log is not recorded if the time since the last recorded event is less than the compression minimum time for the point. The unit of measure for the Minimum Time Interval is the millisecond.

    Compession_TAB.jpg

    Logging Compression tab

  3. Exception TAB - allows user to enable / disable Logging exception. 

    Exception logging evaluates the significance of new events. The purpose of exception logging is to avoid sending changes that are smaller than the instrument can measure. The interface compares each new value to the previously sent value. The exception uses a simple DeadBand algorithm to determine whether to send values to the archive or not. If the new value does not fall within the deadband, an exception occurs. 

    Note

    The new value is not reported unless:

    • the difference between the new value and the last value is greater than the exception deviation specification, and the difference between the times of the new and last values is greater than or equal to the exception minimum time specification.

    • Or, the difference between the timestamp of the new value and the timestamp of the last reported value is greater than or equal to the exception maximum time specification.

    • Exception Algorithm - if the value is "None" the exception logging function is turned OFF. To enable Exception logging, it is required to set the DeadBand algorithm. 

      NOTE

      Turning exception logging to OFF would generate an exception for every event.

    • Exception Deviation - specifies how much a value may differ from the previous value, before it is considered to be a significant value. The exception deviation should be less than the compression deviation by at least a factor of 2. The Exception Deviation can be given by floating point values, either by manual input or by using the increase/decrease arrows.

    • Exception Maximum Time Interval - puts a limit on the length of time that values can be discarded due to exception testing. For example, it is possible for the incoming data to be a single value for many days. If Exception Maximum Interval is set to 28800000 milliseconds (8 hours) then a value will not be discarded due to exception if the previous event timestamp was more than 28800000 milliseconds before that. The unit of measure for the Maximum Time Interval is the millisecond.

    • Exception Minimum Time Interval - a deadband after the previous value. It is specified in milliseconds. A new value that is received before the end of the Exception Minimum interval is discarded.

    Exception_tab.jpg

    Logging Exception tab

Important

The Logging functionality can be tuned to maximum efficiency with the configurable attributes that specify Compression and Exception logging. The configuration of these specifications impacts the Logs flow towards the server (Logging exception) and the efficiency of data storage in the archive (Logging compression).

In the below exemplified chart we can recognize the Signal Log variation, within the timestamp where compression and exception settings were turned on. The chart lines become curvier, as the logs flow is compressed based on the defined deviation and maximum / minimum time intervals.

Chart.jpg

Chart