How to access a Siemens PLC from internet

We can access the Siemens PLC through the internet. It is a useful arrangement that one can easily access the PLC system when they are offsite, he can easily stop/start any program if he is available with an internet access in his PC or Phone.

The setup needed for internet connecting is shown here:

First of all, one has to create an HTML file for a web page which displays who your web page will be shown including all the setup needed. Create and save the HTML file in your system we will check it later.

Steps:

Open the TIA portal on your PC and take PLC kit in the portal.

To configure the PLC go to the properties.

On General tab > select Web server > on the first column at the top select Activate web server on this module

Scroll down and go to the user management > Choose a name in the column and set a password > In the access level column you can select different level of access > You can choose different control access that can provide through the network

Again scroll down

Scroll down to User defined webpage, hope your webpage HTML is ready > Click on the botton right to the HTML directory > Choose your HTML file from your directory.

Click on the Default HTML page to watch the preview of your web page.

Now click on Generate Block button, Now the webpage block is generated in the PLC.

After generating the web server go to Devices on the project tree > Select the PLC block > Open Program block, Now you may see different blocks are created in the program block > select the Main block.

As in the above figure we have to choose a web server block into the program for that: In options at left side > Communication > WEB server > WWW

Go to Add new blocks in the program block

Rename the data block as the web data name. Now the new program block on your web data name is created in the program block select it.

you can select the select the name of the website and data type in the window.

After that go back to the main block

in the network 2 select the input as the website, write the website name to the input, remember the name is case sensitive. In the above example, it is MOTOR. Now select the output > Download the program into the PLC.

Go back to the device configuration.

Your network cable should be connected to one of the ports in the PLC module, Click on the port in the PLC block.

Now in the Ethernet address option copy the IP address, it’s important.

Now the setup in the PLC is ready, now go to any web browser > Search your IP address in it. Now opens the Siemens website.

Click on Enter > Log in with your setup name and password

Now you can see the PLC details and now at the bottom > Click Coustmer page at the bottom of the menu > Select Home page of the application. You web page opens.

You can access this page from any devices and from any where…

1 Like

To add in one of the advantage of Web Browser function is a person can do basic operations and troubleshooting of a remote site say for example a mine in deep forest somewhere.

Its a pretty handy and easy to operate.

While it is possible to connect a PLC to the internet, it represents a significant security threat.

Let me repeat: Do not do this. When you connect a PLC (or any device) to the internet, it means that device is available to anyone and everyone in the world. Do not do this.

You might have many ideas about why I am wrong. For example:

  1. Noone is going to know that I am connecting this – The “bad guys” are scanning the internet on a regular basis. Using the right tools, the entire internet can be scanned in a few hours (or less). If you open a port and leave it open for more than a day, there is a good chance that someone will find your open port.

  2. A Siemens PLC is a specialized, relatively unknown device – No, you are wrong. PLCs are a very well known device. Port 102, for example, is the one used by the S7 PLC.

  3. Noone is going to bother with my PLC – Maybe not today, maybe not tomorrow. But I can guarantee that within a month or two, your PLC will be discovered.

To Repeat: Do not connect any device to the internet without understanding (and taking the proper measures) to protect that device. A PLC has no protection against malicious (or even accidental) connections and operations.