PDA

View Full Version : Idea to display zenon network status on WebServer start page



herberto
20th March 2015, 12:36
starting the webclient is usually done via accessing the WebServer startpage (index.htm).
when the WebServer startpage is then shown on the client computer (where the WebClient should be started) there is no information (yet) i.e.
- if the Runtime Server is running (resp. on which computer)
- if the WebServer is running
- how many clients are already connected (maybe no more client licenses are free?)

a possible way to forward this information to the WebServer startpage is to simply bind a textfile to this startpage. the content of textfile itself is written i.e. via VBA / VSTA from the zenon RuntimeServer.

In the attachment you can find a screenshot how such a modified zenon WebServer startpage could look like (see zenWebSrv_zenSytemInfo.jpg)

using following html code it is possible to display the content of a given textfile




<p>zenon Runtime status:</p>
<object data="MyTextFile.TXT" type="text/plain" width="800" height="100" border="1">
Your browser can not display this object!
</object>



the textfile itself must be located then in the same folder as the index.html file

at the zenon runtime server (only) a small VBA / VSTA code reads out i.e. the systemvariables
Current primary server
Names of connected clients

and writes the value of those variables into the textfile

to check if the zenon WebServer is running or not the process zenWebSrv.exe can be evaluated i.e. via WMI coding (there are several examples on this in the internet).

also it might be necessary that the html page should be refreshed cyclic (to display the current content of the text file). this can be done via the method "refresh" within the header html page:



<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
<meta http-equiv="refresh" content="30" />
<link rel="stylesheet" type="text/css" href="ressources/style.css" />
<title>COPA-DATA :: zenon web server demo</title>
</head>


regards,
herbert