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.
Property | Description |
---|---|
Name | Unique identifier for the logged value. Also used as a friendly name when viewing logged data. |
Routing | Full path of the signal or property we want to log. |
RoutingStatus | Shows whether connecting to the node specified by the Routing property was successful. |
Delta | Value 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.
Property | Description |
---|---|
SizeAlarmGB | Sets an alarm when the datastore has reached the specified size. Use 0.0 for no limit. |
InMemoryLogging | Start the logger in LogToBuf state. When false, logger is started in LogToOutput state. |
PeriodicLogFrequency | Logging 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. |
BufferSpanMinutes | When 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.
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.