odot ODOT-S4E2 User manual

1
Modbus RTU/ASCII to Modbus TCP
Protocol Converter
ODOT Series Gateways
ODOT-S4E2 User Manual
ODOTAutomation System Co., Ltd.
2020-09-20
Copyright©2020 All rights reserved by ODOT Automation

2
Version information
Revision records:
DATE
Version number
Modify content
The author
2016-02-20
V1.0
First release
SXL
2016-07-14
V1.1
Software configuration
upgrade version
JPL
2017-06-06
V1.3
Modify version
CCL
2018-08-01
V2.0
Hardware Updating
CCL
2019-06-27
V2.1
Updating Serial
Port Dialing
Method
CCL
2020-09-20
V2.2
Hardware
Updating
CCL
Ownership information
Without the consent of the copyright owner, the whole or part of this document do not be
republished as paper or electronic document.
Disclaimer
This document is only used to assist readers for using products. The company is not
responsible for loss or mistake because of using this document. The text and product
described in this document is constantly developing and improving.
Sichuan ODOT Automation System Co., Ltd. has the right to modify this document
without notifying users.

3
Contents
Modbus RTU/ASCII to Modbus TCP ........................................... 1
Protocol Converter.......................................................... 1
ODOTAutomation System Co., Ltd. ......................................... 1
Version information....................................................... 2
Ownership information .................................................... 2
Disclaimer .............................................................. 2
1. Product Overview .......................................................... 4
1.1 Product Functions ....................................................... 4
1.2 Main features........................................................... 4
1.3 Technical parameters ..................................................... 5
2. Hardware description........................................................ 7
2.1 Product appearance ...................................................... 7
2.2 LED indicator description ................................................. 7
2.3 Terminal definition ...................................................... 8
2.4 Reset button........................................................... 10
2.5 External terminal resistance............................................... 12
2.6 Installation dimension ................................................... 12
3. HOW TO USE THE PROTOCOL CONVERTER ............................. 13
3.1.The description of protocolconverter...................................... 13
3.2. Default parameters ..................................................... 19
3.3 Gateway IP address modification .......................................... 21
3.4 Typical application description ............................................ 24

4
1. Product Overview
1.1 Product Functions
ODOT-S4E2, developed by Sichuan ODOTAutomation System Co., Ltd., is a Modbus RTU to
Modbus TCP/IP protocol converter based on market demand and years of experience.
By applying ODOT-S4E2, all the Modbus RTU/ASCII slave devices with RS485/RS422/RS232 port
could connect to Modbus TCP/IP network and communicate with TCP clients. It could realize high speed
data transmission by connecting the low speed serial device to the high-speed Ethernet. This protocol
converter provides two working modes of transparent transmission and mapping mode, which could
achieve the maximum system compatibility.
1.2 Main features
◆9-36V wide range voltage input, anti-reverse connection protection.
◆Communication terminal isolation processing, 1500V isolation voltage
◆Dual Ethernet port, with switch function, support cascading.
◆2 kV network port isolation protection, 10/100Mbps auto-negotiation and Auto-MDI
/MDIX.
◆Support address mapping mode, realize fast response to TCP client request.
◆Connect up to 5 clients request.
◆Mapping mode supports function code:0x01,0x02,0x03,0x04,0x05,0x06,0x0F,0x10.
◆Transmission mode supports all public function code and customized function code.
◆10KB huge data buffer area, larger data transmission capacity.
◆4*RS485 serial ports real time refresh, short scan period, better loading capability.
◆RTU andASCII master and slave is optional, with stronger adaptability.
◆Watchdog could be enabled, watchdog time could be set.
◆Supports IAP download, and it could update and upgrade firmware program in product
through network port.

5
◆Built-in terminal resistance and bias circuit, strong stability.
◆The data packet sending interval could be adjusted freely, and the use is more flexible.
◆The device carries with powerful diagnostic function to monitor the communication
status of the slave device in real time.
◆Support one key reset function to restore factory Settings.
◆35mm standard DIN-rail.
◆EMC complies EN 55022:2010 & EN55024:2010 international standard.
1.3 Technical parameters
The relevant technical parameters of this product are shown in Table 1. Please use this
product within the parameters of this product in order to obtain better performance.
Table1 Technical Parameters
Environment Parameter
Operating temperature
-40~85℃
Storage temperature
-55~125℃
Humidity
5%~95% (no condensing )
Power parameter
Number of power terminal
1 way
Power range
9~36VDC
Consumption
Max.200mA@24V

