Modbus TCP Client to RS485 Client

Hello,

I’ve been searching this forum for a long time but unfortunately haven’t found an answer to my problem yet.

Is there a way to connect a Modbus TCP server device to a Modbus RS485 master device via a Teltonika RUT956?

It would be the following devices:
Janitza UMG604Pro (Modbus TCP Master, Unit ID: 1)
Huawei SmartLogger 3000 (RS485 Master)

The Janitza’s data must be able to be queried by the Huawei SmartLogger.

Connection:
Modbus TCP Master ID: 1 → (Modbus TCP Slave = Modbus RS485 Slave ID: 1) → Modbus RS485 Master

The RUT956 would therefore have to function as a TCP Slave to RTU Slave converter.

I have often seen the case with a TCP Master here but not with a slave.

Can anyone help me with this?

Hello,

It seems that you are looking for Modbus TCP over Serial Gateway feature here. With this, you should be able to redirect TCP data coming to a specified port towards the serial (Modbus RTU) device. For testing, I would also suggest putting 0.0.0.0/0 in the IP filter section to ensure that the traffic is not dropped.

Let me know if you encounter any issues.

Kind Regards,

Thanks for your answer.

As far as I understand, the Modbus TCP over Serial Gateway feature is for requests from a TCP device to an RTU slave device.
I need the connection from a request from an RTU master device to a TCP master device.

Or have I misunderstood that?

Just a thought:
Why are you not running the Janitza UMG604Pro as a Modbus RTU (RS485) Slave…?

For my understanding, two Masters are not working together. A Master will trigger his - known - Slaves, Slaves have to wait for a trigger… A Master can not be triggered by a Master (so far I know…)

Kind regards

The UMG604 has a TCP and RTU interface.
As far as we can, we always use the RTU interface so that we don’t need a converter. However, we have already had the case where we had to dig 500m of trench just for a data cable even though there was already a fiber optic/Ethernet connection.
Therefore we need the TCP interface there.

I understood it as follows. The UMG 604 is an RTU slave. It means it is queried by the RTU master. This means that a master can query several slaves, but a slave can “actually” only query one master.
At the same time the Janitza is a TCP master. This makes its data freely available and waits for queries from TCP slaves.
The master-slave relationship is reversed with RTU and TCP. Correct me if I am wrong!

We have also used such protocoll converters in the past. Here’s an example:
⁣Gateway Modbus TCP zu Modbus RTU (wachendorff-prozesstechnik.de)

Since we always use a RUT956 in our projects anyway, I thought we could save on the converter, which is more expensive than a RUT956 anyway.

Hello,

Apologies. I thought its actually Client/Server communication.

As Solarix mentioned, the Client (Master) requests information from the Server (Slave). The server does not request information from the client. The server ‘serves’ data to the client that requests it. If you need to read some registers from one of those devices, then I would assume that one of those devices can actually act as a server. Could you please check that?

As for Modbus TCP and RTU, the main difference is in the communication protocols. Modbus RTU uses serial connections, making it suitable for local communication via RS232, RS485, etc, while Modbus TCP can operate over TCP/IP, allowing it to be used on LANs or over the Internet, for example.

Kind Regards,

The connection to the UMG604 via Modbus TCP is done by reading the holding register 03. This means that the RUT956 has to read this register as a Modbus slave and remembers/saves this value. The data logger would then also query the RUT956 via Modbus RTU on the holding register 03 in order to get the same value from it.

Below are the schematic representations of the TCP and RTU network structures. As I already said, a data logger in the RTU network would be a master and therefore equivalent to a data logger in the TCP network as a client

RTU
TCP

The implementation of this connection is already possible as described with the above-mentioned component.
Now the question is whether the Teltonika can do this too?
It can carry out the respective function as master/slave/client/server. But can he also serve as a converter in between?

This topic was automatically closed after 15 days. New replies are no longer allowed.

Hello @GPV,

Apologies for the delayed response.

There’s no such feature on RUT956. You can try to implement your own workaround using scripts and Custom Modbus Registers. The idea is that you would create a script to get Modbus data from UMG604 registers and store it in a custom Modbus registers block (a separate file). You can utilize crontabs to execute your script (send modbus requests to UMG604) periodically. Then, you can read those custom registers from RUT956 via Modbus RTU.

For Scripting, refer here.
For Crontabs, refer here.
For Modbus CLI commands, refer here.
For Modbus Custom Registers, refer here.

Kind Regards,

This topic was automatically closed after 7 days. New replies are no longer allowed.