Contrary to popular belief, serial port technology from the IT Stone-ages is still alive and kicking.
In the industrial IoT area, serial communication has been proven to be reliable, simple and trustworthy. So if you enter a regular plant, sooner or later you will find some thirty year old device which is still talking serial.
The protocol on serial ports can be a very simple, human readable output. You see this a lot with devices which are/were connected to a (matrix) printer. Each measurement (like the weight from a scale) was printed on one line. You still read these simple lines deviced by carriage return/line feed.
But output can also be more elaborate like NMEA, Telegram or even more exotic formats.
If we are looking at the RS-232 protocol, there is an important physical limitation: the cable length. The communication becomes less reliable when the length of the cable is increased. It’s possible to compensate with eg. a lower baudrate or better quality of cable. The rule of thumb is a maximum of 50 feet/15 meters but I recommend up to 13/feet/3 meters.
Is it possible to bypass this limitation? Yes, this enters the virtual serial port.
With this solution, the physical cable is plugged in into a so-called Device Server or Device Gateway. This gateway is then connected to the same IP network as your target device is (eg. an industrial PC). On this industrial PC, virtual port drivers are loaded which mimic the physical ports on the gateway. The network and gateway becomes transparent for the RS-232 protocol.
So the maximum length of a serial cable can be extended dramatically with the reach of the local IP network.
Let’s check out how this works with a Moxa NPort 5210A Serial Device Server.
Doorgaan met het lezen van “Accessing virtual serial ports in Linux using Serial Device Server”