Protocol Converter For Modbus RTU/ASCII To Modbus TCP: User Manual
Protocol Converter For Modbus RTU/ASCII To Modbus TCP: User Manual
Modbus TCP
User manual
UM EN GW MODBUS TCP/RTU
User manual
Protocol converter for Modbus RTU/ASCII to Modbus TCP
Table of contents
1 For your safety ............................................................................................................................ 3
1.1 Labeling of warning notes...................................................................................... 3
1.2 Qualification of users ............................................................................................. 3
1.3 Field of application of the product.......................................................................... 3
1.3.1 Product changes .................................................................................... 3
2 Description.................................................................................................................................. 5
2.1 Structure................................................................................................................ 6
3 Installation ................................................................................................................................11
3.1 Safety regulations and installation notes ............................................................. 11
3.2 Mounting ............................................................................................................. 11
3.3 Data interfaces .................................................................................................... 13
3.3.1 Connecting the V.24 (RS-232) cable ................................................... 13
3.3.2 Connecting the RS-422 cable .............................................................. 14
3.3.3 Connecting the RS-485 cable .............................................................. 15
3.3.4 Connecting the Ethernet cable ............................................................. 15
3.4 Connecting the power supply .............................................................................. 16
5 Application examples................................................................................................................49
5.1 Serial Modbus RTU/ASCII server to Modbus TCP client ..................................... 49
5.2 Modbus TCP server to serial Modbus RTU/ASCII client...................................... 49
5.3 Modbus RTU/ASCII over TCP/IP using virtual COM port..................................... 50
5.3.1 COM port redirector software ............................................................... 50
5.4 Addressing Modbus RTU/ASCII devices with fixed IDs using device aliasing ..... 52
5.5 Modbus client-to-client communication using shared memory ............................ 52
5.6 Serial Modbus devices with the same device ID on a multiport GW MODBUS TCP/
RTU..................................................................................................................... 53
5.7 Limiting access to Modbus devices using private networks................................. 54
6 Troubleshooting........................................................................................................................ 55
6.1 Resetting the device ............................................................................................ 55
6.1.1 Hardware reset .................................................................................... 55
6.1.2 Software reset ...................................................................................... 55
6.2 LEDs.................................................................................................................... 55
A Appendixes...............................................................................................................................57
A1 List of figures ...................................................................................................... 57
A2 List of tables ....................................................................................................... 59
A3 Index................................................................................................................... 61
2 Description
The GW MODBUS TCP/RTU... devices provide enhanced connectivity from a wide variety
of Modbus® clients to a wide variety of Modbus servers, advanced client-to-client connec-
tivity, and connectivity from legacy Modbus serial networks to Modbus TCP networks. Sup-
ported Modbus clients include:
– Modbus TCP
– Modbus RTU
– Modbus ASCII
Supported Modbus servers include:
– Modbus TCP
– Modbus RTU serial
– Modbus ASCII serial
Connectivity is achieved between any client(s) and any server(s) anywhere on an Ethernet
network. Combined with a GW MODBUS TCP/RTU... device, both serial and Ethernet de-
vices can be accessed anywhere on a network from any Modbus client.
GW MODBUS TCP/RTU... devices are designed to greatly enhance system maintenance
capabilities, including comprehensive device and port-specific diagnostic web pages that
display status, message response timing, timeouts, other error counts, and overall message
statistics. A serial log provides message level diagnosis for serial devices.
The family consists of universal RS232/422/485 1-, 2-, and 4-port serial versions, with one
or two Ethernet ports to fit any application.
This user manual is valid for:
2.1 Structure
GW MODBUS TCP/RTU 1E/1DB9
The GW MODBUS TCP/RTU 1E/1DB9 features one Ethernet port and one
RS-232/422/485 serial port with a D-SUB 9 connector.
7
3
6
4
5
Item Description
1 Power connector
2 P1 D-SUB 9 connector
3 Ethernet port (RJ45)
4 Status LED
5 Reset button
6 Ethernet activity status LED
7 Ethernet link status LED
2
8
3
5
Item Description
1 Power connector
2 P1 D-SUB 9 connector
3 Ethernet port (RJ45)
4 P2 D-SUB 9 connector
5 Status LED
6 Ethernet activity status LED
7 Ethernet link status LED
8 Reset button
11
10 3
4
9
5
8
Item Description
1 Power connector
2 P1 D-SUB 9 connector
3 Ethernet link status LED
4 E2 Ethernet port (RJ45)
5 Ethernet activity status LED
6 P2 D-SUB 9 connector
7 Status LED
8 Ethernet activity status LED
9 E1 Ethernet port (RJ45)
10 Ethernet link status LED
11 Reset button
13
2
12
11 3
4
10
5
9
8 6
Item Description
1 Power connector
2 P3 D-SUB 9 connector
3 Ethernet link status LED
4 E2 Ethernet port (RJ45)
5 Ethernet activity status LED
6 P4 D-SUB 9 connector
7 P2 D-SUB 9 connector
8 Status LED
9 Ethernet activity status LED
10 E1 Ethernet port (RJ45)
11 Ethernet link status LED
12 Reset button
13 P1 D-SUB 9 connector
3 Installation
3.2 Mounting
To mount on the DIN rail:
1. Place the device onto the DIN rail from above (A), so that the upper housing keyway
hooks onto the top edge of the DIN rail.
2. Hold the device by the housing cover and carefully push the device toward the mount-
ing surface (B).
3. After the foot is snapped onto the DIN rail, verify that it is attached securely.
To remove:
1. Use a suitable screwdriver to release the locking mechanism (A) on the snap-on foot of
the device.
2. Hold on to the device by the housing cover and carefully tilt it upward (B).
3. Remove the device from the DIN rail (C).
Connect the GW MODBUS TCP/RTU... to the V.24 (RS-232) device to be connected (for
example, a PC) by way of the PSM-KA-9SUB 9/BB/2 METER V.24 (RS-232) cable (Order
No. 2799474). The cable is an interface cable with 1:1 connected contacts.
4.3 Login
To log in:
1. Set the IP address of the connected PC to the subnetwork of the
GW MODBUS TCP/RTU...: for example, IP = 192.168.254.10, subnetwork =
255.255.255.0.
2. Open a web browser and enter the IP address of the GW MODBUS TCP/RTU... in the
“Address” field (default = 192.168.254.254).
3. Enter the credentials to access the web server configuration pages. The default cre-
dentials are:
Advanced settings can be accessed through the menu at the top of the screen. The “Home”
screen can be accessed at any time by clicking the “Home” button in the upper-left corner
of the web-based management interface.
Figure 4-3 Click the “General Settings” tab to view and edit general information about
the GW MODBUS TCP/RTU.... “General Settings” page
4.6.1 IP address
To enter the IP address:
1. From the “LAN Settings” page, click the “IP Address” tab to access the “IP Address”
page.
4.6.2 Security
The GW MODBUS TCP/RTU... includes several security options for data encryption and
device authentication. It is possible to configure the GW MODBUS TCP/RTU.... so that only
authorized client applications can connect using SSL/TLS. For secure operation, the
GW MODBUS TCP/RTU... uses a set of four keys and certificates. These keys and certifi-
cates are configurable.
To configure security settings:
Figure 4-5 From the “LAN Settings” page, click the “Security” tab.“LAN Settings/Secu-
rity” page
4. Configure the GW MODBUS TCP/RTU... so that only authorized client applications can
connect using SSL/TLS.
For secure operation, the GW MODBUS TCP/RTU... uses a set of four keys and certif-
icates. These keys and certificates may be configured.
RSA Key pair used by SSL and SSH servers: This is a private/public key pair that is
used for two purposes:
– It is used by some cipher suites to encrypt the SSL/TLS handshaking messages.
Possession of the private portion of this key pair allows an eavesdropper to decrypt
traffic on SSL/TLS connections that use RSA encryption during handshaking.
– It is used to sign the RSA server certificate in order to verify that the
GW MODBUS TCP/RTU... is authorized to use the RSA server identity certificate.
Possession of the private portion of this key pair allows others to pose as the
GW MODBUS TCP/RTU....
If the RSA server key is to be replaced, a corresponding RSA identity certificate must
also be generated and uploaded, or clients cannot verify the identity certificate.
RSA Server Certificate used by SSL servers: This is the RSA identity certificate that
the GW MODBUS TCP/RTU... uses during SSL/TLS handshaking to identify itself. It is
used most frequently by SSL server code in the GW MODBUS TCP/RTU... when cli-
ents open connections to the GW MODBUS TCP/RTU... secure web server or other
secure TCP ports. If a GW MODBUS TCP/RTU... serial port configuration is set up to
open (as a client) a TCP connection to another server device, the
GW MODBUS TCP/RTU... also uses this certificate to identify itself as an SSL client if
requested by the server.
In order to function properly, this certificate must be signed using the RSA server key.
This means that the RSA server certificate and RSA server key must be replaced as a
pair.
DH Key pair used by SSL servers: This is a private/public key pair that is used by
some cipher suites to encrypt the SSL/TLS handshaking messages.
Possession of the private portion of the key pair allows an eavesdropper to decrypt
traffic on SSL/TLS connections that use DH encryption during handshaking.
The key or certificate notation changes from factory or none to user when the
GW MODBUS TCP/RTU... is secure.
Certificates and keys to be uploaded to the GW MODBUS TCP/RTU... must be in the
.DER binary file format, not in the .PEM ASCII file format. (The openssl tools can cre-
ate files in either format and can convert files back and forth between the two formats.)
Port Name: Enter a label for the port. This could correspond to the connected device,
“Shipping Label” for example, for easy identification.
Port Mode: Select the port operating mode. Available settings are RS-232, RS-422,
RS-485 2-wire, RS-485 4-wire (M), and RS-485 4-wire (S), where “M” indicates client
and “S” indicates server. When RS-485 4-wire (M) is selected, the RS-485 transmitter
is always enabled on the GW MODBUS TCP/RTU.... When RS-485 4-wire (S) is se-
lected, the RS-485 transmitter is enabled only when the GW MODBUS TCP/RTU... has
data to send. This is important when a four-wire RS-485 multidrop network is installed.
Baud rate: Select the baud rate of the serial port; 300, 600, 1200, 2400, 4800, 9600,
19200, 38400, 57600, 115200, and 230400 bps are supported.
Serial Device: Select the type of serial Modbus device(s) that is connected to this port.
– Modbus RTU Slaves configures the serial port to communicate to Modbus RTU
servers.
– Modbus ASCII Slaves configures the serial port to communicate to Modbus AS-
CII servers.
– Modbus RTU Master configures the serial port to communicate to a Modbus RTU
client.
– Modbus ASCII Master configures the serial port to communicate to a Modbus AS-
CII client.
– Modbus RTU Master/Slaves configures the serial port to communicate to servers
on its own private serial bus as well as public servers on a Modbus network. In this
configuration, a serial client can communicate to:
– Modbus ASCII Master/Slaves configures the serial port to communicate to a se-
rial bus with a Modbus ASCII client and Modbus ASCII servers. In this configura-
tion, a serial client can communicate to:
a) A serial Modbus client can communicate to servers on it’s own private serial bus,
as well as public servers on a Modbus network. In this configuration a serial client
can communicate to:
– Modbus RTU/ASCII server(s) on its own serial bus.
– Public Modbus RTU/ASCII serial server(s) connected to the same
GWGW MODBUS TCP/RTU... .
– Modbus TCP servers.
– Remote public Modbus RTU/ASCII serial server(s) via an Ethernet connection to
another GW MODBUS TCP/RTU... gateway.
– All other Modbus client(s) on the Modbus network via the Shared Memory function-
ality.
b) The Modbus servers on the serial bus are private to the client on that serial bus.
– The server device(s) are effectively protected from all other Modbus clients on the
Modbus network.
– The client has total control of communication to the servers on its own serial bus.
– The client can provide data to/from the server(s) to the Modbus network and other
Modbus clients, via the Shared Memory functionality.
Response timeout: This is to maximum allowable time for a server device to respond
to a message before the message is considered timed out. The default is 1000 ms.
Inactivity wait time before Tx: This is the minimum time that the GW MODBUS
TCP/RTU… waits after receiving a response or transmitting a Modbus request before
transmitting the next request. The default is 0 ms.
Lost device search enable: If multiple routes are available and a Modbus server times
out, the GW MODBUS TCP/RTU... will search ports with this feature enabled in an ef-
fort to find communication from the server device.
Timeout delays can be caused when the “Lost device” search feature is enabled.
Send write messages first: When enabled, any write messages are sent before
transmitting any read messages that may have already been queued for transmission.
Write Mode: This configures the ability to write messages on the server. Select Read
Only to prevent devices from writing messages and select Read/Write to allow all
Modbus messages to be sent to the server.
Device ID offset mode: The “Device ID Offset” functionality allows modification of de-
vice IDs when messages are transmitted to serial Modbus server devices. When con-
figured, the “Device ID Offset” functionality modifies the device ID received in the mes-
sage to match the actual device ID range of the serial device(s). The device ID range is
effectively either increased or decreased depending on the serial port device ID offset
configuration. Select Add to message ID to add the device offset to the message de-
vice ID. Select Subtract from message ID to subtract the device ID offset from the
message device ID. Select Off to disable this functionality.
Device ID offset: Enter a value from 0 to 254. This value is added to, or subtracted
from, the device ID of the Modbus message before it is transmitted out of the serial port.
Use caution when configuring the “Device ID Offset” functionality. Verify the following
when configuring the device ID offset:
– Check for device ID overlaps. Be certain that no two devices have same device ID.
– Check for conflicts with the alias device ID configuration. The device ID offset con-
figuration must coincide with any alias device ID configurations.
– Verify that the valid device ID ranges are sufficient to address all serial devices.
Forward broadcasts from serial master: When enabled, all broadcast messages
from the serial client are forwarded to the Modbus TCP network.
Modbus Exception Responses: The GW MODBUS TCP/RTU... serves as a Modbus
gateway and has the ability to respond to Modbus messages addressed to devices not
present on the network with an exception code. The Modbus Exception Responses set-
ting allows the user to configure this behavior.
a) Enable all sends exception responses from server devices not present on the net-
work and server devices connected to the network.
b) Disable all prevents the GW MODBUS TCP/RTU... from sending exception re-
sponses to messages addressed to server devices not present on the network and
server devices connected to the network.
c) Disable gateway prevents the GW MODBUS TCP/RTU... from sending exception
responses to messages addressed to server devices not present on the network.
d) Disable slaves prevents the GW MODBUS TCP/RTU... from sending exception
responses from server devices connected to the network.
Private slave device ID range: On a serial port configured to Modbus RTU Mas-
ter/Slaves, only the client on the private serial bus has access to the serial servers on
that serial bus. However, the client can also communicate to public devices and shared
memory anywhere on the Modbus network. This range defines the expected server de-
vice ID range on the serial bus. Modbus request messages received on this port within
this device ID range are not forwarded to the Modbus network, and all communication
to device(s) in that range must occur between the Modbus client and server(s) on that
serial bus.
Using this feature, a serial Modbus client can communicate to servers on its own private
serial bus as well as public servers on a Modbus network. The Modbus servers on the
serial bus are private to the client on that serial bus, and the server device(s) are effec-
tively protected from all other Modbus clients on the Modbus network.
Enter a value from 1 to 255 in the “min” and “max” fields.
The GW MODBUS TCP/RTU... has a built-in auto-detect algorithm for detecting pri-
vate server device(s) with ID(s) not defined within the private device ID range.
The “Modbus Overview” page provides a brief explanation of each configuration page.
Send Writes First: If selected, the GW MODBUS TCP/RTU... forward writes mes-
sages before forwarding any pending read messages.
This is most commonly used when multiple messages may be queued for the remote
device(s) and low latency for write messages is desired.
The “Shared Memory” interface contains eight blocks of 200 holding registers and eight
blocks of 160 coils. Write access can be controlled to each holding register block and coil
block. Each block can be configured to provide all clients write access or be restricted to a
port-specific serial client, a Modbus TCP client, or an Ethernet TCP/IP client.
The “Shared Memory” contents can be displayed and cleared by way of the
GW MODBUS TCP/RTU... web server, and diagnostics for each block include read, write,
and blocked write message counts. Blocked write messages are recorded in the “Write Vi-
olation” log.
The following Modbus function codes are supported:
Table 4-2 Modbus function codes
6. After entering the parameters, click the “Apply Changes” button to save the configura-
tion.
The fields may be edited at any time. Be sure to click the “Apply Changes” button to
save the modifications.
4.9 Diagnostics
A variety of packet statistics can be used to diagnose a configuration or application problem.
To view any diagnostics data:
1. Click the “Diagnostics” tab to view a variety of packet statistics that can be used to di-
agnose a configuration or application problem.
Slave Mode Specific Sta- Active Modbus TCP Slave Connections: This displays the current number of active
tistics Modbus TCP server connections initiated by a controller.
Modbus TCP Slave Connections Opened: This displays the total number of Modbus
TCP server connections that have been opened.
Modbus TCP Slave Connections Closed: This displays the total number of Modbus
TCP server connections that have been closed.
Messages Received From Modbus TCP Master(s): This displays the total number
of Modbus TCP messages received from Modbus TCP client(s).
Responses Sent To TCP Master(s): This displays the total number of Modbus TCP
responses sent to Modbus TCP client(s).
Modbus Broadcasts Received From Modbus TCP Master: This displays the num-
ber of Modbus broadcast messages received from Modbus TCP clients.
Invalid Command Lengths: This displays the number of messages received with in-
valid command lengths.
Invalid Message Data Errors: This displays the number of messages received with
invalid message data errors. These errors occur when the GW MODBUS TCP/RTU...
receives a message that cannot be processed due to improper message data.
Invalid Request Protocol Types: This displays the number of messages received
with invalid protocol errors. This occurs when a message is received with a protocol
other than the Modbus TCP protocol value of zero.
Master Mode Specific Sta- Active Modbus TCP Master Connections: This displays the current number of active
tistics Modbus TCP client connections initiated by the GW MODBUS TCP/RTU... to a Mod-
bus TCP server.
Modbus TCP Master Connections Opened: This displays the total number of Mod-
bus TCP client connections that have been opened.
Modbus TCP Master Connections Closed: This displays the total number of Mod-
bus TCP client connections that have been closed.
Messages Sent To Modbus TCP Slave(s): This displays the total number of Modbus
messages sent to remote Modbus TCP servers.
Responses Received From Modbus TCP Slave(s): This displays the total number
of Modbus responses received from the Modbus TCP servers.
Invalid Response Data Errors From Modbus TCP Slave(s): This displays the num-
ber of response data errors to polling requests returned from the Modbus TCP servers.
Possible causes include an incorrect transaction ID, message command length, or de-
vice ID in response.
Remote Modbus TCP Device Timeouts: This displays the number of messages to
remote devices that were determined to have timed out by the
GW MODBUS TCP/RTU...
Unexpected Responses From Modbus TCP Slave(s): This displays the number of
responses received when no response was expected.
Error Responses From Modbus TCP Slave(s): This displays the number of re-
sponses received from Modbus TCP servers with errors indicated. This may be caused
by device timeouts detected by a server Modbus TCP device, an invalid device ad-
dress, device ID, or message data.
Unexpected Response Function Codes From Modbus TCP Slave(s): This dis-
plays the number of unexpected response function codes from Modbus TCP servers.
This occurs when a response was received with a different function code than what was
sent.
Invalid Response Protocol Types From Modbus TCP Slave(s): This displays the
number of responses with invalid protocol errors. This occurs when a response is re-
turned with a protocol other than the Modbus TCP protocol value of zero.
Failed Modbus TCP Connection Attempts To Modbus TCP Slave(s): This displays
the number of failed Modbus TCP connection attempts to the specified PLC IP address.
Modbus TCP Connection Problems: This displays the number of Modbus TCP con-
nection attempt problems. This occurs when the device responds and the connection
is made, but there are problems setting up the connection.
Unexpected Dropped Connections: This displays the number of Modbus TCP con-
nections that were unexpectedly dropped.
No Available Modbus TCP Connection Errors: This displays the number of connec-
tions aborted when there are no available Modbus TCP connections. This error occurs
when the maximum number of Modbus TCP connections has been reached and the
GW MODBUS TCP/RTU... is attempting to form another Modbus TCP connection.
Non-mode Specific Statis- Improper Configuration Errors: This displays the number of errors that were caused
tics Diagnostics by improper configuration.
System Resource Errors: This displays the numbers of system resource errors.
These errors are typically caused by congestion and/or non-responding devices.
First Error Description: This displays the first error detected.
Last Error Description: This displays the last or most recent error detected.
Slave Mode (from Master) Remote Connection: This displays the Modbus/TCP client connection in “IP Address:
Modbus TCP Connections Port Number” format.
(only displayed if active Local IP Port: The local TCP port on the GW MODBUS TCP/RTU.... The standard
connections) Modbus TCP port of 502 is always enabled. Optionally, up to seven additional Modbus
TCP ports may also be enabled.
Rx Requests: This displays the number of Modbus requests that have been received
since the connection was opened.
Tx Responses: This displays the number of Modbus responses that have been trans-
mitted since the connection was opened.
Time Since Open: This is the time that has elapsed since the connection was opened.
Master Mode (To Slave) Remote Connection: This displays the Modbus/TCP client connection in “IP Address:
Modbus/TCP Connec- Port Number” format.
tions (only displayed if ac- Tx Requests: This displays the number of Modbus requests that have been transmit-
tive connections). ted since the connection was opened.
Rx Responses: This displays the number of Modbus responses that have been re-
ceived since the connection was opened.
Dedicated: This indicates if the connection is dedicated for a specified Modbus device
ID.
Device ID: This displays the device ID of the associated device. If device ID offset or
alias device ID is enabled, the device ID used to communicate with the device is dis-
played.
Time Since Open: This is the time that has elapsed since the connection was opened.
3. If desired, click the “Reset Statistics” button to refresh the statistics shown.
TX Byte Count (To Application): This displays the number of bytes transmitted out of
the TCP/IP connection(s).
TX Response Count: This displays the number of responses transmitted out of the
TCP/IP connection(s).
Dropped TX Responses: This displays the number of responses that were intended
to be transmitted over the TCP/IP connection(s) but were dropped. This typically occurs
when one or more connections close unexpectedly.
RX Byte Count (From Application): This displays the number of bytes received on
the TCP/IP connection(s).
RX Message Count: This displays the number of messages received on the TCP/IP
connection(s).
Dropped RX Messages Due to Congestion: This displays the number of messages
that were dropped because the GW MODBUS TCP/RTU… was overloaded. This typi-
cally occurs when the application(s) send messages faster than the server device(s)
can respond.
Dropped Invalid Or Incomplete RX Messages: This displays the number of mes-
sages from the application(s) that were dropped due to an invalid Modbus message for-
mat or an incomplete Modbus message.
Dropped RX Messages Due To Invalid CRCs: This displays the number of mes-
sages from the application(s) that were dropped due to an invalid Modbus/RTU CRC or
Modbus/ASCII LRC.
3. If desired, click the “Reset Statistics” button to refresh the statistics shown.
Active: Displays the status of device: Yes indicates that the last request received a
valid response and did not time out. No indicates that the last request timed out or the
device has not yet received a message.
IP Address: Displays the IP address and port in “IP Address: Port Number” format of
remote Modbus devices.
Tx Req: Displays the number of Modbus messages transmitted to this device.
Rx Rsp: Displays the number of Modbus responses received from this device.
Timeouts: Displays the number of response timeouts associated with this device.
Last Rsp Time: Displays the last response time from the Modbus device.
Avg Rsp Time: Displays the average response time from the Modbus device.
Min Rsp Time: Displays the minimum response time from the Modbus device.
Max Rsp Time: Displays the maximum response time from the Modbus device.
Error Rsp: Displays the number of responses with Modbus errors.
No Path: This displays the number of times the network path could not be connected.
This could be a result of a Modbus TCP device not responding, an incorrect IP address,
or a lack of remaining Modbus TCP connections.
Invalid Responses: Displays the number of invalid messages or responses received
because either a message was received after the timeout period (this may require in-
creasing the device response timeout), an incorrect device ID was received in the re-
sponse message, or an incorrect function code was received in the response message.
Blocked Writes: Displays the number of Modbus write messages that were not trans-
mitted for this device. This only occurs when the “Write Mode” option is set to Read
Only (see “Modbus configuration” on page 24)
Tx Broadcasts: Displays the number of Modbus broadcast messages transmitted to
this device.
3. If desired, click the “Reset Statistics” button to refresh the statistics shown.
3. If desired, click the “Reset Statistics” button to refresh the statistics shown.
If this message was addressed to shared memory, the shared memory address is dis-
played followed by (Shared memory).
Count: The number of items the write message intended to modify. For write register
messages, this is the number of 16-bit registers. For write coil messages, this is the
number of coils. For write file record messages, this is the number of records.
Data: The data the write message intended to write to the specified address. For write
register messages, the data is displayed in 16-bit hex word format. For all other write
messages, the data is displayed in 8-bit, or byte, hex format.
4.10 Maintenance
Click the “Device Maintenance” tab to access the available maintenance functions of the
GW MODBUS TCP/RTU....
4.10.1 Passwords
To change passwords:
1. Click the “Device Maintenance” page.
2. Click the “Passwords” tab to change the password used to access the web server.
2. Click the “Save Logfile” button to save the log as a text file for future use, or review the
log in the web browser.
The log displays information about the device, such as when a PC created or broke a
connection to the GW MODBUS TCP/RTU....
The “Device Snapshot” feature allows a user to capture the system log, configuration
data, and other information that can be used for advanced troubleshooting or for “As
Configured” record keeping as a single text file.
5 Application examples
RS-232/422/485
Modbus RTU
server
RS-232/422/485
LAN/WAN
Modbus
RTU/ASCII client
Modbus TCP server
Remote Addressing IP Address:192.168.254.254
Device ID: 15
IP Address:192.168.254.254
Figure 5-3 Modbus RTU/ASCII over TCP/IP using virtual COM port
RS-232/422/485
LAN/WAN
Modbus RTU
Modbus over
server
TCP/IP
COM Port Redirector
COM 3 = 192.168.254.254:8000
COM 4 = 192.168.254.254:8001 IP = 192.168.254.254
Serial Port = TCP port 8000
Serial Port = TCP port 8001 Modbus RTU
server
Figure 5-5 Addressing Modbus RTU/ASCII devices with fixed IDs using device ID
aliasing
RS-232/422/485
LAN/WAN Modbus RTU
Server ID = 1
When configured, a Modbus message from a client with the specified device ID alias is con-
verted to the device ID alias, the message is then routed internally using the alias device ID.
All responses are returned to the client with the original received message device ID.
Table 4-3 “Device ID alias examples” demonstrates several device ID aliasing examples.
Alternately, use the device ID offset functionality shown in Table 4-1 “Device ID offset ex-
amples”, which modifies the device ID contained in a Modbus request sent to a serial Mod-
bus server by adding or subtracting a user specified value.
RS-232/422/485
Modbus RTU
LAN/WAN
client
The shared memory interface contains eight blocks of 200 holding registers and eight
blocks of 160 coils. Write access is controlled to each holding register block and coil block.
Each block is configured to provide all clients write access or be restricted to a port-specific
serial client, a Modbus TCP client, or an Ethernet TCP/IP client (see Table 4-2 on page 32).
Figure 5-7 Serial Modbus devices with the same device ID on a multiport
GW MODBUS TCP/RTU...
Modbus RTU server
Device ID = 1
RS-232/422/485
LAN/WAN
The result is that each device may be addressed with a unique device ID by the Modbus cli-
ent.
RS-485
Device ID = 1
Additionally, the Modbus servers on the serial bus are private to the client on that serial bus,
so the server device(s) cannot be accessed by Modbus clients on the Modbus TCP net-
work. In the event the GW MODBUS TCP/RTU... is powered off, the client and servers on
the serial bus can still communicate.
Specify the range of device IDs that should be considered private on the serial bus. Refer
to “Modbus TCP configuration” on page 28 for configuration details.
6 Troubleshooting
If, for some reason, the module needs to be reset to factory settings, there are two methods
available: hardware reset and software reset.
The reset button allows resetting the device without the use of a PC.
To force a hardware reset:
1. With the device powered off, press and hold the reset button. Apply power and hold the
reset button for at least five seconds. Reinitializing the module and firmware reset may
take some time. Do not disconnect from power (see Section 2.1, “Structure” for the
location of the reset button on the GW MODBUS TCP/RTU...).
2. After a successful reset, the module returns to the factory default address
(192.168.254.254).
6.2 LEDs
A Appendixes
A1 List of figures
Section 2
Figure 2-1: GW MODBUS TCP/RTU 1E/1DB9 ...................................................... 6
Figure 2-2: GW MODBUS TCP/RTU 1E/2DB9 ...................................................... 7
Figure 2-3: GW MODBUS TCP/RTU 2E/2DB9 ...................................................... 8
Figure 2-4: GW MODBUS TCP/RTU 2E/4DB9 ...................................................... 9
Section 3
Figure 3-1: DIN rail mounting ............................................................................... 11
Figure 3-2: DIN rail removal ................................................................................. 12
Figure 3-3: Pin 1 location ..................................................................................... 14
Figure 3-4: Single power supply connection ........................................................ 16
Figure 3-5: Redundant power supply connection ................................................. 16
Section 4
Figure 4-1: “Login” screen .................................................................................... 17
Figure 4-2: “Home” screen ................................................................................... 18
Figure 4-3: Click the “General Settings” tab to view and edit general information
about the GW MODBUS TCP/RTU.... “General Settings” page ......... 19
Figure 4-4: “LAN Settings/IP Address” page ........................................................ 20
Figure 4-5: From the “LAN Settings” page, click the “Security” tab.“LAN Settings/
Security” page .................................................................................... 21
Figure 4-6: “Serial Settings/Overview” page ........................................................ 22
Figure 4-7: “Serial Settings/Port 1 Configuration” page ........................................ 23
Figure 4-8: “Serial Port Configuration” page ......................................................... 23
Figure 4-9: “Modbus Configuration” page ............................................................ 24
Figure 4-10: “Modbus Settings” page ..................................................................... 27
Figure 4-11: “Modbus TCP” page .......................................................................... 28
Figure 4-12: “Remote Modbus” page ..................................................................... 29
Figure 4-13: “TCP/IP Connection” page ................................................................. 30
Figure 4-14: “Shared Memory Configuration” page ................................................ 32
Figure 4-15: “Shared Coils” page ........................................................................... 33
Figure 4-16: “Holding Registers” page ................................................................... 34
Section 5
Figure 5-1: Serial Modbus RTU/ASCII server to Modbus TCP client .................... 49
Figure 5-2: Modbus TCP server to serial Modbus RTU/ASCII client .................... 49
Figure 5-3: Modbus RTU/ASCII over TCP/IP using virtual COM port ................... 50
Figure 5-4: “Create New Port” dialog box ............................................................. 51
Figure 5-5: Addressing Modbus RTU/ASCII devices with fixed IDs using device ID
aliasing ............................................................................................... 52
Figure 5-6: Modbus client-to-client communication using shared memory .......... 52
Figure 5-7: Serial Modbus devices with the same device ID on a multiport
GW MODBUS TCP/RTU... ................................................................ 53
Figure 5-8: Limiting access to Modbus devices using private networks ............... 54
A2 List of tables
Section 2
Table 2-1: GW MODBUS TCP/RTU... types........................................................... 5
Table 2-2: GW MODBUS TCP/RTU 1E/1DB9 structure ......................................... 6
Table 2-3: GW MODBUS TCP/RTU 1E/2DB9 structure ......................................... 7
Table 2-4: GW MODBUS TCP/RTU 2E/2DB9 structure ......................................... 8
Table 2-5: GW MODBUS TCP/RTU 2E/4DB9 structure ......................................... 9
Section 3
Table 3-1: D-SUB 9 to RS-232 pin out .................................................................. 13
Table 3-2: D-SUB 9 to RS-422 and RS-485 pin out .............................................. 14
Section 4
Table 4-1: Device ID offset examples ................................................................... 26
Table 4-2: Modbus function codes ....................................................................... 32
Table 4-3: Device ID alias examples..................................................................... 34
Section 5
Table 5-1: TCP connection settings...................................................................... 50
Table 5-2: GW MODBUS TCP/RTU 4P/2E to serial Modbus example ................. 53
Section 6
Table 6-1: LEDs.................................................................................................... 55
A3 Index
A L
Addressing Modbus RTU/ASCII devices .....................52 LAN settings ................................................................ 20
Alias statistics ..............................................................43 LEDs ............................................................................ 55
Application examples Limiting access to Modbus devices ............................. 54
Modbus RTU/ASCII over TCP/IP using virtual COM Login ............................................................................ 17
port .........................................................................50
Modbus TCP slave to serial Modbus RTU/ASCII M
master ....................................................................49
Maintenance ................................................................ 44
Serial Modbus RTU/ASCII slave to Modbus TCP
master ....................................................................49 Modbus configuration ..................................................24
Modbus master-to-master communication................... 52
C Modbus settings........................................................... 27
Modbus slave devices ................................................. 40
COM port redirector software.......................................50
Modbus TCP configuration .......................................... 28
Modbus TCP................................................................ 37
D Mounting ...................................................................... 11
Data interfaces.............................................................13 Multiport GW MODBUS TCP/RTU............................... 53
Default settings ............................................................17
Description.....................................................................5 P
Device ID aliasing ........................................................34
Port configuration......................................................... 23
Diagnostics ..................................................................36
Power supply ............................................................... 16
Private networks .......................................................... 54
E
Ethernet cable ..............................................................15 R
Remote Modbus addressing........................................ 29
G Removal....................................................................... 12
General settings ...........................................................19 Resetting the device .................................................... 55
GW MODBUS TCP/RTU 1E/1DB9 ................................6 RS-232 cable ............................................................... 13
GW MODBUS TCP/RTU 1E/2DB9 ................................7 RS-422 cable ............................................................... 14
GW MODBUS TCP/RTU 2E/2DB9 ................................8 RS-485 cable ............................................................... 15
GW MODBUS TCP/RTU 2E/4DB9 ................................9
S
H Safety............................................................................. 3
Hardware reset ............................................................55 Security........................................................................21
Home screen................................................................18 Serial logs .................................................................... 42
Serial port configuration ............................................... 23
I Serial settings .............................................................. 22
Installation....................................................................11 shared memory ............................................................52
IP address....................................................................20 Shared memory ........................................................... 31
Software reset.............................................................. 55
Structure ........................................................................ 6
T
TCP Statistics ..............................................................39
TCP/IP connection .......................................................30
Troubleshooting ...........................................................55
V
V.24 cable ....................................................................13
W
Web-based management.............................................17
Write violations.............................................................43
How to contact us
Internet Up-to-date information on Phoenix Contact products and our Terms and Conditions can be
found on the Internet at:
phoenixcontact.com
Make sure you always use the latest documentation.
It can be downloaded at:
phoenixcontact.net/products
Subsidiaries If there are any problems that cannot be solved using the documentation, please contact
your Phoenix Contact subsidiary.
Subsidiary contact information is available at phoenixcontact.com.
64/64 PHOENIX CONTACT GmbH & Co. KG • Flachsmarktstraße 8 • 32825 Blomberg • Germany
phoenixcontact.com