How CoDeSys web visualization works
CoDeSys is a PC software tool that allows the development not only of the application in IEC61131-3 language, but also of the graphic pages of operator interface (HMI). A CoDeSys project is therefore composed of the automation program modules and the graphic pages modules whose objects are attached to the application variables. The created pages do not generate executable code (such as program modules) and thus do not consume the CPU resources. Instead, these produce files in XML format describing the graphic layout and how the program variables interact with the pages. The XML files are transferred, when downloading, to the PLC memory along with the compiled version of the application program. These files are available in the hard disk of the PLC and are not used until a remote client connects to the PLC web server which responds to the client by sending XML files of the pages. The client, via a Java application (called by the browser or stand-alone) or through the SpiderControl application, uses XML files to reconstruct the graphics of the pages on own screen. Subsequent periodic HTTP requests of the client to the PLC web server allows the updating of variable values in the graphic pages.
Limits of web visualization using a server PLC
The standard CoDeSys web visualization is made through a network connection between a remote client system (PC, tablet, mobile phone) and the PLC web server. The TCP/IP communication starts via an HTTP request from the client and ends with the response from the web server of the PLC. For this reason it is necessary that the web server is accessible to the client, and this requires some settings if the client is connected to a network different from that of the web server. For example, if the web server is connected to a LAN and the remote client is connected to the Internet via a different access, the HTTP port must be opened in the LAN modem router. In addition to access to the web server from the Internet, the PLC network address must be known, and this requires the use of a DynDNS service. The problem could not be solved if the web server is not connected to a wired LAN but through a radio data connection to a mobile operator. In fact, the common data SIMs often offer a connection via a private IP address that not allow to route a request from the outside to that IP as in the case of the modem router. So in this case can be used only connections that are clients, not servers from the PLC side because the connection, starting with the client, can go outside also making known the return path.
Advantages of web visualization using a client PLC
These requirements and connection problems can be ignored if the PLC operates as a client and not as a server. In this way there are no visibility problems as it is the PLC to start the communication to an external server placed on a visible address. However, the web visualization of CoDeSys requires the use of the web server of the PLC and not the client. For this Overdigit, for own Web PLCs, has developed a pair of applications that allow the establishing of a client connection on PLC side and server on a second auxiliary PLC which operates as a bridge to the outside world. The XML files of graphic pages must be uploaded (via FTP) on the hard drive of the second PLC. The server must then be connected to an accessible network (through the HTTP port opening on the modem router) also using a static IP address if the use of a DynDNS service is not desirable. Then, regarding the web visualization, the server PLC becomes a substitute for the real PLC but placed in an easier accessible network. To view pages a direct connection to the PLC is no longer needed, but indirect through a second device that operates as a server-server interface between the real PLC and the remote visualization client. The original PLC, in client mode, will connect to the server just to transfer the values of the program variables while, on the other hand, the visualization client will be also connected to the server to get the files of graphic pages and the values obtained by the PLC. From the point of view of the visualization client, the situation will arise in a transparent manner as if it is directly connected to the original PLC. The intermediary PLC (server-server) can also accommodate up to 9 web visualization of as many client PLCs allowing to split the cost by the number of web visualizations.
How activate the client web visualization
On the Overdigit Web PLCs two different applications are pre-installed: WVCLIENT.EXE for client function and WVSERVER.EXE for server function. As default, these applications are both disabled so must be enabled and configured in the WEB section of the PLC administration interface. The pages of this interface provide the relevant instructions and illustrate in detail the various configuration parameters proposing pre-default settings already usable.