Modbus server not allowing use of regfile

Hello

I have configured modbus to mqtt on my TRB246 (fw 7.13.4) As follows

TCP server

Serial server

I share /tmp/regfile, because I have external serial client which feeds data to TRB, then i have TCP client on TRB which reads data from TCP server. This data are used for data to server MQTT.

Data flow

PLC >>> modbus serial >>> TRB Serial server >>> TRB TCP server >>> TRB TCP client >>> Data to server via MQTT

I have now new TRB246 with fw v7.17.1. It is different and is not allowing me to use /tmp/regfile on both servers.

Any idea?

Greetings,

We will have to inquire with our R&D whether multiple services can share the same /regfile or not. Once we have an answer, we’ll get back to you.

Regards,
M.

1 Like

Hello,

Coming back to you with a response from our R&D. There was a decision made to go from 1 Global custom block to separate ones, which is why you’re unable to set the same regfile on a few different services. If this is necessary for your setup, you can access your device SSH by following this guide: Command Line Interfaces - Teltonika Networks Wiki

Afterwards, you can enter the command vi /etc/config/modbus_server and press the i button on your keyboard to begin editing the file. You can then manually enter the regfile location into each one of your servers and save by pressing ESC key on your keyboard, and entering :wq to save.

Additionally, I’d like to inquire - wouldn’t Modbus Serial → MQTT work with your setup as well?

Regards,
M.

Hello

It doesn’t look to work the solution where manually setup config file. How to configure modbus to MQTT?

I have the following configuration

PLC >— (serial modbus 485) —> TRB >— (mqtt) —> MQTT broker

I have to send some registers as JSON to MQTT broker.

Hello,

You would simply set up data-to-server and select MQTT as the option to forward the data to: https://wiki.teltonika-networks.com/view/TRB246_Data_to_Server

Kind regards,
M.

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