Hello everyone,
I am using a Teltonika TRB256 for my IIoT project. Currently, I’m reading PLC register data through Modbus TCP/IP.
For the write part, I am planning the following flow:
TRB256 → MQTT Broker → TRB256 → PLC.
The idea is to publish a write request from TRB256 to my MQTT broker, then have TRB256 subscribe back to the topic, parse the payload, and send the corresponding Modbus write command to the PLC.
Can anyone confirm if TRB256 supports this workflow directly, and share guidance on how to configure the MQTT → Modbus write mapping?
Thanks in advance for your help!
Greetings,
Yes, the TRB256 does support this workflow.
You can achieve this by using the MQTT Modbus Gateway service. It should work great for your use case.
Detailed information, along with configuration instructions, can be found here: https://wiki.teltonika-networks.com/view/TRB256_Modbus#MQTT_Modbus_Gateway
Please let me know if you need any further assistance.
Best Regards,
Justinas
Hello Justinas, thank you for your reply.
While adding the instance in the Device option, I can see only RS485 or RS232 available. However, in my setup the PLC is connected via Modbus TCP (not RS485/RS232).
Could you please suggest whether it is mandatory to use RS485 or RS232 for the write function, or can I achieve this directly through Modbus TCP on the TRB256?
Thanks again for your guidance!
Modbus TCP can be used to read from and write to Modbus registers on the RUT device itself, as well as on any connected devices. A serial connection is not required.
Apologies for the oversight in my previous reply, I didn’t include the configuration example link. You can find it here: https://wiki.teltonika-networks.com/view/Modbus_TCP_Master_MQTT_Gateway
In your case, there is no need to configure the Modbus TCP server.
Best Regards,
Justinas