The documentation and the software included with this product are copyrighted 2013
by Advantech Co., Ltd. All rights are reserved. Advantech Co., Ltd. reserves the right
to make improvements in the products described in this manual at any time without
notice. No part of this manual may be reproduced, copied, translated or transmitted
in any form or by any means without the prior written permission of Advantech Co.,
Ltd. Information provided in this manual is intended to be accurate and reliable. However, Advantech Co., Ltd. assumes no responsibility for its use, nor for any infringements of the rights of third parties, which may result from its use.
Acknowledgements
Intel and Pentium are trademarks of Intel Corporation.
Microsoft Windows and MS-DOS are registered trademarks of Microsoft Corp.
All other product names or trademarks are properties of their respective owners.
Product Warranty (5 years)
Advantech warrants to you, the original purchaser, that each of its products will be
free from defects in materials and workmanship for two years from the date of purchase.
This warranty does not apply to any products which have been repaired or altered by
persons other than repair personnel authorized by Advantech, or which have been
subject to misuse, abuse, accident or improper installation. Advantech assumes no
liability under the terms of this warranty as a consequence of such events.
Because of Advantech’s high quality-control standards and rigorous testing, most of
our customers never need to use our repair service. If an Advantech product is defective, it will be repaired or replaced at no charge during the warranty period. For outof-warranty repairs, you will be billed according to the cost of replacement materials,
service time and freight. Please consult your dealer for more details.
If you think you have a defective product, follow these steps:
1.Collect all the information about the problem encountered. (For example, CPU
speed, Advantech products used, other hardware and software used, etc.) Note
anything abnormal and list any onscreen messages you get when the problem
occurs.
2.Call your dealer and describe the problem. Please have your manual, product,
and any helpful information readily available.
3.If your product is diagnosed as defective, obtain an RMA (return merchandize
authorization) number from your dealer. This allows us to process your return
more quickly.
4.Carefully pack the defective product, a fully-completed Repair and Replacement
Order Card and a photocopy proof of purchase date (such as your sales receipt)
in a shippable container. A product returned without proof of the purchase date
is not eligible for warranty service.
5.Write the RMA number visibly on the outside of the package and ship it prepaid
to your dealer.
ADAM-4572 Series User Manualii
Page 3
Declaration of Conformity
CE
This product has passed the CE test for environmental specifications when shielded
cables are used for external wiring. We recommend the use of shielded cables. This
kind of cable is available from Advantech. Please contact your local supplier for
ordering information.
CE
This product has passed the CE test for environmental specifications. Test conditions
for passing included the equipment being operated within an industrial enclosure. In
order to protect the product from being damaged by ESD (Electrostatic Discharge)
and EMI leakage, we strongly recommend the use of CE-compliant industrial enclosure products.
FCC Class A
Note: This equipment has been tested and found to comply with the limits for a Class
A digital device, pursuant to part 15 of the FCC Rules. These limits are designed to
provide reasonable protection against harmful interference when the equipment is
operated in a commercial environment. This equipment generates, uses, and can
radiate radio frequency energy and, if not installed and used in accordance with the
instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential area is likely to cause harmful interference in
which case the user will be required to correct the interference at his own expense.
Technical Support and Assistance
1.Visit the Advantech web site at www.advantech.com/support where you can find
the latest information about the product.
2.Contact your distributor, sales representative, or Advantech's customer service
center for technical support if you need additional assistance. Please have the
following information ready before you call:
– Product name and serial number
– Description of your peripheral attachments
– Description of your software (operating system, version, application software,
etc.)
– A complete description of the problem
– The exact wording of any error messages
iiiADAM-4572 Series User Manual
Page 4
Safety Instructions
1.Read these safety instructions carefully.
2.Keep this User Manual for later reference.
3.Disconnect this equipment from any AC outlet before cleaning. Use a damp
cloth. Do not use liquid or spray detergents for cleaning.
4.For plug-in equipment, the power outlet socket must be located near the equip-
ment and must be easily accessible.
5.Keep this equipment away from humidity.
6.Put this equipment on a reliable surface during installation. Dropping it or letting
it fall may cause damage.
7.The openings on the enclosure are for air convection. Protect the equipment
from overheating. DO NOT COVER THE OPENINGS.
8.Make sure the voltage of the power source is correct before connecting the
equipment to the power outlet.
9.Position the power cord so that people cannot step on it. Do not place anything
over the power cord.
10. All cautions and warnings on the equipment should be noted.
11.If the equipment is not used for a long time, disconnect it from the power source
to avoid damage by transient overvoltage.
12. Never pour any liquid into an opening. This may cause fire or electrical shock.
13. Never open the equipment. For safety reasons, the equipment should be
opened only by qualified service personnel.
14. If one of the following situations arises, get the equipment checked by service
personnel:
– The power cord or plug is damaged.
– Liquid has penetrated into the equipment.
– The equipment has been exposed to moisture.
– The equipment does not work well, or you cannot get it to work according to
the user's manual.
– The equipment has been dropped and damaged.
– The equipment has obvious signs of breakage.
15. DO NOT LEAVE THIS EQUIPMENT IN AN ENVIRONMENT WHERE THE
STORAGE TEMPERATURE MAY GO BELOW -20° C (-4° F) OR ABOVE 60° C
(140° F). THIS COULD DAMAGE THE EQUIPMENT. THE EQUIPMENT
SHOULD BE IN A CONTROLLED ENVIRONMENT.
16. CAUTION: DANGER OF EXPLOSION IF BATTERY IS INCORRECTLY
REPLACED. REPLACE ONLY WITH THE SAME OR EQUIVALENT TYPE
RECOMMENDED BY THE MANUFACTURER, DISCARD USED BATTERIES
ACCORDING TO THE MANUFACTURER'S INSTRUCTIONS.
17. The sound pressure level at the operator's position according to IEC 704-1:1982
is no more than 70 dB (A).
DISCLAIMER: This set of instructions is given according to IEC 704-1. Advantech
disclaims all responsibility for the accuracy of any statements contained herein.
Advantech’s Modbus GatewayModbus Gateway is a robust, feature-rich, and cost
effective way to integrate of Ethernet and Serial Modbus devices. The Advantech’s
Modbus Gateway provides one, two or four serial ports, one or two Ethernet ports, a
wide range of power inputs, and a compact slim design, making them an ideal
solution for connecting multiple Modbus/ RTU and Modbus/ASCII serial devices to
Modbus TCP (Ethernet).
Originally developed for PLCs in industrial automation and manufacturing control
applications, Modbus is one of the most popular open standard protocols in use
today. The communication mode can be Modbus RTU/ASCII (Serial) or Modbus TCP
(Ethernet). Many industrial devices use Modbus as their communication standard.
However, the Ethernet-based Modbus protocol is different from the original serialbased protocols that a Modbus Gateway is needed to be a bridge for integration.
The Modbus/RTU and Modbus/ASCII protocols define how a “master” device polls
one or more “slave” devices and write real-time data over RS-232, RS-422, or RS485 serial data communication. The Advantech’s Modbus Gateway provides a feature that can allow users to select master or slave operation for each serial port. The
Advantech’s Modbus Gateway not only allows Ethernet master can control serial
slaves, but also allow serial masters to control Ethernet or serial slaves.
The Advantech’s Modbus Gateway supports various operating modes: RTU Master,
RTU Slave, ASCII Master, and ASCII Slave.
1.2Features
Provides a 10/100 Mbps auto-sensing Ethernet port
Compact design without any hardware configuration
Integration of Modbus TCP and Modbus RTU/ASCII networks
Supports COM port's baud rate up to 921.6 kbps
Supports up to 16 TCP connections and 32 requests simultaneously
Supports 31 slaves (RS-485) per serial port
Provides easy to use configuration utility
Software selectable RS-232/422/485 communication
Auto searching slave ID over configuration utility
Mounts on DIN-rail, wall, or panel
ADAM-4572 User Manual2
Page 9
1.3Package Check List
1 x Advantech’s Modbus Gateway
1 x Document and software CD
1 x DIN-rail kit
1 x 30 cm 3P to DB9 cable for RS-232 connection
Note!Please check above items, if any one of them is missing or damaged,
contact your sales representative.
Chapter 1Introduction
3ADAM-4572 User Manual
Page 10
ADAM-4572 User Manual4
Page 11
Chapter2
2 Getting Started
Page 12
2.1Understanding Modbus Gateways
Networks have become increasingly vital for industrial automation applications. Many
control devices today do not have a network port and can only communicate with a
dedicated local PC or control panel. Advantech’s revolutionary network-enabling
technology is now allowing control devices with serial ports to connect to the Ethernet
and share networks quickly and cost-effectively. The Advantech Modbus Gateway is
network-based, Modbus gateways for integrating new and existing Modbus/RTU and
Modbus/ASCII serial devices to newer TCP/IP networked-based devices.
Manufacturers, system integrators, and end users can now take advantage of
Modbus gateways to create networked applications for remote managing and
accessing data for their control devices that wasn’t possible before.
2.1.1Protocol Overview
Originally developed for PLCs in industrial automation and manufacturing control
application, Modbus has become one of the most popular open standard protocols in
use today. When it comes to planning data communication for open, multi-vendor
industrial control systems, Modbus is the first choice of end-users and integrators.
Although it’s not the most powerful protocol available, its rare simplicity allows not
only rapid implementation, but also remains flexible enough to be applied in virtually
all industrial situations. The communication mode of Modbus can be ASCII, RTU, or
TCP/IP. Modbus gateways are used to support applications such as protocol conversion between serial (Modbus/ASCII or Modbus/RTU) and networked (Modbus/TCP)
Modbus devices or it can be used to bridge Modbus serial devices over TCP/IP network.
The Modbus/RTU and Modbus/ASCII protocols define how a “master” device polls
one or more “slave” devices to read and write real-time data over RS-232, RS-422, or
RS-485 serial data communication. The simplicity of Modbus/RTU not only allows
rapid implementation, but can also remain flexible enough to be applied in virtually all
industrial situations.
During Modbus network communication, the protocol determines how each controller
will know its device address, recognize a message addressed to it, determine the
kind of action to be taken, and extract any data or other information contained in the
message. If a reply is required, the controller will construct the reply message and
send it back using Modbus protocol.
The way controllers communicate with each other is by using a master-slave technique, in which only one device (the master) can initiate queries. The other devices
(the slaves) respond by supplying the requested data to the master, or by taking the
action requested in the query. Typical master devices include host processors and
programming panels. Typical slaves include programmable controllers.
It is the master that can address individual slaves and initiate a broadcast message
to all slaves. On the other hand, slaves return a response to queries that are
addressed to them individually. Responses are not returned to broadcast queries
from the master.
ADAM-4572 User Manual6
Page 13
The Modbus protocol has a definite format for the master’s query, which incorporates
the device (or broadcast) address, a function code defining the requested action, any
data to be sent, and an error-checking field. The slave’s response message, which is
also constructed using Modbus protocol, contains fields confirming the action taken,
any data to be returned, and an error-checking field. If an error occurred in receipt of
the message, or if the slave is unable to perform the requested action, the slave will
construct an error message and send it as its response.
The basic system architecture is as below:
Chapter 2Getting Started
Figure 2.1 Modbus System Architecture 1
Figure 2.2 Modbus System Architecture 2
7ADAM-4572 User Manual
Page 14
2.1.2Modbus RTU
The Modbus/RTU protocol defines how a “master” device polls one or more “slave”
devices to read and write data in real-time over RS-232, RS-422, or RS-485 serial
data communication.
When using RTU mode, each 8-bit byte in a message contains two 4-bit hexadecimal
characters. The main advantage of this mode is that its greater character density
allows better data throughput than ASCII mode for the same baud rate. Nevertheless, each message must be transmitted in continuous stream.
2.1.3Modbus ASCII
When using ASCII mode, each 8-bit byte in a message is sent as two ACSII characters. The primary advantage of this ASCII mode is that it allows time intervals of up to
one second to occur between characters without causing an error.
Table 2.1: Comparison of Modbus RTU and ASCII Modes
ModeRTUASCII
Coding System8-bit binary.
Bits per Byte1 start bit,
Error CheckCRCLRC
Two hexadecimal
character contained in
each ASCII character of
the message
8 data bits,
1 bit for even/odd parity;
no bit for parity
1 stop bit if parity is used;
2 bits if no parity
Hexadecimal.
One hexadecimal
character contained in
each ASCII character of
the message
1 start bit ,
7 data bits,
1 bit for even/odd parity;
no bit for parity
1 stop bit if parity is used;
2 bits if no parity
2.1.4Modbus TCP
As a new extension of Modbus/RTU, the Modbus/TCP protocol defines how Modbus/
RTU messages are encoded within and transported over TCP/IP-based networks.
Modbus/TCP is just as simple to implement and flexible to apply as the original Modbus/RTU. The Modbus/TCP protocol is defined by its form of encapsulation for a
Modbus request or response. That means the Modbus request or response data is
encapsulated in TCP frame that has a six-byte header in Modbus/TCP protocol.
Modbus/TCP enables the use of Modbus messaging in an Intranet running the TCP/
IP protocols. Modbus/TCP is most commonly used for Ethernet attachment of PLC’s
or I/O modules to other simple field buses or I/O networks.
Power ConnectorTerminal block
Power Consumption 2.5W
Environment
Operating Temperature0 to 60 °C (32 to 140 °F)
Storage Temperature-20 to 80 °C (-4 to 176 °F)
9ADAM-4572 User Manual
Page 16
2.3Hardware
The following instructions will give the overview of the Advantech Modbus Gateway
hardware and its installation.
2.3.1LED Indicators
There are LEDs display the two sets of power status, system status, dual networks
status, and serial communication status on the front panel of the Advantech Modbus
Gateway. Each of them has its own specific meaning as below table.
Table 2.2: The Advantech Modbus Gateway LED Indicators
LED NameLED ColorStatusLED Description
Status/PowerGREENONHeartbeat (1 time/sec), system is ready
REDONPower is on
Speed/LinkGREENON100 Mbps speed
REDONValid network link
SerialGREENONData being transmitted
REDONData being received
OFFSystem is not working
OFFPower is off
OFF10 Mbps speed
OFFInvalid network link
OFFNo data being transmitted
OFFNo data being received
ADAM-4572 User Manual10
Page 17
2.3.2Dimensions (Units: mm)
Advantech’s Modbus Gateway
Chapter 2Getting Started
Figure 2.3 Front View of the Advantech Modbus Gateway
Figure 2.4 Back View of the Advantech Modbus Gateway
11ADAM-4572 User Manual
Page 18
Figure 2.5 Bottom View of the Advantech Modbus Gateway
Figure 2.6 Side View of the Advantech Modbus Gateway
ADAM-4572 User Manual12
Page 19
2.4Connecting Hardware
In this instruction, it will explain how to find a proper location for your Modbus
Gateways, and how to connect to the network, hock up the power cable, and connect
to the the Advantech Modbus Gateway.
2.4.1Choosing the Location
Due to thier innovative design, the Advantech Modbus Gateway can be:
Fixed to a panel mount
Chapter 2Getting Started
13ADAM-4572 User Manual
Page 20
Fixed to a DIN-rail
Figure 2.7 The Advantech Modbus Gateway Panel Mounting Bracket
Dimensions
Figure 2.8 The Advantech Modbus Gateway Panel Mounting
ADAM-4572 User Manual14
Page 21
DIN-rail Mounting
The Advantech Modbus Gateway can be mounted on a standard DIN-rail. The DINrail kit is screwed on the Modbus data gateway when out of factory. If the DIN-rail kit
is not screwed on the Advantech Modbus Gateway, please screw the DIN-rail kit on
the Modbus data gateway first.
Chapter 2Getting Started
Figure 2.9 DIN-rail Adapter
Figure 2.10 DIN-rail Mounting
15ADAM-4572 User Manual
Page 22
2.4.2The Advantech Modbus Gateway Serial Port Wiring
We recommend that shielded-twisted-pair cables that comply with the EIA RS-485
standard be used with the ADAM network to reduce interference. Only one set of
twisted-pair cables is required to transmit both Data and RTS signals. We advise that
the following standard colors (as indicated on the modules) be used for the communication lines:
Data+ (Y) -> Yellow
Data- (G) -> Green
1
WHITE
RED
2
3
4
BLACK
5
6
7
8
9
TX: Transmitted DataDTR: Data Terminal Ready
RX: Received DataCTS: Clear To Send
RTS: Request To SendN/C: No Connection
DSR: Data Set ReadyCD: Carrier Detect
SHIELD
Rx
Tx
DTR
GROUND
DSR
RTS
CTS
NC
Figure 2.11 Pin assignment of 3P to DB 9 cable
Wiring for RS-232 Connection
Figure 2.12 Wiring RS-232 Connection
ADAM-4572 User Manual16
Page 23
Wiring for RS-485 Connection
Figure 2.13 Wiring RS-485 Connection
Wiring for RS-422 Connection
Chapter 2Getting Started
Figure 2.14 Wiring RS-422 Connection
17ADAM-4572 User Manual
Page 24
ADAM-4572 User Manual18
Page 25
Chapter3
3 Configuration
Page 26
3.1Installing the Configuration Utility
The following section will show you how to install Advantech Serial Device Server
Configuration Utility, a tool to set up and monitor the EKI series Modbus Data
Gateways.
NoteBe sure the Microsoft .NET Framework on your host PC is
greater than version 2.0 .
1. Insert the Advantech INET Series Driver Utility CD-ROM into the CD-ROM
drive (e.g. E:\) on the host PC.
2. Use Windows explorer or the Windows Run command to execute the setup
program, the path for the setup program on the CD-ROM should be:
3. If there is an existed COM port mapping utility on the host PC, you have to
remove it and reboot, then go on installing.
4. Once the InstallShield Wizard starts running, click “Next” when the welcome
window opens to proceed with the installation.
ADAM-4572 User Manual20
Page 27
5. Carefully read the Software License Agreement, and press "I Agree" to
continue.
Chapter 3Configuration
6. The InstallShield will specify a default installation path, C:\Program
Files\Advantech eAutomation\Serial Device Server Configuration Utility.
21ADAM-4572 User Manual
Page 28
7. After few minutes, a message will indicate that Configuration Utility is successfully installed, click “Finish” to exit the InstallShield.
ADAM-4572 User Manual22
Page 29
3.2Starting the Configuration Utility
Advantech provides an easy-to-use configuration utility to configure your Modbus
Gateways through an Ethernet connection. For secure administration, it can also
restrict the access rights for configuration to only one host PC to enhance network
security. With this secure function enabled, other PCs will not have permission for
configuration. After the installation program on the Advantech IEDG Series Driver
Utility CD-ROM is finished, the serial device servers will be ready for use and configure.
You may open the Serial Device Server Configuration Utility from the Windows Start
Menu by clicking Start All Programs Advantech eAutomation SerialDevice Server Configuration Utility. The Serial Device Server Configuration Utility
will appear as below figure.
There are four major areas in the new Serial Device Server Configuration Utility.
1. Serial Device Servers List Area: All devices will be searched and listed in this
area. You can arrange different favorite group and virtual COM ports.
2. Serial Device Servers Information Area: Click on the devices or move cursor to
the devices, the related information will be shown in this area.
3. Configuration Area: Click on the items on the Serial Device Sever List Area, the
configuration page will be displayed in this area.
4. Quick Tool Bar: Useful management functions’ shortcuts.
Chapter 3Configuration
23ADAM-4572 User Manual
Page 30
3.3Discovering Modbus Gateways
3.3.1Auto Searching
Advantech Serial Device Server Configuration Utility will automatically search all the
EKI, ADAM and EDG series device servers on the network and show them on the
Serial Device Server List Area of the utility. The Utility provides an auto-searching
function to show your device(s) by simply executing the configuration utility program
from the Start Menu.
From here all devices on the same network domain will be searched and display on
the Serial Device Server List Area. You can click on the device name to show the features of the specific device. Click on the "+" before the model name (e.g. EKI-1224),
and the utility will expand the tree structure to show the individual device name. Click
on the “-“ before the model name (e.g. EKI-1224), and the utility will collapse the tree
structure.
For example, EKI-1224 in this figure is shown “EKI-1224-A6A1D4” after expending
the tree structure.
NoteWhen you configure the device for the first time, the default device name is
“MAC ID”. In this case, the device name “EKI-1224-A6A1D4” means the
device’s Mac ID is “00 D0 C9 A6 A1 D4”. You can change the device name
in System Tab of Device Property.
ADAM-4572 User Manual24
Page 31
Select the device in this sub-tree. The first tab on the “Configuration Area” shows the
summary of “Basic Information” included device type, firmware version, and device
name, “Ethernet Information”, and “Serial Port Information”. In the serial port information frame, it displays the operation mode, status and connected host IP.
Chapter 3Configuration
Click on the “+” before the device name, and the utility will expand the
communication interfaces on this Modbus data gateway.
Click on each interface item, you will entry the configuration page to modify the setting. The configuration will be introduced on following sections.
25ADAM-4572 User Manual
Page 32
ADAM-4572 User Manual26
Page 33
3.3.2Clear Device List and Search Again
You can click the “Clear Device List and Search Again” button on the Quick Tool
Bar and the utility will clear all list device servers in the Serial Device Server List
Area and re-search again. Don’t use this function frequently, or the warning message
will be pop-up.
You also can click the “Search Again” button on the Quick Tool Bar and the utility will search serial device servers on the local LAN.
3.3.3Manual Appending
Using “Add IP address to Favorite” or “Search a Range of IP addresses” functions,
you are allowed to add one device or group of devices to “Favorites”. These devices
can locate on local network domain or other network domain.
Chapter 3Configuration
27ADAM-4572 User Manual
Page 34
3.4Setting Ethernet Parameters
Click on the “+” before the model name (e.g. EKI-1224), and the utility will expand the
tree structure to show the individual device name. And clink on the “+” before the
device name, and utility will expand the communication interfaces on this Modbus
data gateway. Select the Ethernet interface (Eth1 or Eth2, these are two individual
Ethernet ports).
ADAM-4572 User Manual28
Page 35
MAC Address:
The MAC address is for the local system to identify and locate each serial device
servers. This MAC address is already set before delivery from factory, hence no need
for further configuration.
IP Address, Subnet Mask, Default Gateway:
You can choose from four possible IP Configuration modes --- Static, DHCP, BOOTP,
and DHCP/BOOTP.
Static IP
User defined IP address, Subnet Mask, and Default Gateway.
DHCP + Auto-IP
DHCP Server assigned IP address, Subnet Mask, Default Gateway, and
DNS.
BOOTP + Auto-IP
BOOTP Server assigned IP address.
DHCP + BOOTP + Auto-IP
DHCP Server assigned IP address, Subnet Mask, Default Gateway, and
DNS, or BOOTP Server assigned IP address. (If the DHCP Server does not
respond)
Chapter 3Configuration
NoteWhen you have finished the configuration of these settings for each cate-
gory, please press the “Apply” button in order to make these settings effective on the Modbus data gateway. (Will reboot your Modbus gateway
immediately)
29ADAM-4572 User Manual
Page 36
3.5Setting Serial Communication Parameters
Click on the "+" before the model name (e.g. EKI-1224), and the utility will expand the
tree structure to show the individual device name. And click on the “+” before the
device name, and the utility will expand the interfaces on this device server. Select
the serial interface. (Port1 to Port4 on e.g. EKI-1224)
3.5.1Basic Configuration
Description:
You can give a more detailed description on the function of the port for easier management and maintenance. Descriptions have a limit of 128 characters.
ADAM-4572 User Manual30
Page 37
Type:
Each Advantech Modbus Gateway offers 3 kinds of serial interfaces, RS-232, RS-
485 and RS-422. You can use any one of these serial interfaces according to your
requirements. You must also pay special attention to the wiring scheme serial connection to make sure it conforms to the serial type you select.
Baud Rate:
The Advantech Modbus Gateway supports baud rates from 50 bps to 921.6 Kbps.
When setting the baud rate, please note that the value should conform to the current
transmission speeds of connected devices.
Chapter 3Configuration
Parity, Data bits, Stop bits:
The settings for these parameters depend on the protocol that is running on the connected Modbus device (i.e. Modbus/ASCII or Modbus/RTU).
Modbus/ASCII
ParityNoneEven or Odd
Data bits
Stop bits
77
21
Modbus/RTU
ParityNoneEven or Odd
Data bits
Stop bits
88
21
31ADAM-4572 User Manual
Page 38
3.5.2Operation Configuration
The Operation tab is for each serial port’s operation mode configuration. The operation mode determines whether the devices that are connected to the serial port will
operate as a master or a slave, and whether the Modbus RTU or Modbus ASCII protocol will be used.
3.5.2.1 Modbus Slave Mode:
Mode:
This option specifies whether the Modbus RTU or Modbus ASCII slave devices are
connected to the serial port.
ADAM-4572 User Manual32
Page 39
Response Timeouts (ms):
This option specifies the time duration in milliseconds for the Advantech Modbus
Gateway to wait for a response after it has issued a command while using Modbus/
RTU or Modbus ASCII. After the timeout is expired and no response is received, the
Advantech Modbus Gateway will regard the command as failed. Note that the
timeout for the host PC must be greater than the timeout setting here specified,
otherwise an error will occur.
Frame Break (ms):
This option specifies the time interval in milliseconds between characters within the
Modbus/ASCII message. If a greater interval occurs, the receiving device assumes
an error has occurred.
Delay Time (ms):
Sometimes, some slave devices can't process the request that’s too close. The
Advantech Modbus Gateway can be delayed by a specified time to avoid this kind of
behavior limitation.That means, after getting the response frame from slave device,
the Advantech Modbus Gateway will delay a specified time before sending next
queued command.
Chapter 3Configuration
33ADAM-4572 User Manual
Page 40
Slave ID Information:
The Advantech Modbus Gatewayseries features an excellent function that the utility
will scan slave ID automatically. Click “Scan Slave ID” button, and the utility will start
to issue the requests to the devices connected to this serial port and wait the reply
about slave ID information. Alternative option, the utility allows to manual add or
delete slave ID information.
Note!The Advantech Modbus Gateway series uses a standard Modbus com-
mand to query the slave device. According to the Modbus standard, no
matter whether the command or address is supported or not, the device
should respond with the correct frame or exception code. Sometimes,
some device doesn't respond with any exception code, that will make
the scan mechanism fail to fetch the slave ID list.
ADAM-4572 User Manual34
Page 41
MAP Slave ID
The Advantech Modbus Gateway features another excellent function that you can
map the real slave device ID to be the virtual slave device ID. Just key in the slave ID
you want to map in the column “Map ID”.
3.5.2.2 Modbus Master Mode:
Chapter 3Configuration
Mode:
This option specifies whether the Modbus RTU or Modbus ASCII master device is
connected to the serial port.
Response Timeout (ms):
This option specifies the time duration in milliseconds for the Advantech Modbus
Gateway to wait for a response after it has issued a command while using Modbus/
RTU or Modbus ASCII. After the timeout is expired and no response is received, the
Advantech Modbus Gateway will regard the command as failed.
35ADAM-4572 User Manual
Page 42
Frame Break (ms):
This option specifies the time interval in milliseconds between characters within the
Modbus/ASCII message. If a greater interval occurs, the receiving device assumes
an error has occurred.
Slave IP Information:
This option specifies the slave IP address and slave ID of the Modbus TCP slave
device or another Advantech Modbus Gateway acts as the Modbus slave device.
Type the IP address in the column and its slave ID range, then click “Add” or “Delete”
button to add or remove the slave IP list.
3.6System
Users can set the device configuration in this page.
Firmware Version:
The firmware version is shown in this field. It can't be modified. Users should provide
this information when reporting any problem or inquiry.
Device Name:
Users can specify the device name. The device name also will be shown in the
device list area. It is useful when managing or monitoring several EKI devices.
Device Description:
User can specify the description for memory or identification usage.
ADAM-4572 User Manual36
Page 43
Modbus/TCP Listen Port:
Users can specify the socket port, other than use the default 502 port.
Modbus/TCP Host Idle Time(s):
In complex network environment, the broken of connection can't be detected quickly.
In standard operation system, such as Windows or Linux, it may take a long time to
make sure the socket connection is broken. Advantech Modbus gateway provides
the host idle time setting. If there is no any request in specified time, device will treat
the connection as broken one and release the relative resource for accepting further
possible coming connection.
Enable Modbus Slave Mapping:
This option is design only for 1 serial port model, Advantech’s Modbus Gateway, EKI1221 and EKI-1221D. With this option enabled, user can bypass the slave ID mapping. The Modbus request will send to serial port after translated, but keep the same
slave ID.
3.7Function Accessible Setting
Chapter 3Configuration
The Advantech Modbus Gateway provides a security function that the utility allows to
set up an accessible IP list for Modbus TCP devices which can access data from
Modbus data gateway.
Allow any IP access:
The default option, any Modbus TCP device can communicate with this Modbus data
gateway.
37ADAM-4572 User Manual
Page 44
Specified IP which can access:
Type the IP address in the column and click “Add” or “Delete” button to make the
accessible IP address list. The limit of this list is 32 IP addresses.
3.8Monitoring Modbus Status
Configuration utility provides an excellent function that allows monitoring the serial
ports’ status. It will present each serial port’s operation mode and status. The IP
address of the Modbus TCP device which is communicating with serial port will be list
on the right window. Click “Refresh” button, the status will be refresh once. It will be
auto refresh after click “Auto Refresh” and the time duration is depending on the setting (the default value is 1000ms).
ADAM-4572 User Manual38
Page 45
3.9Administrator Settings
The configuration utility provides several administrator settings for easy management
and configuration. Right click the mouse on the device name in the sub-tree of Serial
Device Sever List Area, and select these administrator settings.
3.9.1Import Export Device Settings
The utility allows importing or exporting the whole device setting via “.conf” file format.
Chapter 3Configuration
3.9.2Import/Export Serial Port Setting
The utility allows importing or exporting the serial port setting including “Basic Setting” and “Operation Setting” via “.sps” file format.
39ADAM-4572 User Manual
Page 46
3.9.3Locate the Modbus Data Gateway
If there are many Modbus data gateways need your management, you may need to
identify which unit is correct to configuration on utility. Click “Locate” to make that
unit’s “Status” LED be steady on until you click “Stop Locate”.
3.9.4Lock Device
The configuration utility provides the “Lock Device” function to make it more confidential. You need to set up a password while the first time clicking “Lock Device”. Be sure
to click “Reset Device” to restart the Modbus gateway and store your setting password into the memory.
Click “Unlock Device” to unlock the Modbus data gateway, and you need to fill in the
password you have set up before. If you forgot the password, the only way to solve
this problem is to restore the setting of the Modbus data gateway to the factory
default which will be introduced next section.
ADAM-4572 User Manual40
Page 47
Chapter 3Configuration
If you want to disable this function or change the password, click “Change Password”
to change the password to default “None” (leave the new password and confirm new
password columns blank) to disable this function or other password you want to
change. Be sure to click “Reset Device” to restart the Modbus gateway and store the
new password into the memory.
3.9.5Restore to Factory Default Settings
The configuration utility provides this function to let you can restore the Modbus data
gateway to factory default settings. The confirm message will be pop-up while clicking “Restore to Factory Default Settings”. If you really want to restore the Modbus
data gateway to factory default settings, please click “Yes” button to continue.
Then, please power off the Modbus data gateway within ten seconds, after reconnecting the power back, the all setting will be reset to the factory default. If the power
remains more than ten seconds, the Modbus data gateway will not have any
changes.
41ADAM-4572 User Manual
Page 48
3.9.6Update Firmware
Advantech continually upgrades its firmware to keep up with the ever-expending
world of computing. You can use the update firmware function in the utility to carry
out the upgrade procedure. Please access Advantech’s website:
http://www.advantech.com to download the latest version of the firmware.
1.Right click on the device name and select “Update Firmware” function.
ADAM-4572 User Manual42
Page 49
2.Select the firmware file you want to update.
Chapter 3Configuration
3.After downloading the firmware completely, click “OK” button, and the Modbus
data gateway will restart automatically.
43ADAM-4572 User Manual
Page 50
ADAM-4572 User Manual44
Page 51
AppendixA
A Slave ID Mapping
Mechanism
Page 52
A.1Slave Mode
Figure A.1 : Master Mode Slave ID Mapping Example
For example shown in above, when Advantech Modbus gateway getting request
from Modbus/TCP master device with target slave ID 3, the slave ID in the request
will translate/transformer into 8 and sent to relative serial port. After get response
from serial slave device with slave ID 8, the slave ID within the Modbus frame will be
translated/transform to slave ID 3 and sent back the Modbus/TCP master.
When Advantech Modbus gateway gets a request from Modbus/TCP master device
with an unmapped slave ID, an exception response with error code 0x0A will be sent
to the Modbus/TCP master device, which means “GATEWAY PATH UNAVAILABLE”.
ADAM-4572 User Manual46
Page 53
A.2Master Mode
Appendix ASlave ID Mapping Mechanism
Figure A.2 : Master Mode Slave ID Mapping Example
For example shown in above, when Advantech Modbus gateway getting request
from Modbus master serial device with target slave ID 8, the slave ID in the request
will translate/transformer into 18(Slave ID 8 + ID Offset 10) and sent to Modbus/TCP
slave device which target IP address is 10.0.0.3. After getting response from Modbus/TCP slave device with slave ID 18, the slave ID within the Modbus/TCP frame
will be translated/transform to slave ID 8 and sent back the Modbus master serial
device.
47ADAM-4572 User Manual
Page 54
ADAM-4572 User Manual48
Page 55
AppendixB
B Modbus Exception
Codes
Page 56
B.1Modbus Exception Codes
Advantech’s Modbus Gateway has implemented the standard gateway exception
code: 0x0A and 0x0B. Other exception codes should be implemented by the slave
devices. The Advantech’s Modbus Gateway will pass the exception code transparently.
Code Name Meaning
0x01ILLEGALFUNCTION
0x02ILLEGALDATA
ADDRESS
0x03ILLEGALDATAVALUE
0x04
SLAVE DEVICE
FAI LURE
0x05ACKNOWLEDGE
0x06
SLAVE DEVICE BUSY Specialized use in conjunction with programming com-
The function code received in the query is not an allowable action for the server (or slave). This may be because
the function code is only applicable to newer devices, and
was not implemented in the unit selected. It could also
indicate that the server (or slave) is in the wrong state to
process a request of this type, for example because it is
unconfigured and is being asked to return register values.
The data address received in the query is not an allowable
address for the server (or slave). More specifically, the
combination of reference number and transfer length is
invalid. For a controller with 100 registers, the PDU
addresses the first register as 0, and the last one as 99. If
a request is submitted with a starting register address of
96 and a quantity of registers of 4, then this request will
successfully operate (address-wise at least) on registers
96, 97, 98, 99. If a request is submitted with a starting register address of 96 and a quantity of registers of 5, then
this request will fail with Exception Code 0x02 “Illegal
Data Address” since it attempts to operate on registers
96, 97, 98, 99 and 100, and there is no register with
address 100.
A value contained in the query data field is not an allowable value for server (or slave). This indicates a fault in
the structure of the remainder of a complex request, such
as that the implied length is incorrect. It specifically does
NOT mean that a data item submitted for storage in a register has a value outside the expectation of the application
program, since the MODBUS protocol is unaware of the
significance of any particular value of any particular register.
An unrecoverable error occurred while the server (or
slave) was attempting to perform the requested action.
Specialized use in conjunction with programming commands.
The server (or slave) has accepted the request and is processing it, but a long duration of time will be required to do
so. This response is returned to prevent a timeout error
from occurring in the client (or master). The client (or master) can next issue a Poll Program Complete message to
determine if processing is completed.
mands.
The server (or slave) is engaged in processing a longduration program command. The client (or master) should
retransmit the message later when the server (or slave) is
free.
ADAM-4572 User Manual50
Page 57
0x08
MEMORY PARITY
ERROR
Appendix BModbus Exception Codes
Specialized use in conjunction with function codes 20 and
21 and reference type 6, to indicate that the extended file
area failed to pass a consistency check.
The server (or slave) attempted to read record file, but
detected a parity error in the memory. The client (or master) can retry the request, but service may be required on
the server (or slave) device.
0x0AGATEWAYPAT H
UNAVAILABLE
0x0B
GATEWAY TARGET
DEVICE FAILED TO
RESPOND
Specialized use in conjunction with gateways, indicates
that the gateway was unable to allocate an internal communication path from the input port to the output port for
processing the request. Usually means that the gateway
is misconfigured or overloaded.
Specialized use in conjunction with gateways, indicates
that no response was obtained from the target device.
Usually means that the device is not present on the network.