How to Leverage Embedded Web Server for Globalizing the PLC Systems?

Rini Dantes Mar 02 - 5 min read

Audio : Listen to This Blog.

A Programmable Logic Controller (PLC or programmable controller) is a device that can be programmed to perform a series or sequence of events. These events are triggered by some stimuli (usually called inputs) received by the PLC or through delayed actions such as time delays or counted occurrences. When an event trigger occurs, its associated electronic device is actuated through the turning on or off of the electronic control gear. A programmable controller will continually loop through its internal, user-defined program waiting for inputs and giving outputs at the programmed times. PLCs with anti-interference and high reliability are widely used in industrial control. However, PLCs are hard to implement using the embedded intelligent control algorithm for web-based control systems. Here, we can use an embedded controller that can act as a web server—which has Ethernet and wireless configuration and can deal with the global network. In this article, let’s see how we can implement an embedded web server. With the rapid improvement of embedded controllers, integrated microcontrollers are used to satisfy all kinds of demands of the industry. Other such systems as SCADA need more cost to implement, and it is not worthwhile for small PLC systems.

Why embedded web servers?

Embedded servers are an emerging device technology used in industries and other places like automated traffic signals, where accuracy and instant response are needed. They support all the networking protocols, such as TCP/IP, I2C, SPI, HTTP, etc. We can customize and design the embedded web server, or we can purchase the embedded server which satisfies our needs.

Interfacing the PLC and the embedded web server

This is an entire web control system consisting of embedded controller, PLC, access point, and routers. The web server consists of Ethernet, wireless LAN, and RS232 communication support, which can be configured to communicate with the global network. The web server deals with Ethernet and server configuration. And the TCP/IP method is implemented in it using the desired C/C++ coding. The algorithm implemented on the board handles the data from the global network. The data received from the global network is handled and analyzed by the embedded web servers. Then the required data is transferred to the PLC through a UART port.

HTML and JavaScript are also included in the box to effect web display and user interaction. The data from the user is sent by the POST input methods in HTML. Then the corresponding data is retrieved by our base code.

Ethernet/wireless communication which integrates the embedded controller with the real world

In an Ethernet network, the interface to the network is an Ethernet controller chip and its driver. The Ethernet driver contains the program code that manages communication between the controller chip and a higher level in the network protocol stack. To send an IP datagram over an Ethernet network, the IP layer passes the datagram to the Ethernet controller’s driver. The driver instructs the Ethernet controller to transmit an Ethernet frame containing the datagram, preceded by a header that contains addressing and error-checking information. To receive an IP datagram from the network, the Ethernet controller checks to see if the destination address matches the interface’s hardware address or a multicast or broadcast address that the controller is configured to accept. If there is a match, the controller checks for errors and the driver passes the datagram or an error indication to the IP layer. This cannot be directly implemented in PLC, and the protocol algorithm for TCP/IP cannot be directly configured in PLC. But in the meanwhile, in embedded controllers, it can be implemented and can be used for various applications based on the user needs.

RS 232, a standard and simple protocol that interfaces the PLC and embedded controller

An RS-232 serial port used to be a standard feature of a PC that is used for connection to printers, modems, data storage, mice, uninterruptible power supplies, and other peripheral devices. However, the low transmission speed, large voltage swing, and large standard connectors promoted development of the Universal Serial Bus, which has supplanted RS-232 in most of its peripheral interface roles. Many modern PCs have no RS-232 ports and must use either an external USB-to-RS-232 converter or an internal expansion card with one or more serial ports to connect to RS-232 peripherals. RS-232 devices are still found especially in industrial machines, networking equipment, and scientific instruments. Most of the PLC and other instrumentation devices have this serial port, and through this port, we can communicate with the embedded controllers. It supports full duplex communication, and it has to be configured at both ends for proper synchronization.

Conclusion

A Web PLC used for data acquisition and control, based on embedded web server, has been explained, implemented, and tested successfully. The system adopts browser/server mode and controls the remote systems. Therefore, remote users can control and manage the operation using a web browser over the Internet. With the rapid development of industrial process control and the wide range of applications in network intelligence, it is necessary to make the data accuracy and reliability of a control system higher. This embedded system can adapt to the strict requirements of the data acquisition and control systems such as the function, reliability, cost, size, power consumption, and remote access. This system is operated by an embedded web server to acquire the signals and control the devices remotely. Embedded web server mode is used to share the data with clients online. This system is a substitute for PLC – SCADA system. Do share your comments and doubts.

Leave a Reply

Learn latest developments happening in the embedded systems domain. Read our Whitepaper, “Embedded The Latest Trends in Embedded Systems Development.”