Connecting a Serial Device to a TCP/IP network

Most modern electronic instruments including measuring tools and laboratory instruments (balances, electrochemistry meters, spectrometers, spectrophotometers, etc.) interface to a computer using a standard RS232 serial cable connection. The RS232 protocol has been around for many years and is well established with a number of inexpensive hardware and software solutions available for it. Almost all computers are equipped with at least one RS232 port with inexpensive add-on adapters widely available. There are also hundreds of software applications available for communicating with instruments through RS232 connections. Because of the flexibility and the ubiquity of the RS232 standard, it is likely to continue being relevant well into the future. Many newer devices that connect to a PC’s USB ports are shipped with drivers that emulate a RS232 port so that they remain compatible with RS232 communication software.

The problem with RS232 communications is that it requires a point-to-point cable connection that is limited in the distance that you can run a cable. You must also run a separate cable to a unique RS232 port on a PC for each instrument that you need to communicate with. If you want to connect multiple devices to a single PC, you must install multiple RS232 ports on the PC.

If the RS232 standard were to be improved upon, it would allow multiple connections through a single cable, there would be no restriction on the cable length and it would remain 100% compatible with all existing RS232 communications software.

Fortunately there is a very simple way to accomplish all of the above improvements (and more) using inexpensive hardware or software (TCP-Com). The trick is to use a RS232 to TCP/IP converter (like TCP-Com or a hardware based “Serial Device Server”) to convert the RS232 serial connection to a TCP/IP network connection. You would then be able to use an existing Ethernet network as the backbone for connecting all the RS232 instruments to all the PCs in a network or even across the Internet.

You could use either a small hardware device called a “Serial Device Server” or you could use our TCP-Com software to expose the serial ports on a PC to a TCP/IP network. TCP-Com essentially allows you to use a PC as a Serial Device Server.

The way that it works is that you use your existing network instead of running RS232 serial cables and then connect the RS232 serial instruments directly to the network using an appropriate (hardware or software) converter. A hardware based Serial Device Server is a small box that has a RS232 serial port on one side and an Ethernet connector on the other. It is basically a small computer that establishes a network connection and then feeds any data that it receives through the RS232 port out over the network connection through a TCP/IP network port and vice versa. The hardware device servers must be connected to a hub or switch using standard network cables. The TCP/IP network protocol is used to pass data across the network. This means that each serial device server would need to be configured with a unique IP address just like each PC connected to a TCP/IP network has its own unique IP address. The serial device server becomes just another node on the network.

TCP-Com is a program that you run on a PC to expose the serial ports on that PC to the network. In other words, it does the same job as a hardware based Serial Device Server except that it is a software program that you run on a PC. You still connect the instrument to a RS232 serial port on the PC, however the PCs network connection is used to share the serial ports on that PC with other workstations in the network. The IP address of the PC where TCP-Com is running is used for all of the exposed serial ports on that PC and you configure TCP-Com to feed data from each serial port through a different TCP/IP port.

To make everything work transparently with existing software, you would also need the ability to create a “Virtual COM Port” on every PC in the network that needs to communicate with each RS232 device. The “Virtual COM Port” tricks your PC into thinking that the serial port on the Serial Device Server (or TCP-Com) is actually a RS232 port installed locally on your PC. In other words, the “Virtual Serial Port” behaves just like a physical RS232 serial port except that it establishes a TCP/IP connection through the network to the RS232 port on the Serial Device Server. Any existing software that is designed to communicate with a RS232 port would then be able to open the RS232 port on the Serial Device Server as if it were a RS232 port installed directly in your PC. You can think of it as using your network as an RS232 serial cable. Not only do you gain access to all your RS232 instruments from any PC connected to your network (or across the Internet if configured correctly), you do away with having to run cables directly from a device to a specific PC. If you use hardware based Serial Device Servers, none of the PCs that you might want to use will need any RS232 serial ports at all.

In addition, with the right software or hardware, more than one workstation can communicate with the same RS232 device simultaneously – something that is not possible with RS232 devices that are connected directly to a PC.

Note: Some hardware based Serial Device Servers come with Virtual COM Port drivers however for the ones that do not, TCP-Com can be used to create the Virtual COM Port connection to a Serial Device Server.

Contact Us