Technical Article

Working With Legacy Systems—Why Use Serial to Ethernet Converters?

June 30, 2022 by Antonio Armenta

One common challenge when working with legacy control systems is establishing communication with old devices that use old protocols like RS232 and RS485. Learn about the importance of converting from serial to Ethernet.

For many of us, it feels odd to view RS232 as an obsolete technology today when it was so widespread just a little more than a decade ago. But, as we know, the world of personal computing has completely discontinued it to the point where even RS232 cables are hard to find. On the other hand, the industrial automation sector has not moved away from RS232 as quickly as personal computers, still counting with a large installed base of serial-based devices


Serial to Ethernet communication conversion is a critical task

Figure 1. Conversion from serial to Ethernet communication is a critical task, especially in legacy control systems. 


Ethernet is the most popular network communication technology today. Therefore, establishing interfaces between serial and Ethernet-based devices is crucial for integrating control systems from different generations.

This article will explore a few scenarios and options when conversion is needed between serial and Ethernet, in either direction.


Serial and Ethernet Communication—Protocol Differences

Let us first look at the differences between serial and Ethernet communications to get a better idea of the reach and limitations of the conversions. First, serial communication is designed for point-to-point interfacing. While setting up a serial-based network is possible, they are unreliable at long distances and do not support many devices. Ethernet, on the other hand, supports large networks and long distances.

There is another key difference in terms of the OSI model layers used. Serial establishes a connection only at the physical layer, while Ethernet is a multilayered protocol. Serial is much slower than Ethernet regarding transmission speed, with a supported maximum baud rate of only about 1 M bit per second, and even lower for many applications.


Serial port pinout

Figure 2. Serial port pinout. Image used courtesy of US Converters


Considering these differences, we can say the serial protocol will be the limiting side of speed and flexibility. Also, use cases for serial to Ethernet conversion will be for point-to-point communication most of the time, which does not mean there are few applications. 


Serial to Ethernet Adapter

Serial to Ethernet adapters are devices that convert data packets back and forth between the two protocols. These adapters come with one RJ45 port and one serial port, usually for the familiar DB9 connector of the RS232. Many of these adapters are available in the market, even on sites like Amazon and eBay. 

For control applications, it is crucial to choose adapters from reputable vendors with experience in this sector. Moxa is one of these vendors and one of the leaders in networking solutions for the automation industry. 


The NPort

Figure 3. The NPort, a serial-to-Ethernet converter from Moxa


The adapters will come with a programming tool that can be locally installed on a personal computer or accessed via a web browser. The programing tool facilitates the parametrization of the two ports. For the Ethernet port, it is possible to configure the IP address, MAC address, gateway, and other networking settings. Likewise, the baud rate and some timeout parameters can be configured for the serial port.

Some advanced adapters will let the user choose from different operating modes, including Real COM, UDP, TCP Server, TCP Client, and Telnet.

Serial to Ethernet adapters are comparatively more cost-effective than many automation devices. They are also easy to install as part of a control rack and easy to configure.


Virtual COM Port

Virtual serial ports (VCOMs) are software-based ports that emulate serial communication. A VCOM is created using a dedicated application running on a Windows operating system. 

A VCOM can convert serial-to-Ethernet communication entirely without the physical media. For instance, a VCOM can capture data packets coming from a wireless network to a specific port and translate them to the serial protocol. The data packets are then forwarded to the designated port number (COM number) within the same computer.


VCOM port configuration
Figure 4. An example of a VCOM port configuration. Image used courtesy of Netburner

VCOMs are not yet widely utilized in industrial automation, but that could soon change as more previous generation serial devices need to take a generational leap and integrate directly into the cloud through an Ethernet-based network.


Where are Serial to Ethernet Adapters Used?

One still common application of serial-to-Ethernet conversion is to establish a connection between a personal computer and a legacy PLC. In this case, a serial to Ethernet adapter is a suitable solution. The Ethernet side would be connected to the computer and the serial side to the PLC. This works well when the PLC programming platform is Ethernet-based.

However, there are also times when the programming software interface requires serial communication (imagine a microprocessor IDE with ‘serial print’ and ‘serial read’ commands). A VCOM would be the right solution in this case. However, it would need to be used together with a physical adapter to work well. If the field device is Ethernet based, it may be necessary then to use the serial to Ethernet adapter, but the roles are reversed from the PLC programming instance.

Virtual machines are another excellent example of the application of serial to Ethernet. It often becomes necessary to use virtual machines that run old operating systems. Fortunately, virtual machines can create VCOMs. These VCOMs, nested within a virtual machine, can then be forwarded to the outside world following the previous methods.

Having the possibility to access a serial device from anywhere via Ethernet is perhaps the most significant advantage of the conversion. Many specialized serial devices are still in use today in control systems, including weight scales, scanners, sensors, and printers. Thanks to serial to Ethernet converters, it is possible to integrate and monitor these devices as if they were part of an Ethernet network.