• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Product
    • Design UI
    • Develop
    • Analyze and test
    • Deploy
    • Framework and toolbox
    • Compatibility
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Framework - Data Logging
  • Configuration Manual
  • 4.11.0

How to Setup Logging in Automation System Choosing a Datastore

Configuration Manual

Introduction

This manual describes the CDP Logger library in CDP Studio, the independent automation software for open PC based real-time distributed control systems.

CDP Logger

The CDP Logger component logs signal and property changes. It is designed for long-term storage of high-frequency numeric data. Depending on the selected datastore, data is either stored to a local file or a remote server, see the Choosing a Datastore page for more information. CDP Logger also contains a server for remote access to logged data, see Viewing Data.

Note: The CDP Logger is a licensed feature. See the CDP Runtime License manual for more information.

Usage

To set up a CDP Logger for an application, simply add it as a subcomponent. Next, add a Datastore to the CDP Logger component (e.g. CDPCompactDatastore). To actually log something, add LoggedValue nodes and set the Routing attribute to any signal or property in the system. Alternatively, you may right-click on any signal or property and select Add to Logger...

Features

  • Delta logging. Value changes are logged only when change is larger than configured Delta.
  • Size alarm. Set by SizeAlarmGB property. When the limit is reached, an alarm is set, notifying that the datastore has grown too large.
  • In-memory logging. When enabled no data is added to the datastore, but instead to temporary buffers. When switching the logger to 'LogToOutput', the content of the buffer is written to the datastore (buffer span is configurable). This feature could be used to save disk space by only activating the logger when some interesting event occurs. Logger state can be changed by sending a Message to the logger component.
  • Built-in server. Used by Studio Analyze mode and Database Graph Widget to query data from datastore.

Note: Some features like data retention policies are defined in the settings of the selected Datastore.

LoggedValue

LoggedValue represents the node (signal or property) that is logged.

PropertyDescription
NameUnique identifier for the logged value. Also used as a friendly name when viewing logged data.
RoutingFull path of the signal or property we want to log.
RoutingStatusShows whether connecting to the node specified by the Routing property was successful.
DeltaValue change is only logged if it changes more than 'Delta'. Use this to save disk space.

Properties

Here are CDP Logger specific configuration options listed under the Properties table of the CDP Logger component.

PropertyDescription
SizeAlarmGBSets an alarm when the datastore has reached the specified size. Use 0.0 for no limit.
InMemoryLoggingStart the logger in LogToBuf state. When false, logger is started in LogToOutput state.
PeriodicLogFrequencyLogging frequency in Hz. Set to 0 to log every value change instead of periodically. Decreasing logging frequency will save disk space and improve performance when logging thousands of values.
BufferSpanMinutesWhen logging to buffer (LogToBuf state), this sets the buffer length. Use 0 for default. Can be configured only when PeriodicLogFrequency is set.

Datastore

Datastore is the backend used by CDP Logger, usually some database. The default is CDPCompactDatastore.

For more information about datastores, see the Choosing a Datastore page.

Viewing Data

CDP Logger contains a server for remote access to the logged data that can be used to view data no matter which datastore is used. The selected datastore might provide other custom ways to view logged data. See the manual for the selected datastore to get specific information on that.

There are several options to view logged data through CDP Logger built-in server:

  • Using CDP Studio Analyze mode Historic Data functionality which will detect a running CDP Logger and connect to it. The Analyze mode can also be used to export the logged data to CSV format.
  • Making your own GUI application that includes Database Graph Widget.
  • Python code can query values from a running CDP Logger using the PythonCDPLoggerClient.

How to Setup Logging in Automation System Choosing a Datastore

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

    © Copyright 2022 CDP Technologies. Privacy and cookie policy.

    Return to top