Configuration and Start of the Web Server

  • The web server must be available as an appropriate executable file (*.exe) for the used target system. It also can be installed and started as a sevice. The following command line parameters can be used for this purpose when webserver.exe is started:

    • i = web server gets installed as a service
    • u = web server service gets uninstalled
    • s = web server service gets started
    • e = web server service gets terminated
  • The configuration of the server can be done by a configuration file or - restricted usable - by parameters added in the command line when calling the server-exe. The definitions given by a configuration file will overwrite those of the command line.

    The possible parameters:

webserver-port-nr Port, on which the web server expects requests of the client (Web-Browser) Default: 80
target-port-nr Port of the runtime system Default: 1200
target-ip-address IP address of the runtime system Default: localhost
use-file-upload-dir If this flag is set to TRUE, additionally the file-upload-directory (see below, file-upload-dir) must be defined, where the  *.xml, *.bmp, *.jpg, etc. files of the Web-Visualzation are stored on the target system and from where they are uploaded to the browser. Default:false
file-upload-dir Directory for the Web-Visualization files Default:”“
use-intel-byte-order Type of byte-order (true or false): if  “false, the data will get swapped (Motorola Byte-Order). Default: true
The following entries refer to the use of a description file for the PLC-Handler in order to be able to use the MultiPLC-functionality. If these entries are missing, automatically the TCP/IP-connection to the above specified target system will be used.
plc-description-file

Path of the ini-file for the PLCHandler, describing the communication parameters for all PLCs (controllers) to which the web server then can connect via Gateway/PLCHandler. (Per default the ini-file is in the same directory as web server.exe).

If the visualization (Web-Client) via INTERN-command CONNECT_TO tells to which PLC a connection should be established, this connection will be built automatically by the server and will be maintained until the next change.

Default: “”
plc-entries Section containing the entries <plc-entry> for the various PLCs Default: “”
plc-entry Entry for a PLC, contains PLC name and directory Default: “”
plc-name Name of the PLC, as defined in the PLCHandler.ini-file Default: “”
plc-directory

Directory of the PLC files; can be defined absolutely or relatively to the file-upload directory (see above).

Example: For the example configuration shown below a definition  ”.\FD” for the plc-directory results in the following location: “C:\Programme\CoDeSysV23\FD”

Default: “”

Note

If you define a “file-upload” directory, where the controller can store the visualization download files, then the visualization files will be automatically updated at each download. The advantage of this upload-directory is that the controller is not involved and thus not strained. The Web Server gets the files directly from the directory and by this the data transfer is much quicker. This is especially of impact in case of a big amount of data.

A configuration file for the Web Server must be available in XML-format and it must be named “webserver_conf.xml”. It must be found in the directory where the webserver-exe is. If no configuration file is available, the above mentioned default settings will be used (if not changed by parameters added to the call of the server in a command line.)

An example configuration in the webserver_conf.xml file could look as follows:

<webserver-configuration>

<webserver-port-nr> 8080 </webserver-port-nr>

<target-port-nr> 1200 </target-port-nr>

<target-ip-address> localhost </target-ip-address>

<use-file-upload-dir> true </use-file-upload-dir>

<file-upload-dir> C:\Programme\CoDeSysV23\ </file-upload-dir>

<use-intel-byte-order> true </use-intel-byte-order>

<plc-description-file> PlcHandler.ini </plc-description-file>

<plc-entries>

<plc-entry>

<plc-name> MASTER </plc-name>

<plc-directory> .\MASTER </plc-directory>

</plc-entry>

<plc-entry>

<plc-name> FD </plc-name>

<plc-directory> .\FD </plc-directory>

</plc-entry>

<plc-entry>

<plc-name> DL </plc-name>

<plc-directory> .\DL </plc-directory>

</plc-entry>

</plc-entries>

</webserver-configuration>

A call in a command line must use the following syntax:

WebServer     [webserver-Port-nr] [target-port-nr] [target-IP-address] | [file-upload-dir]

Only these parameters can be used in a command line. The others described above, concerning byte-order and multiPLC-functionality must come via the configuration file.

Thus a call corresponding to the above shown configuration example would look like follows, whereby the settings for <plc-description-file> and <plc-entries> must be available in a configuration file:

> webserver 8080 1200 localhost c:\\Programme\\CoDeSysV23

Note

The parameter settings in the command line are without any effect, if there is a valid configuration file available.