The field of industrial networking is one of the areas that need to learn and keep up to date with the latest information. To simplify that I will present articles in the simplest direction, easiest to understand and important to apply into effective practice. If you don't have any specialized technical knowledge! Do not worry that I will explain it to you as quickly as possible, but if you are a technical background then this is a great article for you, you can use the ideas I mentioned to transmit. reload the team you know most easily. Now I invite you to join me in reading the article with the content I have selected just for you below!

The Difference between Serial Device Server and Gateway Device

Before mentioning the above title, you have heard about serial port communication or RS-232 / RS-485 / RS-422 port communication. Essentially what it is that 90% of industrial equipment uses. In fact, this communication appears quite as early as the RS-232 appeared from 1960 used for connecting printers to PCs, receipt printers at convenience stores where you usually receive paper Small, this device connects to the computer via DB9 and DB25 ports (Illustration 1-2). Reading here may have felt strange. However, some brothers / sisters who have used a computer in the past will know this connection. To make the connection simpler, now you often use a USB port to connect? Or RJ45 LAN Port plugged into the computer, right? So you already know the picture of the connection port, USB, RJ45, then via RS-232/485/422 communication will also have a separate shape, you can use google to check the DB9 or DB25 port. . Nowadays, with the improved connectivity, with the RJ45, USB or Terminal (screw type) interface we will also have RS-232/485/422 communication. Of course I do not mention the principle or how to communicate. Here I will make the information easier to understand as follows: for example, human communication language (for the device I call protocol) can be English, Japanese, Vietnamese, ... When it comes to protocol, be it Ethernet network communication protocol, connection for USB, connecting printer by RS-232 protocol, RS-485, or 3G radio connection. Each language is different as well as the connection protocol is different right! As for the mouth-shaped mouth (I call the physical communication port when using the device) if someone has a large, small or moderate mouth, the physical connection in the device can be a USB, RJ45, DB9, connection. .. I think a simple example of the body and human language will be the most closely related to the upcoming information I'm sharing with you and this article is less dry and I always believe that it would be easier to understand than to read the theory of "vegetarian".

So I would like to repeat that for a network communication device there will be some common words as follows: Physical connection and communication protocol

Having been talking for quite a long time, now I get to the main article:

Currently, DB9, DB25 physical connection ports no longer appear on computers today, including desktops, giving way to Ethernet connectivity with RJ45 ports or USB ports. With the trend of IioT (Industrial Internet Of Thing), it is natural to upgrade the connection to adapt to the trend. So the transition from RS232 / 485/422 port to Ethernet RJ45 port is of course going on. A question arises. Why don't we convert devices like printers, POS machines to Ethernet ports but need an intermediary device to convert? Actually, when the equipment infrastructure is running stably and there has been no problem, it is impossible to change the whole system. However, in order for the devices with the old protocol to become smarter and more modern, an intermediate device is required to convert. This conversion also requires sufficient knowledge to choose a suitable device.

On the market today, it is also converting from RS-232/485/422 protocol to a physical port, Ethernet RJ45, but there are 2 product lines with the name you often hear Serial Device Server and Gateway.

So: What is the difference between a Serial Device Server and a Serial to Ethernet Modbus Gateway Device?

I would like to give the following information:

When you hear the word Serial Device Server it means it is the host of the serial port device (The device here is the printer, the POS machine has RS-232-485-422 protocol), these devices are connected. Connect to a computer using Ethernet protocol. The thing to know here is that if you use a Serial Device Server device, the data is transferred in the original data format and on your computer there is a program running and communicating in the COM port format. virtual or TCP Client-Server. In fact, if you used USB-COM to connect the device with RS-232/485/422 connection to your PC, using the Serial Device Server device will bring connection from the DB9 physical port (RS232 / 485 / 422) to the very modern RJ45 Ethernet port right now.

Example: Currently I have a receipt printer or a scale terminal connected to RS232 or RS485 (1 machine can only use 1 type of protocol) with a computer made before 2005. Now the problem is like hey. The computer was damaged and needs to buy a new computer now, however the initialization software and program are still available. Now the computer has only USB or Ethernet RJ45 port, if using USB only 3-6 meters can not pull the cord, but if using an ethernet connection I can pull the network cord up to 100 meters (Ideal) It's only 80-90 meters in fact, guys. Thus, by equipping the Serial Device Server and implementing the communication declaration according to the COM port, the connection to the device with the old protocol RS-232/485/422 is extremely convenient, right? In fact, for the Serial Device Server there are many applications and functions that you have not fully exploited and the duration of this article is not enough for me to mention (for another article). I would like to mention an interesting function that you may be interested in, for the Serial Device Server you can use 2 to 4 computers simultaneously connected to a printer connected to the DB9 port (RS232 / 485 / 422) there. The picture below will help you understand better!

Before coming to Gateway device for RS-232/485/422 connection I will mention the following devices, usually the meter or multimeter, industrial sensors will use Modbus RTU protocol ( RS232 / 485/422). What is Modbus RTU? Then you just understand it is a kind of protocol (language).