6
Ethernet parameter
Working mode
Transparent transmission mode and address
mapping mode is optional
Number of ethernet
terminal
2RJ45,10M/100M auto-adaption with
router
function
Networking protocols
ETHERNET, ARP, IP, TCP and ICMP
Number of TCP connection
Max. 5
Serial parameter
Number of serial port
4*RS485/RS232 or 2*RS422
Serial Communication
mode
RTU mode & ASCII mode is optional
Baud rate
1200~115200 bps
Checking mode
None, odd, even
Number of slave supported
Max.124(without relay)
Mapping mode protocol
Function code
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0F, 0x10
Modbus buffer area
0xxxx area(coil):8192 Bit
1xxxx area(discrete magnitude input):8192 Bit
3xxxx area(input register):2048 Word
4xxxx area(hold register):2048 Word
3xxxx area(system diagnose zone):263 Word

7
2. Hardware description
2.1 Product appearance
2.2 LED indicator description
There are total 6 LED status indicators. The symbol definition and status
description are shown in “Table 2”.

8
Table 2 LED indicator description
Symbol
Definition
Status
Description
PWR
Power supply indicators
ON
Power is supplied to the unit
OFF
No power is supplied to the unit
ETH
Network fault indicators
ON
TCP gateway communication error
OFF
TCP gateway
communication normal
CO1
Series port 1sending
& receiving indicator
Flashing
Series port 1 is sending &
receiving data
ON
Series port 1 is not sending &
receiving data
CO2
Series port 2sending
& receiving indicator
Flashing
Series port 2 is sending &
receiving data
ON
Series port 2 is not sending &
receiving data
CO3
Series port 3sending
& receiving indicator
Flashing
Series port 3 is sending &
receiving data
ON
Series port 3 is not sending &
receiving data
CO4
Series port 4sending
& receiving indicator
Flashing
Series port 4 is sending &
receiving data
ON
Series port 4 is not sending &
receiving data
Note: * ——In normal communication, the status of the ODOT-S4E2 gateway indicator
2.3 Terminal definition
1. The equipment wiring adopts 16Pin 3.81mm pitch plug-in terminal. The terminal definition of
RS485/RS232/RS422 interface is shown in "Table 3".

9
Table 3 Terminal definition
No
.
RS485
RS232
RS422
Symbol
Wiring
Definition
Wiring Definition
Wiring Definition
1
1RT-
Serial Port1
RS485-
Serial Port1
RS232_RX
RS422Channel1
RS422 Sending
Negative Terminal
2
1TT+
Serial Port1
RS485+
Serial Port1
RS232_TX
RS422 Sending
Positive Terminal
3
SGND
Signal Grounded
Signal Grounded
Signal Grounded
4
PE
Shield Earthing
Shield Earthing
Shield Earthing
5
2RR-
Serial Port2
RS485-
Serial Port2
RS232_RX
RS422 Receiving
Negative Terminal
6
2TR+
Serial Port2
RS485+
Serial Port2
RS232_TX
RS422 Receiving
Positive Terminal
7
SGND
Signal Grounded
Signal Grounded
Signal Grounded
8
PE
Shield Earthing
Shield Earthing
Shield Earthing
9
3RT-
Serial Port3
RS485-
Serial Port3
RS232_RX
RS422 Channel 2
RS422 Sending
Negative Terminal
10
3TT+
Serial Port3
RS485+
Serial Port3
RS232_TX
RS422
Sending Positive
Terminal
11
SGND
Signal Grounded
Signal Grounded
Signal Grounded
12
PE
Shield Earthing
Shield Earthing
Shield Earthing
13
4RR-
Serial Port4
RS485-
Serial Port4
RS232_RX
RS422 Receiving
Negative Terminal
14
4TR+
Serial Port4
RS485+
Serial Port4
RS232_TX
RS422 Receiving
Positive Terminal
15
SGND
Signal Grounded
Signal Grounded
Signal Grounded
16
PE
Shield Earthing
Shield Earthing
Shield Earthing
2. Power terminals are defined as follows
No.
Symbol
Definition
1
PE
Grounding terminal
2
V-
Power Input Negative
3
V+
Power Input Positive

