Store PLCnext CommunityPLCnext on LinkedInPLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

Configure the DataLogger and get OPC UA Historical Access

The PLCnext Technology firmware 2019.6 brought us the real-time, task-synchronous DataLogger, which lets us record energy data or process steps. In addition, the embedded OPC UA Server supports Historical Access, so you can access all data recorded by the DataLogger at any time. Here's how to configure a set of data ports for use with OPC UA and then get access to the historical data.

Part 1: Short Introduction


In this video Frank Walde tells all you need to know for starters. Don't skip this one, so we can get deeper into it in the following two videos without losing you (click "read more" to see the other two clips).

Part 2: Configuring the DataLogger for the "Record on Time" feature


We start by setting up a program that logs data from a set of ports into an SQLite database, so we can access those logs from our host computer. Buckle up and dive into it!

Download the DataLogger Service configuration file from the PLCnext repository on GitHub. We will show how to put in the settings for the data generator and deploy it on the PLCnext Control.

To reproduce this instruction, you have to connect to an OPC UA Server. Here's how to set up an OPC UA server connection with PLCnext Engineer in general, just in case you need help with that.

OPC™ is a well-known, platform-independent interoperability standard for industrial automation, and its Unified Architecture (OPC UA) is an integral component of PLCnext Technology, which makes it compatible for integration into third-party systems. Read more about this standard here.

Part 3: Getting access to historical values of our data ports via OPC UA


Now it's getting historical! Recruiting the embedded OPC UA server of the PLCnext Technology Runtime, we will set up our data ports to be historizing all values. We will be using the UaExpert client from Unified Automation, which you can download here.