Changes

no edit summary
Line 1: Line 1:  +
<p style="color:red">The information in this page is updated in accordance with firmware version '''[https://wiki.teltonika-networks.com/view/FW_%26_SDK_Downloads 00.07.03.3]'''.
 +
 
==Summary==
 
==Summary==
   Line 13: Line 15:  
Follow these steps to set up the Modbus gateway:
 
Follow these steps to set up the Modbus gateway:
   −
* Navigate to '''Services -> RS232''' or '''RS485''' (depending on your serial interface choice).
+
* Navigate to '''Services -> Modbus -> Modbus TCP over Serial Gateway'''
* In the configuration section, press '''Enable''' to enable the serial interface.
+
* Input Configuration name
* In the Serial '''Type''' section, select '''Modbus gateway'''.
+
* Select device: '''RS485/RS232/USB'''
You may need to change configuration depending on your needs, just make sure that identical settings are set here and in RTU simulator: Baud rate, data bits, parity, stop bits, flow control.
+
* Press '''Add'''
 +
 
 +
[[File:Modbusupdategateway1.png|1000px|border|class=tlt-border]]
   −
[[File:Navigateandenable.png|border|class=tlt-border]]
+
A new window will open, where the device should be configured according to these steps:
   −
This will expand more customization options:
+
* Press '''Enable''' to enable the serial interface
 +
* '''Listening IP''' – IP interface on which you are listening for incoming connections (input 0.0.0.0 to listen on any IP address)
 +
* '''Port''' – Port number for Modbus gateway (default port is 502)
 +
* '''Slave ID''' configuration type – User defined or obtained from TCP
 +
* '''Slave ID''' – preconfigured Slave ID number
   −
* '''Listening IP''' – IP interface on which you are listening for incoming connections (input 0.0.0.0 to listen on any IP address).
+
You may need to change configuration depending on your needs, just make sure that identical settings are set here and in RTU simulator: Baud rate, data bits, parity, stop bits, flow control.
* '''Port''' – Port number for Modbus gateway (default port is 502).
  −
* '''Slave ID''' configuration type – User defined or obtained from TCP.
  −
* '''Slave ID''' – preconfigured Slave ID number.
     −
[[File:Moreconfigurationoptions.png|border|class=tlt-border]]
+
[[File:Navigateandenable.png|700px|border|class=tlt-border]]
   −
In IP filter options on the serial configuration page, add IP addresses that will be allowed to reach your Modbus gateway (input 0.0.0.0/0 to allow any IP address).
+
In IP filter options on the bottom of the page, add IP addresses that will be allowed to reach your Modbus gateway (input 0.0.0.0/0 to allow any IP address).
    
[[File:Ipfilter1.png|border|class=tlt-border]]
 
[[File:Ipfilter1.png|border|class=tlt-border]]
Line 39: Line 44:  
To test out this functionality you can use two PCs: one running a Modbus Master simulator and the other running a Modbus PLC simulator, acting as a Modbus slave. Follow these steps to configure this testing scenario:
 
To test out this functionality you can use two PCs: one running a Modbus Master simulator and the other running a Modbus PLC simulator, acting as a Modbus slave. Follow these steps to configure this testing scenario:
   −
* Connect PC1 to RUT955 RS232 port.
+
* Connect PC1 to RUT955 RS232 port
* Connect PC2 to RUT955 Ethernet LAN port.
+
* Connect PC2 to RUT955 Ethernet LAN port
    
'''Modbus RTU setup:'''
 
'''Modbus RTU setup:'''
   −
* On PC1, run the '''ModRSsim2''' application.
+
* On PC1, run the '''ModRSsim2''' application
* In the '''Prot:''' section select '''Modbus RS-232'''.
+
* In the '''Prot:''' section select '''Modbus RS-232'''
    
[[File:Rs232modeplc.png|border|class=tlt-border]]
 
[[File:Rs232modeplc.png|border|class=tlt-border]]
   −
* In the menu in the top right corner, select '''Setup communication Serial or TCP/IP port'''.
+
* In the menu in the top right corner, select '''Setup communication Serial or TCP/IP port'''
    
[[File:Setupbuttonrs232.png|border|class=tlt-border]]
 
[[File:Setupbuttonrs232.png|border|class=tlt-border]]
Line 60: Line 65:  
----
 
----
   −
* On the PC2, run the '''QModMaster''' application.
+
* On the PC2, run the '''QModMaster''' application
* Select Modbus Mode: '''TCP'''.
+
* Select Modbus Mode: '''TCP'''
    
[[File:Modetcpmaster.png|border|class=tlt-border]]
 
[[File:Modetcpmaster.png|border|class=tlt-border]]
   −
* Navigate to '''Options -> Modbus TCP settings''' to configure TCP connection. Input Slave IP and TCP Port.
+
* Navigate to '''Options -> Modbus TCP settings''' to configure TCP connection. Input Slave IP and TCP Port
    
[[File:Mastertcpsettings.png|border|class=tlt-border]]
 
[[File:Mastertcpsettings.png|border|class=tlt-border]]
   −
* To establish connection navigate to '''Commands -> Connect'''.
+
* To establish connection navigate to '''Commands -> Connect'''
    
[[File:ConnectbuttonRTU.png|border|class=tlt-border]]
 
[[File:ConnectbuttonRTU.png|border|class=tlt-border]]
Line 88: Line 93:     
If the data is displayed correctly, congratulations, the configuration works! If not, I advise to follow these steps once again.
 
If the data is displayed correctly, congratulations, the configuration works! If not, I advise to follow these steps once again.
 +
 +
==Summary==
 +
 +
The article describes how to set up a Modbus gateway to transfer data from Modbus TCP to Modbus RTU using Teltonika devices. The gateway functionality allows a Master device connected to the LAN port to send commands to a Slave device connected to the serial port (RS232, RS485 or USB). Steps are provided to configure the router, including enabling the serial interface, setting up the listening IP, port number, and slave ID, and adding IP addresses to the IP filter options. The article also provides steps to set up two PCs, one running a Modbus Master simulator and the other running a Modbus PLC simulator, to test the functionality.
 +
[[Category:RS232/485]]