Creating and maintaining machine data records is a very important part of keeping the machine running efficiently. For example, monitoring downtime and downtime is critical to providing proper maintenance on a machine, while logging breaks and other events can help provide Provides detailed information on how to troubleshoot any system. Maintaining these data logs sometimes requires the purchase of additional software and hardware, as well as several programs to integrate everything together.
For Siemens, specifically WINCC software, we have many ways to put data and display them. For purposes of analysis, evaluation, storage, reporting.
In this article, I will use a library written in C# and embedded in the software, making it easier to manage, the data we can fully control and monitor.
Set up database in SQL
You go to SQL Server to create the necessary table to store like your example: Database OPC, Table DEMO.

Setup in Wincc
Drag and drop Control HDataHistory in the .Net Controls folder.


Fill in the NameDatabase and NameTable information as below, Because above I created the table as DEMO and the Database name as OPC.

Run Runtime Wincc as below.

You choose the date and time and press the Find button to filter out the necessary data.

If you want to export the report to Excel, then you can click on the EXPORT button to manually export the Excel file as the sample I did

It’s a way of exporting reports that doesn’t depend much on Wincc’s code but still ensures stable operation. You can create your own library from using Visual Studio.
Library link : Link








Hello. I found a good reference material while studying Wincc and was copying it. If you don’t mind
Can I share Control HData History?
Yes. You can download this here
https://www.youtube.com/watch?v=K8-C6VdCvBE
https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbHZ2Z3ZaX2ZsSHNqVlV0V1ZCZnNVZTlfYUZGUXxBQ3Jtc0trYllXOURwUVZLS0NqQmJTZTM2ZDJ4YVlnZTh2VlpwNmU2cFFtMFVLS05aNE1nOFFMbjlPRWphM1FUa25tcE52cTRpYl9mVzhkYkdTTUdHWlk0Tk5lb2xMbi0zN3dKSjhMRTJPeEdYMmZsa3ZyOXQwcw&q=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1OoBqivLqbapNq8scnxhQc_q44czKh-QF%2Fview%3Fusp%3Dsharing&v=K8-C6VdCvBE
Yes. This link in below page