How to obtain data from several RS-232/422/485

20 February 2019 Knowledge Base
11aa5fab51c375cce3ecb3d8af8bdd6c.png

Content:

Every now and then, we come across a problem of obtaining data from remote devices over such serial interfaces as RS-232/422/485. This goal here can be achieved by a number of means.

Forward RS-232/422/485 through fiber optics

It often happens that it is required to connect a RS-232/422/485 interface device to another similar device or a PC, however, this another device is located rather far away or is placed awkwardly. The conversion of RS-232/422/485 interface to fiber could be applied here. Meanwhile, such conversion can be done in several ways, each having its own peculiarities. Let’s consider these alternatives. The examples will be given on the basis of RS-485, as it is applied in PCS more frequently, however, the offered solutions can be applied to RS-232/422 as well.

RS-485 network extension through a media converter

Usually, the RS-485 network can be extended for several kilometers by means of a media converter.

827925098b6767ea8b0e991527844576.jpg

In this case, we use two media converters connected with fiber optics. The data is transferred seamlessly, as if no fiber optics is applied.

As a media converter merely converts signals, its fiber optic output can’t be connected to a fiber optic Ethernet switch. You will have to lay fiber optics from one media converter to the other in Peer-to-Peer scheme.

The examples of equipment: TCF-140 and ICF-1150.

In some cases, when you have the fiber optics, which is connected to an Ethernet switch, already laid, the following scheme may come in handy.

07e7dc978f6a6edc908fcd0d6041191b.jpg

There are two connection schemes possible:

1) Forwarding RS-485 through two serial interfaces servers connected by fiber optics. One COM port is connected to the other by means of Peer-to-Peer connection.

d2183113d31a17dd8663bea229709da4.jpg

2) Connecting RS-485 to a serial interface server and obtaining data on the other end of the line my means of either a ‘virtual COM port’ or using TCP Client-Server technology.

927f15a3cfba58b9caada3e18be7b4d4.jpg

The example of equipment: NPort-5000.

Extension of RS-485 network by means of fiber over Ethernet network with Modbus protocols conversion

If your device has a Modbus RTU protocol, the best solution would be the conversion of Modbus RTU protocol to Modbus TCP and operation on the upper layer via Modbus TCP.

We would need Modbus protocols gateways for this. The gateways control the protocol and convert it accurately.

There are two connection schemes possible:

1) Connecting RS-485 to a protocol gateway and obtaining data on the other end of the line via Ethernet over a Modbus TCP protocol.

f015944ca11773e8839a5a6a1e00c11d.jpg

2) Forwarding RS-485 through two protocols gateways with conversion of Modbus RTU to Modbus TCP and back to Modbus RTU.

a1f8f750c9afd1c18e90187c74ac8d5d.jpg

The example of equipment: MGate.
In this article a Peer-to-Peer connection was considered.
What if we reduce the amount of fiber optic lines and use a ring topology?
This is possible, let us consider the examples further.

TCF-142 and ICF-1150 in the ring mode

Converters of RS-232/422/485 interfaces to fiber of TCF-142 and ICF-1150 series allow easy conversion of serial interface to fiber and support fiber ring type of connection in a half-duplex mode. In this mode, data can be only either transmitted, or received, at a time.

Converters are connected to each other as described on the scheme below

6a746f0679a026f865d53b8ef82626a0.jpg

The command from the first module goes to the second one, get translated to a COM port, and then goes to the third module. So, it makes a full circle around the fiber ring, and is dropped after coming back.

Thus, a system with total optic fiber length of up to 100 km can be created.

In this scheme, the data type does not matter, so, a Modbus RTU or any other protocol can be transmitted.

When applying this scheme, one should keep in mind, that this optic fiber is not Ethernet, so it is impossible to connect an Ethernet switch to this system.

Pros:

  • Simple scheme
  • Low-cost solution

Cons:

  • Half-duplex operation mode
  • Single optic fiber breakage knocks out the whole system

Equipment: TCF-142 and ICF-1150.

Network based on Ethernet switches with Nport

Another option is to apply managed Ethernet switches with two optical ports.

We construct a redundant network, and, in each segment, deploy a NPort serial interface server for converting RS-232/422/485 to Ethernet.

This scheme allows to additionally connect any Ethernet equipment (even on a later stage of operation), which the previous scheme with TCF-142 and ICF-1150 is not capable of.

The type of data to be transferred in this scheme does not matter.

NPort in RealCOM mode

In RealCOM mode, each NPort creates a virtual СОM port on a PC through which it is possible to address directly to a device connected to NPort

c6bfff5c518dc1e596d3b57bf7dfa6e0.png

NPort in UDP mode

UDP mode allows setting up the data transmission to several IP addresses that corresponds to the broadcast messaging.

a2d6a0717b2003106714a067288da06c.png

NPort with an embedded switch

There exist NPort series with an embedded managed switch that support redundancy. For example, NPort S8000, NPort S9000 and NPort 6600 (models NPort 6450, 6610, 6650). Thanks to the combination of functions of an NPort and a managed switch, these devices will cost less than those two separately, thus, allowing you to save some money.

The connection scheme will look as follows.

19e815dd8a3da9456df4065667e36108.png

Pros:

  • Communication networks redundancy;
  • Additional Ethernet equipment (except for NPort 6600) can be connected.
  • The cost depends on the problem to be solved.

Cons:

  • Average complexity.

Equipment: managed switches EDS, NPort series, NPort S8000, NPort S9000, NPort 6600.
For example: managed EDS-508A-SS-SC , NPort IA5150, NPort S8455I-SS-SC, NPort 6610-16.

Modbus protocol details

When applying a Modbus RTU protocol, it is advisable to convert Modbus RTU protocol to Modbus TCP using a gateway, e.g. MGate MB3170. In this case, the upper layer works with the Modbus TCP over an IP address.

Pros:

  • The gateways are designed for accurate conversion of Modbus RTU protocols to Modbus TCP

Cons:

  • Your system may not support operation over Modbus TCP
  • No support of ring topology

For example: MGate MB3170.


For further information and for the orders please contact our sales team sales@ipc2u.com

Fast Product Request