Skip to content
Tech blog

Display PLC data in a web browser

Displaying real-time data on a monitor is often very helpful for keeping track of the current data in production at all times. Unfortunately, many methods of displaying PLC data in a browser involve a great deal of effort. Today we will show you how to do this in just a few minutes.

Content overview

It’s that easy

Displaying data from the PLC in a browser

The visual presentation and continuous monitoring of production KPIs is becoming increasingly important. Clear, well-prepared figures show the current production status at a glance. There are several methods for displaying data from the PLC outside the production environment, e.g. in the office, on a monitor or on a mobile device. But what if it is a temporary use case and you just want to set something up “quickly”?

Typical challenges:

  • HMIs are too expensive or already working at full capacity
  • The effort involved in introducing an MES is too high for the small use case
  • Technicians and maintenance staff cannot find a solution without programming effort
Typical challenges with MES, HMI and programming when displaying PLC data in the browser

The solution:

A method that allows you to configure quickly and flexibly which data is displayed in a web browser, when and where.

We have developed a function in the DataSuite software that reads PLC data, writes it to an HTML file and then displays it in a browser, either locally via an integrated web server or on web space. Configuration takes less than an hour.

You can display PLC data in the browser on a monitor in the office, in the production hall, in your home office, on your mobile phone, for management, for the plant manager, etc.

Here’s how:

Display PLC data in the browser with little effort

To display PLC data in a web browser, all you need is the DataSuite software. This is not a cloud application. Everything runs locally on your computer within your network. The data is written from your controller to an Excel file. You can then use all Excel functions, e.g. to create charts and formulas. The Excel file is then converted into an HTML file and displayed in the browser with the integrated web server.

Capture machine and PLC data, apply Excel formatting, convert it into an HTML file and display it in a browser
Which PLC / machine control system can I use to display PLC data in a browser?

To display PLC data in a browser, the machine control system from which the data is read must be able to communicate via either PUT/GET or OPC-UA. These can be, for example, S7-1500, S7-1200 or the latest Beckhoff controllers.

Can I adjust the update interval when displaying PLC data in the web browser?

Yes, when displaying PLC data in the web browser, you can set different trigger conditions for updating. If you select the time interval, you can specify to the second when updates are made.

And now on to the step-by-step guide:

Step-by-step guide:
Displaying PLC data in the browser

Establishing a connection to the PLC

After installing DataSuite, you can establish a connection to your machine control system (PLC). DataSuite can read data from your PLC or write data to the PLC. In this example, PLC data is to be written to an Excel file.

To do this, click on “Create new PLC” under the “PLCs” menu item and follow the instructions. You can find more information on establishing the connection in the DataSuite manual.

Once you have successfully established the PLC connection and imported your data blocks, you can start with the first step: creating an Excel file for data acquisition. To do this, click on the “Excel files” menu item on the left. There you will already find a template called “Report”. At this point, you can create your own file by clicking on “Create new file”.

“Excel files” page in DataSuite with the files Report, Recipe and Energy data and the “Create new file” tile
Creating a document for data acquisition in DataSuite

Creating a trigger for data acquisition from the PLC

In the next step, we add a new trigger under the “Trigger” menu item. For this, we can use the predefined template “Write data record” by selecting it and then clicking on “Edit”.

Default triggers in DataSuite: Write data record, Create new file, Read data record and Re-read file
Default triggers in DataSuite

Here we can now set up the trigger condition individually. We then select the corresponding Excel file and, under “Write header values” and “Write data record”, link the correct rows and columns to the variables in the machine control system (PLC).

Editing the “Write data record” trigger in DataSuite: Excel file Report, cells C2 to C5 linked to PLC variables under “Write header values”
Configuring the “Write data record” trigger in DataSuite

Once we have configured and saved the trigger, the first data records should already be written, depending on the trigger condition. We check this by looking at the log. To do this, we click on the trigger and then on “Log”. In general, the green dot and the timestamp indicate that the execution was successful.

Successfully executed “Write data record” trigger in DataSuite with green dot, timestamp and the buttons Edit, Deactivate, Log and Run now
PLC data successfully written to the Excel file

Creating an HTML file from the PLC data

Now click on “Create new trigger” to create a new trigger. Search for “HTML” and choose the trigger “Convert Excel file to HTML”. Select it and click on “Create”.

At this point, you decide whether you want to use the integrated web server or save the HTML file elsewhere in your file system in order to upload it to web space afterwards.

In this case, we select the web server, give the website a name, tick “Update website automatically” and save everything.

Configuring a trigger that converts the Excel file Report into an HTML file and publishes it on the web server under the path “report”
Editing the “Report as web page” trigger in DataSuite

Activating the integrated web server for display in the browser

After saving the trigger, we click on “Run now” and switch to the next menu item, “Webserver / Rest-API”. There we tick “Use web server” and can set up our own certificate for security. We can then open the web server path in our browser.

As you can see in the screenshot above, in our case this is “https://localhost:22722/sites/report”.

And here is the result:

Captured PLC data displayed in a web browser
Captured PLC data in the web browser

In this case, of course, the file is full of zeros. After all, it was created with the PLC simulator, which does not generate any values. In your case, however, the PLC would continuously generate data, which DataSuite then writes to the file and which can be displayed in your browser with ease.

You can find much more information and setting options in the DataSuite manual, which contains detailed instructions and helpful tips.

Do you have specific questions? Then simply create a support package in DataSuite and describe your request to us. How do I create a support package?

Conclusion

With just a few steps, it is possible to retrieve PLC data from the machine control system and display it as a website in a browser. Everything can be configured individually and flexibly, so that you can set update rates and trigger conditions.

Download trial software

Test all functions free of charge for 30 days. You will receive an email with a download link for instant use.

Monitor showing “Download DataSuite 3”