ADVANTECH Protocol MODBUS-RTU2TCP Router App User Guide

June 14, 2024
Advantech

ADVANTECH Protocol MODBUS-RTU2TCP Router App

Product Information

  • Protocol: MODBUS-RTU2TCP
  • Manufacturer: Advantech Czech s.r.o.
  • Address: Sokolska 71, 562 04 Usti nad Orlici, Czech Republic
  • Document Number: APP-0056-EN
  • Revision Date: 26th October, 2023

Disclaimer: Advantech Czech s.r.o. shall not be liable for incidental or consequential damages resulting from the furnishing, performance, or use of this manual.

Trademark Notice: All brand names used in this manual are the registered trademarks of their respective owners. The use of trademarks or other designations in this publication is for reference purposes only and does not constitute an endorsement by the trademark holder.

Product Usage Instructions

Changelog
Refer to the Protocol MODBUS-RTU2TCP Changelog section.

Router App Description
The Router app Protocol MODBUS-RTU2TCP is not included in the standard router firmware. To upload this Router app, follow the instructions in the Configuration manual (see Chapter Related Documents).

The router app enables the conversion of Modbus RTU messages received via serial line to Modbus TCP protocol.

Figure 1: Router with router app converting data from boilers to SCADA (image not included)

The router app can store received data on a USB flash stick if there is no TCP network connection (Internet) available at the moment. The data will be resent when a connection is established, ensuring the proper order of data.

MODBUS RTU and MODBUS TCP Protocol

The router app provides the conversion of MODBUS RTU protocol to MODBUS TCP protocol.

The MODBUS RTU protocol runs on a serial line, and the router supports RS232 or RS485/422 expansion ports for this purpose.

Figure 2: Modbus message on serial line (image not included)

When sending MODBUS ADU on the TCP/IP, the MBAP header is used for identification. The TCP port 502 is dedicated for MODBUS TCP ADU.

Figure 3: Modbus message on TCP/IP (image not included)

Configuration

To configure the router app Modbus RTU2TCP, use the Web interface. Access it by clicking on the Router Apps page and then selecting the name of the router app. The configuration page is labeled “Config,” and there is a “Return” option to go back to the router’s Web interface.

Figure 3: Configuration form (image not included)

Advantech Czech s.r.o., Sokolska 71, 562 04 Usti nad Orlici, Czech Republic Document No. APP-0056-EN, revision from 26th October, 2023.

© 2023 Advantech Czech s.r.o. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photography, recording, or any information storage and retrieval system without written consent. Information in this manual is subject to change without notice, and it does not represent a commitment on the part of Advantech.
Advantech Czech s.r.o. shall not be liable for incidental or consequential damages resulting from the furnishing, performance, or use of this manual.
All brand names used in this manual are the registered trademarks of their respective owners. The use of trademarks or other
designations in this publication is for reference purposes only and does not constitute an endorsement by the trademark holder.

Used symbols

  • Danger – Information regarding user safety or potential damage to the router.
  • Attention – Problems that can arise in specific situations.
  • Information – Useful tips or information of special interest.
  • Example – Example of function, command or script.

Changelog

Protocol MODBUS-RTU2TCP Changelog

  • v1.0.0 (2015-07-31)
    First release

  • v1.0.1 (2015-11-04)
    Added option “Slave ID”

  • v1.0.2 (2016-11-10)
    Fixed bug in uart read loop

  • v1.1.0 (2018-09-27)
    Added support of ttyUSB

  • v1.1.1 (2018-09-27)
    Added expected ranges of values to JavaSript error messages

Router App Description

Router app Protocol MODBUS-RTU2TCP is not contained in the standard router firmware. Uploading of this Router app is described in the Configuration manual (see Chapter Related Documents).

