Anyone using Siemens CPU embedded webpages (aka "Web2PLC") ?

JesperMP

Lifetime Supporting Member + Moderator
Join Date
Feb 2003
Location
ᚴᚬᛒᛅᚾᚼᚬᚠᚾ
Posts
16,338
Hi all.

I am starting to learn how to program the webserver that is on Siemens PN CPUs, using the utility program Web2PLC.
Anyone else doing that ?
Would be nice to have someone to discuss matters with, and to share the know-how. Siemens documentation on how to accomplish this is somewhat superficial.

Anyone ?
 
OK, noone else seems to be interested in this.
So I'll just post my findings. Maybe someone will find it useful.

Findings:

As soon as you enable the webserver, it costs at least 200kB memory on the MMC flash card. Simple userdefined webpages seems to add very little to the memory requirement. The used memory only counts against the available MMC Load memory, not the S7 CPUs work memory. I have no experience with more complex webpages, or pages with graphics.

Enabling the webserver immediately grants access to some useful goodies, such as the diagnostics buffer. Thus, the enduser can diagnose the PLC without having STEP7 or a special HMI made for it.

Creating VAT tables is as simple as ticking an option in the VAT property dialog. The values in the VAT will be view-only.

So far I have managed to create a simple user-defined webpage with a table of tags that the user can modify. This complements the VAT tables, where the user can only view not modify the values.
I used the sample project to generate the HTML code. As long as you just make some tables with variables, it is not so difficult.

There is the possibility to have multiple languages. Also for the user-defined web-pages. But I think that it requires a lot of work to maintain.
Dont know if non-latin fonts (cyrillic, chinese, etc.) are supported somehow.
I have decided to only support english.

It is highly recommended to protect the user-defined webpages with a password. There is no structured user system. You define one or several users in the CPUs HW configuration. And these users can be granted access or gets no access. The configuration is fixed. You cannot create, modify or delete users, and the includes the passwords. So dont reveal the password to everyone !
A tip: define the user called "everybody" without password. If noone logs in, this will allow access to the user-defined webpages, but with view-only.
A small irritation: If no user with modify access is logged in, and an attempt to modify a value is done, then the modified values will be discarded, but with no notification or warning message.

One of the settings I have created is a command to write the modified values to the MMC card via SFC84 WRIT_DBL. This means that values can be modified, and also saved to non-volatile memory.

So far my conclusion is that the user-defined web-pages are quite useful for smaller simple "headless" application, where you still like to have some possibility to diagnose, observe values and change the odd parameter.
 
I've been usning WinAC & WinCC Flexible with the smart service option for a while. This makes a web server with some control functions. I wish they had the var talbles like your talking about. I can display any tag from Flexible but I have to hard code it into HTML myself. I have not found a way to change any values. Maybe they will update the smart service to be more like the CPU's you are dealing with.

I would love to see some screen shots if you can post them.
 
Things I have to check:

