Press ESC to close · Ctrl+K to open

Siemens S7-1500 Web Server

How to create a small HMI integrated in the PLC with Web Server and View of Things.

Cover image for the Web Server of a Siemens S7-1500 PLC

Goal and environment

The goal is to get the integrated Web Server of a Siemens S7-1500 PLC working in a useful way, not just to open a diagnostics page. We will protect it with a user, enable secure communication through HTTPS and publish a small View of Things screen designed in TIA Portal.

The test uses a CPU 1515-2 PN simulated with PLCSIM Advanced. The PLC IP address in the lab is 192.168.1.156; 192.168.1.154 is the PLCSIM Advanced adapter address. In a real installation, replace the PLC IP with the physical CPU address.

PLCSIM Advanced interface with S7-1500 CPU and simulation adapter

Siemens documents that S7-1500 CPUs include an integrated web server with interface-specific activation, HTTPS access and authentication through local or central user management. For View of Things, Siemens describes it as an HTML5 web application stored in PLC memory and opened in the browser through the PLC Web Server.

Official references used to check the workflow: S7-1500 Web server, Web Server security, S7-1500 users and roles and View of Things for PLC.

Enable the Web Server

In the CPU properties, open Web server and enable the web server on the Ethernet interface you are going to use. Make sure the enabled interface is the one that owns the IP address you will open from the browser.

Enabling the Web Server in a Siemens S7-1500 CPU from TIA Portal

Then compile and download the configuration to the PLC or to the PLCSIM Advanced instance. If the Web Server does not respond, check the simple things first: correct IP, correct interface and hardware configuration actually downloaded.

First access from the browser

With the Web Server enabled, open the PLC IP address in the browser. In this lab:

https://192.168.1.156/

At first the browser may mark the page as not secure. That is expected if we have not installed the CA yet or if the PC does not trust the certificate.

Home page of the Web Server in a Siemens S7-1500 CPU
CPU information visible from the S7-1500 Web Server

Without a user with permissions, access will be limited. To use the Web Server as a real diagnostics and operation tool, we need to configure user management.

Access to the S7-1500 Web Server before trusting the HTTPS certificate

Web Server user and permissions

In TIA Portal V19 and newer, with current firmware, management is done from Security settings > Users and roles. The practical flow is: create a user, create a role with Web Server rights, and assign that role to the user.

In this example the user is phs, with a role that includes Web Server permissions. This avoids leaving access open and lets us decide what each user can do.

TIA Portal users and roles editor for a Siemens S7-1500 PLC
Assigning Web Server permissions to a user role in TIA Portal

After downloading the configuration, log in with that user. The Web Server menu now shows more functions and you can view pages such as diagnostics, CPU status, module information or buffers, depending on the assigned rights.

Full Web Server menu after logging in with an authorized user
Diagnostics events viewed from the Siemens PLC Web Server

HTTPS and certificates

For the browser connection to be trusted, we need a server certificate and the PC must trust the authority that signed it. With the Certificate Manager in TIA Portal we can generate a certificate for the Web Server and sign it with the project CA.

One important detail: if you access the PLC by IP address, that IP address must be covered by the certificate. If the CPU IP changes, regenerate and download the certificate again.

Enabling global certificate management in TIA Portal
TIA Portal Certificate Manager used to generate the Web Server certificate

Generate the certificate for the Web Server and select it in the web server security settings of the CPU.

Certificate generated for the Web Server of the S7-1500 CPU
Assigning the HTTPS certificate to the CPU Web Server
Web Server certificate shown as used in TIA Portal

To make Windows and the browser trust the connection, export both the Web Server certificate and the CA certificate of the project. In this case the CA is the TIA Portal project itself.

Exporting the Web Server certificate from TIA Portal
Exporting the certificate authority of the TIA Portal project

Then import the CA into the Windows certificate store under Trusted Root Certification Authorities. Windows will display a warning because we are deciding to trust that CA; if this is our own project and a lab environment, accept it.

Importing the TIA Portal CA into the Windows certificate manager
Windows warning before trusting the project certificate authority
TIA Portal CA installed as a trusted root certification authority

Open the PLC URL again and the browser now shows the connection as secure. At this point the Web Server requires a user and the traffic is encrypted over HTTPS.

Secure HTTPS connection to the Web Server of a Siemens S7-1500

Validation with Wireshark

To verify that traffic is really encrypted, capture the communication between the PC and the PLCSIM Advanced network adapter. The console shows the IP address used by the simulation interface.

IP address of the Ethernet adapter used by PLCSIM Advanced

In Wireshark we should no longer see pages, credentials or values in clear text. We should see TLS/HTTPS traffic between the browser and the PLC, which is what we want before considering the Web Server outside a lab.

Wireshark capture showing encrypted HTTPS traffic to the PLC Web Server

View of Things as a web screen

View of Things, or VoT, lets us create a small HTML5 web visualization and serve it from the S7-1500 itself. Screens are designed in TIA Portal with the WinCC Unified editor and dynamizations, but the runtime opens from the PLC Web Server.

For a small diagnostics or local control panel, this is very practical: we do not need a full HMI, but we still get a web screen connected to PLC tags.

Creating a View of Things screen in TIA Portal

Tags are generated on the HMI side and linked to DB variables. For small screens, dragging variables from the DB speeds things up because TIA Portal creates the associated HMI tag automatically.

HMI tags generated for a View of Things screen

Then configure the VoT start screen. If we want the operation screen to appear when opening the Web Server, instead of the system page, select the View of Things page as the default page.

Configuring the View of Things start screen
Selecting View of Things as the default Web Server page

Load and final test

There are two easy-to-miss points. First, the Web Server and View of Things must be compiled separately when we change the web part. Second, when loading to the PLC, mark the VoT application update; otherwise the PLC will keep serving the previous version.

Compiling the Web Server and View of Things in TIA Portal
Loading View of Things to the PLC from TIA Portal

Open the Web Server again and log in with the user that already has permissions. If VoT is configured as the default page, the browser will take you directly to the control screen after login.

Login screen before opening View of Things from the Web Server
View of Things control screen running from the PLC Web Server

This closes the complete loop: Web Server enabled, user login, HTTPS certificate trusted by the PC, encrypted communication and a View of Things screen loaded in the PLC.

Checklist before using it in a plant

  • Enable only the required interface: do not expose the Web Server on networks where it is not needed.
  • Always use HTTPS: HTTP access or untrusted certificates are acceptable for quick lab tests, not as the final state.
  • Create named users: avoid shared generic users for operation or maintenance.
  • Limit rights by role: diagnostics, read-only access, control and administration should not mean the same thing.
  • Regenerate certificates if the IP or name changes: the browser validates the certificate against the destination used.
  • Compile and load VoT explicitly: if the screen does not change, first check the Web Server compilation and load step.
  • Validate with a capture: Wireshark helps confirm that credentials and data are not being sent in clear text.

To review supported functions and View of Things limitations, keep the official Siemens documentation on View of Things installation and functions close by.

The practical conclusion is simple: the S7-1500 Web Server is not just a diagnostics page. Properly configured, it can be useful for maintenance and small web screens, as long as it is not left open carelessly. Users, roles, HTTPS and certificates are not decoration; they are the difference between a convenient lab test and a configuration that can be reasonably defended.



Was this article useful?

Share on LinkedIn