1
2.4 Reset button
The device has a system RESET button (RESET). When the user forgets the IP address and
configured port number of the device and cannot connect to the gateway, the RESET button can
be triggered. System parameters will be restored to factory Settings and the device will be
restarted. Click the reset button with a paper clip, and all the indicator lights will shine once to
indicate successful reset. So the gateway reset is successful. The technical parameters of the
gateway are as follows:
Parameter Name
Defaults
Ethernet
Side
Protocol converter IP
192.168.1.254
Subnet mask
255.255.255.0
LAN gateway IP
192.168.1.1
Modbus TCP data port
502
Configure the port
1024
Modbus-TCP
watchdog time
30S
The enabling of
Modbus-TCP watch
dog
enabling

1
Gateway work mode
Transparent transmission Mode
Gateway station
Number
247
Serial port
side
Serial port mode
Master station mode
Protocol type of
Modbus
Modbus RTU
Serial port baud rate
9600bps
Check digit
No check
Data bits
8bit
Stop bit
1bit
Receive character
interval
3.5t
Message sent?
0
Timeout processing
Data retention
Slave response
timeout
500ms

1
2.5 External terminal resistance
According to the site situation, the gateway serial port side needs an external 120
Ω terminal resistance. The RS485 bus supports a maximum of 32 nodes without relay,
The "daisy chain" connection is used between nodes, and terminal resistors are
required at both ends of the communication cable, and their resistance is required to be
approximately equal to the characteristic impedance of the transmission cable. In
short-distance transmission, no terminating resistor is required, that means no
terminating resistor is generally required below 300 meters. The terminating resistor is
connected to the two ends of the transmission cable.
When the gateway is used in the site, if the site RS485 bus is far away and the site
interference is large, so it is necessary to add 120Ω terminal resistance at both ends of
the RS485 bus to prevent the reflection of the serial signal.
Note: 120 Ω resistance attached to the package, please check.
2.6 Installation dimension

1
3. HOW TO USE THE PROTOCOL CONVERTER
3.1.The description of protocol converter
3.1.1.Serial working mode
There are two types of working modes: Master mode and slave mode.
When the serial port works in master mode, the serial port can connect up to 31 Modbus
RTU/ASCII slave devices without relaying. This mode is mainly used for data
communication between Modbus TCP master and Modbus RTU/ASCII Slaves
When the serial port works in slave mode, the serial port can connect to one Modbus
RTU/ASCII master device. This mode can be applied as follows:
(1)Data communication Between Modbus TCP Client and Modbus RTU/ASCII
Master;
(2)Data communication between Modbus RTU/ASCII master;
(3)Modbus TCP client and Modbus RTU/ASCII master could communicate with one
Modbus RTU/ASCII slave at the same time.
3.1.2.Gateway working mode
There are two types of working modes: transparent mode and mapping mode, and the
"Transparent" mode is the factory setting. The "Transparent" mode is without data cache and
no need for editing the address mapping table. The gateway directly sends the instructions of
the TCP/IP clients to Modbus RTU/ASCII slave equipment, and it waits for the slave station
devices response after getting the instructions from the Modbus TCP/IP clients. After the
response of the slave, the data will directly be sent back to the TCP clients.
"Mapping" mode adopts the way of data cache and it need for editing the station address
mapping table. The gateway polls each of the slave after powered on, and stores the data in
the buffer cache. The gateway will read the data directly from the data buffer, and then send

1
it back to the TCP clients after receiving Modbus TCP/IP clients instructions. This method
can greatly reduce the waiting time for the client to access to the station and improves the
refresh rate.
3.1.3. Data storage area
Data storage is divided into five parts.
Part 1. "Coil" (DO) storage area, 8192 points in total.
Part 2. "Discrete magnitude input" (DI) storage area,8192 points in total.
Part 3. "Input register" (AI)storage area, 2048 points in total.
Part 4. "Hold register"(AO) storage area, 2048 points in total.
Part 5. "System diagnostic" (DO) storage area, it stores the station equipment working
status, 263 points in total. And it could access to the “system diagnostic” area and obtain
the slave information. This could be used for setting the disconnection alarm.
The distribution of the data storage area and the scope of the address coding are shown in
below.
Table 3.1 Data store address table
Item
Storage type
Description
Storage
capability
Address range
1
Area 0
Coil
8192 Bit
0x0000~0x1FFF
2
Area 1
Discrete
magnitude input
8192 Bit
0x0000~0x1FFF
3
Area 3
Input register
2048 Word
0x0000~0x07FF
4
Area 4
Hold register
2048 Word
0x0000~0x07FF
5
Area 3
System
diagnostic
263 Word
0x2000~0x2106