- What happens when illegal values are entered. ("three" in stead of "3" for an INT tag. Out of bounds values. "12,34" in stead of "12.34". Etc.
- How to display text strings coded in the PLCs user program (for flexible error display).
- Using buttons with color animations.
 
Last edited:
I've been usning WinAC & WinCC Flexible with the smart service option for a while.
Bad news is that the CPU based webserver is not in the WinAC "CPUs".

On another note, if you are using WinAC MP, you are aware that Siemens seems to plan to stopping this product ?
The WinAC MP replacement will be WinAC on a Windows Embedded PC, and the MP replacement will be the "Nano" IPC.
 
I too am planning on using this feature on an upcoming project. I see a lot of potential benefits to it. I am waiting for updated Step 7 software (hung up in purchasing dept 🙃)so I can access all of the features available, currently I can only access basic information. I will give an update when I finally get a chance to play with it.
 
For anyone interested in how it looks like, then here are a couple of screenshots.
One screenshot is from the webserver with a VAT table opened up.
One screenshot is from the page where you select the customer defined webpages.
One screenshot of a customer defined webpage, with a few variables in a table.

Web2PLC_3.jpg Web2PLC_2.jpg Web2PLC_1.GIF
 
OK, now I am starting to learn how to use this in earnest. I have a project where the webserver shall be the local maintenance interface.
I am only using pure HTML code so far.
Some time in the future when I have most of the desired functionality I might want to use CSS (for making the screens 'prettier'), and maybe javascript to get the functionality that isnt possible with pure HTML. But for now, I am content with simple HTML screens. I prefer simple and functional at this stage.

What I have managed so far:

Display variable values.
Set variable values.
Display text lists - via ENUMs.
Setting bits or values by a single button.

What I am trying to figure out now is how to animate values in some way. As opposed to displaying the numerical value (1 for ON, 0 for OFF)
To display that a valve is on for example, it could be nice to change a frame cells background color, but I havent found how that is possible.
I could theoretically use radio buttons or check boxes, but I find them to be too discreete, and I havent figured out how to block the user from atempting to change the value of the checkbox (If the user does that, it wont probably do any harm, but it is confusing).
If there is no other way, I might go for animating table cells by changing GIF images. But I fnd that a bit crude.

Anyone know how to animate the background color of a table cell with pure HTML ?
Or how to block the the user manipulating radio buttons or check boxes ?
 
Last edited:
I started playing with the web page on an S7-1200. I am used to being a PLC programmer, using Graphic Designer to get the HMI to look good and an electrical engineer to design, build and test the system. Now I need to be a Web Page designer and Data Logging experts. I don't think that web designers generally work directly with Html code, they use a web design package. I tried using a simple web design package and then copying the code over to the PLC but I couldn't get it to work. I am not being much help with your problem here but I know how you feel. Has anybody had success using web design software to create Html code for a PLC?
 
I am using regular HTML code to begin with. So far it works OK. Just need to get a few more things to work (like color animations).
I shall post screenshots from when I get something that is near final status.

I think that is is not necessary to make a webpage pretty at first. Get the functionality working first, and only after that start messing with the overall graphic design.
I have taken a look at Blue Griffon, and maybe I will use that some time in the future. But that is really just eye-candy. It will add nothing to the functionality.

When I am done I will also try to post my recommendations on how to get started. For now I say go by the simple example projects that come with Web2PLC, and dont bother with anything fancy to begin with.
 
Did some quick research and found a quote:
HTML is a markup language, not a programming language. It cannot do any calculations, does not have variables, etc.

You would need some sort of server-side language, or possibly a pre-processor.
But thinking about it from a different angle. Rather than have the web page calculate what colour to use from the 0 or 1, you could instead use the PLC to give you a value from the standard web palette for the background colour and retrieve that value from the PLC using the normal AWP command. The only bit I don't know is if you can use an variable to set the background colour.
 
I've got my first maintenance page coming up soon too. Ordered the hardware on Friday to have a play with when it arrives. But I did find this handy web page builder. Its akin to using familiar HMI software. No HTML to worry about... Yet
http://www.ambiera.com/websitepainter/index.html
Once I get the hardware then I will have to merge / integrate the AWM tags into my page. Then the HTML coding part will be required.
 
I have been working with this on and off for some time now.
And I have had some inexplicable problems with getting the writing of variables to work.

I hope I have got it sorted by now.
Here are a couple of findings:

Be sure to turn "testmode" on in web2plc. Turning on testmode will mean that meaningful error-messages appear in the webpage. Without testmode, you will get NO explanation why something does not work.
Mysterious that this isnt on by default. It does not seem to cost anything to have testmode turned on. When you close web2plc, testmode will be off when you open it again.

It seems that there are differences on how different web-browsers treat AWP commands. The problems I had with writing values seemed to come from IE8 doing something to the string that is sent to the CPU.
The error message when using IE8 was something like:
AWP Error: variable unknown or not defined writable: %22TestDB%22.Testint
The variable that was supposed to be written to was "TestDB".Testint.
Google Chrome on the other hand worked OK. Therefore I plan to bundle our application with a portable version of Google Chrome.
 

Similar Topics

I'm virtualizing a water treatment plant. While the IT hardware cycle is 3-5 years, to my mind that's really not practical for this kind of...
Replies
8
Views
1,632
Hello PLCs.NET! I'm trying to auto-backup some RSNetworx files. Any idea if it's possible at all? I honestly thought that it was just an...
Replies
0
Views
1,545
We are looking to collect information on our cisco and rockwell assets. The exhaustive list that cyber security is asking for .. serial number...
Replies
0
Views
1,664
Going to a free training class on Tuesday. Just wondering if anyone is using this. Pros? Cons?
Replies
8
Views
3,000
I am doing a bit of research before the next project hits. For what I am finding to looks like you *should* be able to set up a multidrop HART...
Replies
11
Views
3,804
Back
Top Bottom