
We have generated data and stored it in SQL. Now we need to do an analysis and generate a report based on this data. We shall describe how to do this.
We have done the following in different chapters of this website.
https://www.hemelix.com/plc/structured-text-programming/ (Programming in Structured Text)
https://www.hemelix.com/scada-hmi/twincat-hmi/animation-in-twincat-hmi/ (Animation of image)
https://www.hemelix.com/scada-hmi/twincat-hmi/data-grid-view/ (How to display data from HMI to SQL and vice versa)
https://www.hemelix.com/automation/raspberry-pi/ (How to program in Raspberry Pi)
https://www.hemelix.com/sql/ (How to work with HMI and database)
https://www.hemelix.com/plc/structured-text-mqtt/ (What is MQTT and how to use it)
https://www.hemelix.com/automation/structured-text-mqtt-node-red-mssql/ (What is Node-RED and saving data to SQL)
On this page, we shall use all this knowledge to generate a report.
Still updating, follow us!

Figure 01: Fitting reporting architecture in the Beckhoff automation system.

Figure 02: Sample HMI allows saving a few properties to DB and sending a report automatically (under development)
We shall use a DC motor and it will be run by PLC by using Modbus. The motor can be started or stopped manually. The motor can reach maximum speed for a certain time and it can change the speed during operation. It will record the maximum speed and how long it was running at that speed. All information can be included in a report which can be sent to our client by email.

Figure 03: Saving data to cloud, architecture provided by Beckhoff
Mendix
=> Reporting tool provided by Siemens
=> Put login ON/OFF Security | Security level
References:
What Next
Now learn how to send email by using C# and JS,
Browse https://www.hemelix.com/automation/send-email-by-js-and-csharp/
Ask questions related to Hemelix sample code and design at Google group https://groups.google.com/g/hemelix