1
3.1.4 System diagnostic area
The diagnosis system is divided into two parts. For the first part: The address
0x2000-0x200F is in total of 16 words that is 256 bits as the "slave error indicator area".
The number 1-247 are respectively corresponding to slave 1-247and 248-256 are reserved.
When the error occurs from the station communication, the corresponding bit of the station
address is set to 1. The corresponding error indicator bit will have zero clearing
automatically after the slave is back to normal. Its data encoding format is shown in Table
3.2.
Table 3.2 Slave error indicating area encoding format
Address
0x2000
BIT
Bit15
Bit14
Bit13
Bit12
Bit11
Bit10
Bit9
Bit8
Bit
Number
16
15
14
13
12
11
10
9
BIT
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
Bit
Number
8
7
6
5
4
3
2
1
address
0x2001
BIT
Bit15
Bit14
Bit13
Bit12
Bit11
Bit10
Bit9
Bit8
Bit
Number
32
31
30
29
28
27
26
25
BIT
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
Bit
Number
24
23
22
21
20
19
18
17
.
.
.
BIT
Bit15
Bit14
Bit13
Bit12
Bit11
Bit10
Bit9
Bit8

1
Address
0x200F
Bit
Number
x
x
x
x
x
x
x
x
BIT
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
Bit
Number
x
247
246
245
244
243
242
241

1
The second part :Address 0x2010-0x2106 Word ,total 247 words, as " the slave status
indicator" area. Reading the area could obtain the slave current working status, the data
encoding format is as shown in Table 3.3.
Table 3.3 Slave status indicating area encoding format
Address
0x2010
Slave 1
Byte1
Byte0
Function code
Error code
Address
0x2011
Slave 2
Byte1
Byte0
Function Code
Error code
.
.
.
Address0x
2106
Slave
247
Byte1
Byte0
Function Code
Error code
Each Word is divided into high and low bytes, Byte1 is the high byte, indicating the
currently executed function code mapped to the slave. Byte0 is the low byte, indicating the
current error code of the salve communication. The specific meaning of the error code of
the slave is as shown in table 3.4.
Table 3.4 Slave error code description
Error code
Error Description
Troubleshooting method
0x00
Slave stations operates
normally
No
0x01
Illegal function code
The device does not support the
current function code, please refer to
the slave manual to select the
corresponding function code module
0x02
Illegal data address
The device data exceeds its address
range, please refer to the slave
manual to modify the data start
address or data length
0x03
Illegal data value
The data length is wrong, the data

1
length exceeds the maximum
allowable value of 125 (Word) or
2000 (Bit), it needs to modify the
length
0x04
Data processing error
Check whether the data value range
meets the requirements of the slave
0x05
Application layer length does
not match
Increase the receiving character
interval and check the
communication parameter settings
0x06
Protocol ID error
Check the sender message
0x07
Buffer address error
Device internal error
0x08
Bit offset error
Device internal error
0x09
The slave ID number does not
match
Increase the timeout period, check
the hardware connection status, and
check the communication parameter
settings
0x0A
CRC check error
CRC error, check the communication
line
0x0B
LRC error
LRC error, check the communication
line
0x0C
Response function code does
not match
Check hardware connection status
0x0D
Response address does not
match
Check hardware connection status
0x0E
Response data length does not
match
Check hardware connection status
0x0F
Communication timeout
Increase the timeout period, check
the hardware connection status, and
check the communication parameter
settings
0x10
ASCII mode start character
error
„:‟ Colon start character error
0x11
ASCII mode ending character
error
CR/LF carriage return and line feed
terminator error
0x12
ASCII mode non-character
The data contains non-hexadecimal
ASCII codes
0x13
Wrong number of characters in
ASCII mode
Slave response length error

1
3.2. Default parameters
The default factory configuration of the gateway is as follows:
Table 3.5 The default factory configuration
Parameter name
Defaults
Ethernet Side
Protocol converter IP
192.168.1.254
Subnet mask
253.253.253.0
LAN gateway IP
192.168.1.1
Modbus TCP data port
502
Configure the port
1024
Modbus-TCP watchdog
time
30S
The enabling of
Modbus-TCP watch dog
Enabling
Gateway working mode
Transparent mode
Gateway station number
247

2
Serial Port side
Serial operating
mode
Master mode
Modbus protocol
type
Modbus RTU/ASCII
Serial baud rate
9600bps
Check digit
No check
Data bits
8bit
Stop bit
1bit
Receive character
interval
3.5t
Message sent
0
Timeout processing
Data retention
Slave response timeout
500ms
Table of contents