Modbus RTU2TCP is not v4 platform compatible.
The router app in Advantech router enables the conversion of Modbus RTU messages received via serial line – into Modbus TCP messages. These are sent via TCP to the specified Modbus server afterwards. This is useful for applications where a computer is collecting data from e.g. boilers or other devices. The data in Modbus RTU format are sent to the Advantech router via RS485. They are converted to Modbus TCP format and sent via Internet to the Modbus server and then to SCADA. See the figure below:

ADVANTECH-Protocol-MODBUS-RTU2TCP-Router-App-FIG-1

The router with the router app enabled is a RS485 Modbus slave – all data has to be sent to the router by a computer or a cascade display.
The router app can store the received data on the USB flash stick if TCP network connection (Internet) is not available at the moment. It is then resent when connection is established with the proper order of data.

MODBUS RTU and MODBUS TCP Protocol
The conversion of MODBUS RTU protocol to MODBUS TCP protocol is provided by the router app. The MODBUS RTU protocol runs on serial line. The RS232 or RS485/422 expansion port can be used in the router.
Both protocols have a common part – protocol data unit (PDU). They differ in application data unit (ADU) part. The received PDU on the serial line has the address of destination unit as a header and the checksum at the end.

When sending MODBUS ADU on the TCP/IP, the MBAP header is used for identification. The 502 TCP port is dedicated for MODBUS TCP ADU.

Configuration

Use the Web interface of the router app Modbus RTU2TCP to configure it. It is accessible from the router’s Web interface by clicking on the Router Apps page and then the name of the router app. There are just two items in the Router app’s menu on the left. Config is this configuration page and Return is to return to the router’s Web interface. See the table below for the configuration items explained:

ADVANTECH-Protocol-MODBUS-RTU2TCP-Router-App-FIG-4

Item Description
Enable Enables conversion of MODBUS RTU protocol to MODBUS TCP/IP protocol.
Expansion port Port the MODBUS RTU connection will be established on:
  • PORT1 – MODBUS RTU connection established on PORT 1
  • PORT2 – MODBUS RTU connection established on PORT 2

Look at General page in the router or Expansion Port 1 or Expansion Port 2 pages to see the position of serial interface in your router.

Baud rate| Serial interface communication speed. 300 to 115200 range.
Data Bits| Number of data bits in serial communication. 7 or 8.
Parity| Control parity bit in serial communication:

  • none – No parity will be sent
  • even – Even parity will be sent
  • odd – Odd parity will be sent

Stop Bits| Number of stop bits in serial communication. 1 or 2.
Split Timeout| Time interval to break off the message. If some space between the two characters is recognized on receive and if this space is longer than the parameter value in milliseconds, message from all received data is compiled and sent.
Server Address| Defines server address of the TCP server where data will be sent.
TCP Port| TCP port of the server (above) to send received data on. The 502 port is set for MODBUS ADU by default.
Reply Timeout| Specifies the time interval in which a response is expected. If the response doesn’t come, one of these error codes will be sent:

  • 0A – Transmission path unavailable
    Gateway is not able to allocate internal transmission path from the input port to the output port. It is probably overloaded or incorrectly set.

  • 0B – The target device doesn’t response
    The target device doesn’t response, may not be available.

Enable Cache on USB memory stick| Enables storing the messages that could not be delivered to the TCP side. Every single Modbus message is saved as a file. Up to 65536 files (messages) can be saved. The router app is regularly trying to sent the oldest message again. If resend is successful, other messages are resent, too. The order of the messages is preserved.

Table 1: Configuration form

All changes in settings will be applied after pressing the Apply button.

Related Documents

  1. Advantech Czech: Expansion Port RS232 – User Manual (MAN-0020-EN)
  2. Advantech Czech: Expansion Port RS485/422 – User Manual (MAN-0025-EN)

You can obtain product-related documents on Engineering Portal at icr.advantech.cz address.
To get your router’s Quick Start Guide, User Manual, Configuration Manual, or Firmware go to the Router Models page, find the required model, and switch to the Manuals or Firmware tab, respectively.
The Router Apps installation packages and manuals are available on the Router Apps page.
For the Development Documents, go to the DevZone page.

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

Related Manuals