PLC – web interface access to the Siemens LOGO! control unit

Loading

Even the simplest and cheapest Siemens LOGO! PLC control unit has an integrated web server, so you can connect to the PLC from a web browser and, for example, set parameters remotely. Alternatively, and much more usefully, LOGO! Web Editor (LWE) lets you create a website with your own customised user interface to control devices or monitor values read at the PLC inputs.

Animal repellents Non-destructive
deterrence of
rodents,
wildlife
and snakes.

 The LOGO! Web Editor (LWE) application, which you use to create the page design, is available to download for free at this address

First, you need to have a program created for the PLC, so the first step is to create such a program in the LOGO! Soft Comfort development environment. It will contain a pulse generator connected to output Q1. The generator is started by a button connected to input I1. Marker M1 is also connected to the Enable input through the OR logic function. The marker makes it possible to control the pulse generator from the web application. Inputs can only be monitored from the web application; an input value cannot be forced from it. The pulses are counted by a counter. We will display their number in the web application. Input I2 allows the counter to be reset.

 

Using the web interface, you can monitor digital and analogue inputs and outputs, control digital and analogue markers, memory contents and shift register bits, and also operate the cursor keys. You will certainly be interested in the values of elements such as counters. These cannot be accessed directly, but you can read the variable that stores the counter value as memory contents.

Video: Controlling a Siemens LOGO! PLC via the web.

However, you must map the relevant parameter according to its data type (Word, DWord…). Open the variable mapping dialogue using Tools > Parameter VM Mapping. You need to know the data type and the memory address to which the variable is mapped. In our case, the counter value is of type DWORD, meaning double word, and is mapped to address 0

First, you must enable access to the web server. In the LOGO! Soft Comfort development environment, open the settings, select Access Control settings on the Online tab and enable Web server access. You must also set a password for access to the web server.

You can now load the program into the control unit and test it if required. We have switches connected to inputs I1 and I2, and an LED connected to relay output Q1 through a protective resistor.

You can now connect to the PLC from a computer or tablet. In our case, we are working with smart home systems, so we connect through the local network. You can find the address in the dialogue for connecting to the PLC. In our case, it is 192.168.0.3

The web server’s home page contains a password login dialogue. If you select the “to customized site” checkbox, you will continue to the website you created. We do not have one yet, so we will continue to the default page

Advertisements

On the LOGO! variable tab, define the variables you want to monitor or control. In our case, we will monitor input I1 and the counter value, and control marker M1

Now we will design a website for our practice solution. In LOGO! Web Editor (LWE), first switch to Tag Table and fill in the table of inputs, outputs and variables mapped to memory that we want to monitor or control

Next, design the website interface under Home Page. The procedure is shown in the video. For digital and analogue values, you can set different colours or image icons for the on and off states

Examples of image icons

Upload the website you designed to the control unit. Insert an SD card formatted with the FAT32 file system and a maximum capacity of 32 GB into the memory card slot. You cannot transfer the website to the PLC without a memory card. This is logical because the PLC’s memory has a limited capacity (approximately 400 function blocks in the block diagram), and a website that may contain a lot of graphics would not fit there.

The website displayed in a browser. You can use marker M1 to control the generator, while the counter field displays the number of pulses counted

Advertisements
AliExpress

Leave a Reply

Your email address will not be published. Required fields are marked *