For Modbus RTU language (RS232 / 485/422), the manufacturers will let you know the address of the register (this word is somewhat specialized) roughly the address for you to get data. For example, a multipurpose meter that measures voltage (volts), amperage (ampere), frequency (hz), for the Modbus RTU protocol, the meter manufacturer will give you a table site where you can get the site and use it for readable software (Scada). Now that the problem is raised again, the factory is trying to upgrade to online surveillance, .. but by Ethernet protocol. Now Modbus RTU is older and there is no built-in Ethernet connection. Note that reading here you will ask the question why not use a Serial Device Server device. Answer Serial Device Server is only for original packets, the manufacturer has integrated the software and only that software can read it, they will not publish the address table and you have to be a master of programming. The new TCP Socket can be intervened, sounds complicated and seems time-consuming to learn => not feasible, right? You will now hear the term protocol converter. Modbus RTU is a kind of protocol, to connect to Ethernet in this case I use Modbus TCP (Also a kind of ethernet protocol, transmitting modbus packets in ethernet format, like that). Now you may be wondering why I do not switch Modbus RTU protocol to Profinet protocol, Ethernet / IP protocol ... This article I just want to talk about common protocol and especially that protocol is free, community Pretty large user (I mean Modbus TCP).

In fact, Ethernet packet communication software now comes with the Modbus TCP standard. Remind the different Modbus RTU and Modbus TCP protocol. However now we always have a choice of protocol converters (I mean: this device is a language translation interpreter so the terminal can be a power meter with Modbus protocol. RTU (RS232-3-wire physical communication, RS485-2-wire physical communication, RS422-2-wire physical communication) .In order for modern software now to understand this protocol, for example I have software monitor WinCC from Siemens or MC Works64 from Mitsubishi both have an interface that supports Modbus TCP.Why use this software, in the simplest sense: it is used to monitor all devices with protocols that it supports, type you want to monitor voltage with electric meter, you have to get the voltage address (Register) of the meter and declare it in the software, because it has the same language so the software will recognize it and the rest is you Design display according to your needs (draw digital clock,… ..). For advanced features, you can use Google to learn more).

Here I summarize the Gateway device used to convert Modbus RTU protocol (RS232 / 485/422) to Modbus TCP is like this!

Serial to Ethernet Switch Modbus Gateway - The gateway to connect serial devices RS-232, RS-422 and RS-485 is still DB9, Terminal. This device can convert protocol from Modbus RTU / ASCII to Modbus TCP and vice versa. It should be noted that instead of using a virtual COM port as a Serial Device Server, a Serial to Ethernet Modbus Gateway device can connect a Serial device by finding an IP address using Modbus TCP (Remember the IP of the Gateway device. Please). The picture below will let you know.

Some examples of application in practice: Serial Device Server and Serial-Ethernet Modbus Gateway;

You need to process the data of the barcode reader (RS-232 communication) or printer (with RS-485 communication) for which you already have the software from the manufacturer,

In this case, the Serial Device Server can convert the RS-232 or RS-485 communication to the RJ45-Ethernet port without any change in transmission data. We need to install a virtual COM port on the computer and a separate software. Again, though connecting by RJ45 (Ethernet) port, the Serial Device Server role in this case is to create virtual COM to connect.

Need to extend the RS-232 communication over Ethernet using a specific protocol device, with an Ethernet cable length expandable from 50 meters instead of an RS-232 cable that only lasts up to 15 meters?
In this case, use two Serial Device Server devices in pair connection mode. This allows data transfer from one RS-232/485/422 port to another RS-232/485/422 port over an Ethernet network (Cat 5 / 5e cable, ...) without any changes to the that port. The signal can be transmitted up to 90 meters or if the LAN infrastructure has the same network layer you can connect the signal from point A to point B with the same RS-232/485/422 signal.
Need to convert RS-232/485/422 signals to TCP Socket signals?
In this case, you need to use a Serial Device Server, the raw RS-232/485/422 signal is converted via Ethernet to transfer the packet to the Socket format, you actively program your application, then TCP Server and TCP Client features will help you with this.
Do you need to connect the RS-485 module of the input-output to the Modbus RTU protocol over Ethernet (Modbus TCP) to a remote computer on which the SCADA system is set up to read the Modbus TCP signal?
The best way to do this is to use a Serial-Ethernet Modbus Gateway device to convert the Modbus RTU (RS-232/485/422) to the Modbus TCP protocol. Modbus Gateway Serial-Ethernet devices are specifically designed to work with Modbus protocols; Furthermore, it functions correctly when communicating protocols and minimizes the risk of data loss.
You need to connect a Modbus RTU power meter to a computer that lacks a COM port and is located in the building next to you. Is available software only recognizing Modbus RTU and not working with Modbus TCP?
• Use the Serial Device Server to create a virtual COM port on the computer, so that the protocol remains the same.
• If using the Serial-Ethernet Modbus Gateway series, you need to see if the device supports the extender functionality to create a virtual COM port. The protocol is, of course, still Modbus RTU.
Here I know you still have a lot of questions to answer, if my answer does not convince you, please email me directly to ask questions and discuss. I am ready to talk to you. Thank you.