HMS Anybus Communicator for Modbus RTU User manual

HMS Industrial Networks AB
Germany
Japan
Sweden
U.S.A
+ 49 - 721 - 96472 - 0
+ 81 - 45 - 478 -5340
+ 46 - 35 - 17 29 20
+ 1 - 773 - 404 - 3486
us-sales@hms-networks.com
User Manual
Anybus®Communicator™ for Modbus RTU
Rev. 2.53


Preface About This Document
How To Use This Document ............................................................................................................ P-1
Important User Information .............................................................................................................. P-1
Related Documents.............................................................................................................................. P-2
Document History ............................................................................................................................... P-2
Conventions & Terminology.............................................................................................................. P-3
Glossary ................................................................................................................................................. P-3
Support .................................................................................................................................................. P-4
Chapter 1 About the Anybus Communicator for Modbus-RTU
External View ........................................................................................................................................1-2
Status LEDs ...........................................................................................................................................1-3
Configuration Switches ........................................................................................................................1-4
Node Address...............................................................................................................................1-4
Baudrate Configuration.................................................................................................................1-4
Parity & Stop Bits.......................................................................................................................1-4
Physical Interface...........................................................................................................................1-4
Hardware Installation ...........................................................................................................................1-5
Software Installation .............................................................................................................................1-6
ABC Config Tool.........................................................................................................................1-6
Chapter 2 Basic Operation
General....................................................................................................................................................2-1
Data Exchange Model ..........................................................................................................................2-2
Memory Map................................................................................................................................2-2
Data Exchange Example.............................................................................................................2-3
Sub-Network Protocol .........................................................................................................................2-4
Protocol Modes..............................................................................................................................2-4
Protocol Building Blocks ...............................................................................................................2-4
Master Mode ................................................................................................................................2-5
Generic Data Mode ......................................................................................................................2-5
Data Representation on Modbus RTU..............................................................................................2-6
General.........................................................................................................................................2-6
Supported Function Codes.............................................................................................................2-6
Coil & Register Map ...................................................................................................................2-6
Supported Exception Codes...........................................................................................................2-6
Chapter 3 Navigating the ABC Config Tool
Main Window ........................................................................................................................................3-1
Pull-down Menu ...........................................................................................................................3-2
Toolbar Icons ................................................................................................................................3-5
Table of Contents
Table of Contents

Table of Contents 3
Chapter 4 Basic Settings
Fieldbus Settings....................................................................................................................................4-6
ABC Parameters ....................................................................................................................................4-7
Sub-Network Parameters .....................................................................................................................4-1
Chapter 5 Nodes
General....................................................................................................................................................5-1
Adding & Managing Nodes.................................................................................................................5-1
Node Parameters...................................................................................................................................5-1
Chapter 6 Transactions
General....................................................................................................................................................6-1
Adding & Managing Transactions ......................................................................................................6-1
Transaction Parameters (Master Mode).............................................................................................6-2
Parameters (Query & Broadcast)..................................................................................................6-2
Parameters (Response)...................................................................................................................6-3
Transaction Parameters (Generic Data Mode).................................................................................6-3
Produce-Transactions ....................................................................................................................6-3
Consume-Transactions ..................................................................................................................6-4
Transaction Editor ................................................................................................................................6-5
Chapter 7 Frame Objects
General....................................................................................................................................................7-1
Adding and Editing Frame Objects ...................................................................................................7-1
Constant Objects (Byte, Word, Dword)............................................................................................7-2
Limit Objects (Byte, Word, Dword) ..................................................................................................7-3
Data Object ............................................................................................................................................7-4
Variable Data Object ............................................................................................................................7-4
Checksum Object ..................................................................................................................................7-6
Chapter 8 Commands
General....................................................................................................................................................8-1
Adding & Managing Commands ........................................................................................................8-1
Pull-Down Menu..........................................................................................................................8-2
Toolbar Icons ................................................................................................................................8-2
The Command Editor ..........................................................................................................................8-3
General.........................................................................................................................................8-3
Basic Navigation ..........................................................................................................................8-3
Pull-down Menu ...........................................................................................................................8-4
Editing a Command .....................................................................................................................8-5
Example: Specifying a Modbus-RTU Command in Master Mode ................................................8-6

Table of Contents 4
Chapter 9 Sub Network Monitor
Chapter 10 Node Monitor
General..................................................................................................................................................10-1
Navigating the Node Monitor...........................................................................................................10-2
Pull-Down Menu........................................................................................................................10-3
Toolbar Icons ..............................................................................................................................10-4
Chapter 11 Data Logger
General..................................................................................................................................................11-1
Operation..............................................................................................................................................11-1
Configuration .......................................................................................................................................11-2
Chapter 12 Configuration Wizards
General..................................................................................................................................................12-1
Selecting a Wizard Profile ..................................................................................................................12-1
Wizard - Modbus RTU Master .........................................................................................................12-2
Chapter 13 Control and Status Registers
General..................................................................................................................................................13-1
Handshaking Procedure ..............................................................................................................13-1
Data Consistency ........................................................................................................................13-2
Status Register Contents (Gateway to Control System)................................................................13-3
General Information....................................................................................................................13-3
Status Codes in Master Mode .....................................................................................................13-3
Status Code in Generic Data Mode ............................................................................................13-4
Control Register Contents (Control System to Gateway).............................................................13-5
General Information....................................................................................................................13-5
Control Codes in Master Mode ...................................................................................................13-5
Control Codes in Generic Data Mode .........................................................................................13-5
Chapter 14 Advanced Fieldbus Configuration
General..................................................................................................................................................14-1
Mailbox Editor.....................................................................................................................................14-1
Appendix A Connector Pin Assignments
Fieldbus Connector (Modbus-RTU).................................................................................................A-1
Power Connector .................................................................................................................................A-1
PC Connector .......................................................................................................................................A-2

Table of Contents 5
Sub-network Interface.........................................................................................................................A-3
General Information.....................................................................................................................A-3
Bias Resistors (RS485 Only)....................................................................................................... A-3
Termination (RS485 & RS422 Only) ....................................................................................... A-3
Connector Pinout (DB9F) ...........................................................................................................A-3
Typical Connection (RS485)........................................................................................................A-4
Typical Connection (RS422 & 4-Wire RS485) .........................................................................A-4
Typical Connection (RS232)........................................................................................................A-4
................................................................................................................................................................. A-5
Appendix B Technical Specification
Mechanical Properties.......................................................................................................................... B-1
Electrical Characteristics ..................................................................................................................... B-1
Environmental Characteristics ........................................................................................................... B-1
Regulatory Compliance ....................................................................................................................... B-2
Appendix C Troubleshooting
Appendix D ASCII Table

Preface
About This Document
How To Use This Document
This document contains a general introduction as well as a description of the technical features pro-
vided by the Anybus Communicator, including the PC-based configuration software.
The reader of this document is expected to be familiar with PLC and software design, as well commu-
nication systems in general. The reader is also expected to be familiar with the Microsoft Windows op-
erating system.
Important User Information
The data and illustrations found in this document are not binding. We, HMS Industrial Networks AB,
reserve the right to modify our products in line with our policy of continuous product development. The
information in this document is subject to change without notice and should not be considered as a com-
mitment by HMS Industrial Networks AB. HMS Industrial Networks AB assumes no responsibility for
any errors that may appear in this document.
There are many applications of this product. Those responsible for the use of this device must ensure
that all the necessary steps have been taken to verify that the application meets all performance and safe-
ty requirements including any applicable laws, regulations, codes, and standards.
Anybus® is a registered trademark of HMS Industrial Networks AB. All other trademarks are the prop-
erty of their respective holders.
The examples and illustrations in this document are included solely for illustrative purposes. Because of
the many variables and requirements associated with any particular implementation, HMS cannot as-
sume responsibility or liability for actual use based on these examples and illustrations.
Warning: This is a class A product. In a domestic environment this product may cause radio interfer-
ence in which case the user may be required to take adequate measures.
ESD Note: This product contains ESD (Electrostatic Discharge) sensitive parts that may be damaged
if ESD control procedures are not followed. Static control precautions are required when
handling the product. Failure to observe this may cause damage to the product.

About This Document P-2
Related Documents
Document History
Summary of Recent Changes (2.52... 2.53)
Revision List
Document name Author
ABC-RTU Installation Leaflet HMS
Change Page(s)
Corrected switch information (‘Physical Interface’) 1-4
Misc. corrections and adjustments -
Revision Date Author Chapter Description
2.00 2005-08-25 PeP All Second major release
2.50 2006-04-05 PeP All Major update
2.51 2006-06-01 PeP - Minor corrections
2.52 2006-12-22 PeP - Minor corrections
2.53 2007-11-23 PeP All Minor updates

About This Document P-3
Conventions & Terminology
The following conventions are used throughout this document:
• Numbered lists provide sequential steps
• Bulleted lists provide information, not procedural steps
• The term ‘user’ refers to the person or persons responsible for installing the Anybus Communi-
cator in a network.
• The term ‘gateway’ refers to the Anybus Communicator.
• Hexadecimal values are written in the format 0xNNNN, where NNNN is the hexadecimal value.
• Decimal values are represented as NNNN where NNNN is the decimal value
• As in all communication systems, the terms “input” and “output” can be ambiguous, because
their meaning depend on which end of the link is being referenced. The convention in this doc-
ument is that “input” and “output” are always being referenced to the master/scanner end of the
link.
Glossary
Term Meaning
ABC Anybus®Communicator™
Broadcaster A protocol-specific node in the configuration that handles transactions destined to all nodes.
RTU Modbus RTU
Command A pre-defined transaction.
Configuration List of configured nodes with transactions on the sub-network.
Fieldbus The higher level network to which the communicator is connected.
Fieldbus Control System Fieldbus master
Frame Object Low level entities which are used to describe the different parts of a Transaction.
Monitor A tool for debugging the gateway and the network connections.
Node A device in the configuration which defines the communication with a node on the sub-network
Sub-network The network that is logically located on a subsidiary level with respect to the fieldbus, and to
which the Anybus Communicator acts as a gateway.
Transaction A generic building block that is used in the sub-network configuration and defines the data that
is sent and received on the sub-network.
User Person or persons responsible for installing the Anybus Communicator
Higher Level Network In this case, Modbus RTU
Network
Fieldbus

About This Document P-4
Support
For technical support consult the online FAQ (www.anybus.com), or contact the nearest support centre:
HMS Sweden (Head Office)
E-mail: [email protected]
Phone: +46 (0) 35 - 17 29 20
Fax: +46 (0) 35 - 17 29 09
Online: www.anybus.com
HMS America
E-mail: [email protected]
Phone: +1-773-404-2271
Toll Free: 888-8-Anybus
Fax: +1-773-404-1797
Online: www.anybus.com
HMS Germany
E-mail: [email protected]
Phone: +49-721-96472-0
Fax: +49-721-964-7210
Online: www.anybus.com
HMS Japan
E-mail: [email protected]
Phone: +81-45-478-5340
Fax: +81-45-476-0315
Online: www.anybus.com

Chapter 1
About the Anybus Communicator for Modbus-RTU
The Anybus Communicator for Modbus RTU acts as a gateway between virtually any serial application
protocol and a Modbus RTU-based network. Integration of industrial devices is enabled without loss of
functionality, control and reliability, both when retro-fitting to existing equipment as well as when set-
ting up new installations.
Sub Network
The gateway can address up to 31 nodes, and supports the following physical standards:
•RS-232
•RS-422
•RS-485
Modbus RTU Interface
Modbus RTU connectivity is provided through patented Anybus technology; a proven industrial com-
munication solution used all over the world by leading manufacturers of industrial automation products.
• Galvanically isolated bus interface
• Coil and Register access
• RS-232 or RS-485 operation
• On-board configuration switches
• 1200... 57600bps operation
0RGEXV5780DVWHU
HJD3/&
6HULDOFRPPXQLFDWLRQGHYLFHV
0XOWL1RGH6HULDO6XE1HWZRUN6LQJOH1RGH6HULDO6XE1HWZRUN
0RGEXV5780DVWHU
HJD3/&
6HULDOFRPPXQLFDWLRQ
GHYLFH
0RGEXV5781HWZRUN
0RGEXV5781HWZRUN

About the Anybus Communicator for Modbus-RTU 1-2
External View
For wiring and pin assignments, see A-1 “Connector Pin Assignments”.
A: Modbus RTU Connector
This connector is used to connect the gateway to the fieldbus.
See also...
- A-1 “Fieldbus Connector (Modbus-RTU)”
B: Configuration Switches
See also...
- 1-4 “Configuration Switches”
C: Status LEDs
See also...
- 1-3 “Status LEDs”
D: PC-connector
This connector is used to connect the gateway to a PC for con-
figuration and monitoring purposes.
See also...
- A-2 “PC Connector”
E: Sub-network Connector
This connector is used to connect the gateway to the serial sub-network.
See also...
- A-3 “Sub-network Interface”
F: Power Connector
This connector is used to apply power to the gateway.
See also...
- A-1 “Power Connector”
- B-1 “Technical Specification”
G: DIN-rail Connector
The DIN-rail mechanism connects the gateway to PE (Protective Earth).
See also...
- 1-5 “Hardware Installation”
- B-1 “Technical Specification”
*
&
%
$
'
(
)

About the Anybus Communicator for Modbus-RTU 1-3
Status LEDs
# State Status
1 - Bus Error Off Normal operation
Red Bus error; CRC mismatch >10%
2 - Bus Ready Off Not powered
Green Normal operation (bus ready)
Red Bus is off line (bus not ready)
3 - Processing Off Currently not processing query
Green, flashing Currently processing query
4 - Switch Status Off Normal operation
Red Invalid configuration switch setting
5 - Subnet Statusa
a. This led turns green when all transactions have been active at least once. This
includes any transactions using “change of state” or “change of state on trigger”. If
a timeout occurs on a transaction, this led will turn red.
Off Power off
Green, flashing Initializing and not running
Green Running
Red Stopped or subnet error, or timeout
6 - Device Status Off Power off
Alternating Red/Green Invalid or missing configuration
Green Initializing
Green, flashing Running
Red, flashing Contact HMS

About the Anybus Communicator for Modbus-RTU 1-4
Configuration Switches
The configuration switches determines the basic communication settings
for the Modbus interface. Normally, these switches are covered by a plas-
tic hatch. When removing the hatch, avoid touching the circuit boards and
components. If tools are used to open the hatch, be cautious.
Note that these settings cannot be changed during runtime, i.e. the gate-
way must be restarted in order for any changes to have effect.
Node Address
Baudrate Configuration
Parity & Stop Bits
Physical Interface
Node Address Sw. 1 Sw. 2 Sw. 3 Sw. 4 Sw. 5 Sw. 6 Sw. 7
(reserved) OFF OFF OFF OFF OFF OFF OFF
1 OFF OFF OFF OFF OFF OFF ON
2 OFF OFF OFF OFF OFF ON OF
... ... ... ... ... ... ... ...
126 ONONONONONONOFF
127 ONONONONONONON
Baudrate Sw. 8 Sw. 1 Sw. 2
(reserved) OFF OFF OFF
1200 bps OFF OFF ON
2400 bps OFF ON OFF
4800 bps OFF ON ON
9600 bps ON OFF OFF
19200 bps (standard) ON OFF ON
38400 bps ON ON OFF
57600 bps ON ON ON
Parity Sw. 3 Sw. 4
(reserved) OFF OFF
No parity, 2 stop bits OFF ON
Even parity, 1 stop bit ON OFF
Odd parity, 1 stop bit ON ON
Interface Type Sw. 5
RS-485 OFF
RS-232 ON

About the Anybus Communicator for Modbus-RTU 1-5
Hardware Installation
Perform the following steps when physically installing the gateway:
1. Snap the gateway on to the DIN-rail (See 1-2 “DIN-rail Connector”)
The DIN-rail mechanism works as follows:
To snap the gateway on, first press the it downwards (1) to compress the
spring in the DIN-rail mechanism, then push it against the DIN-rail as to
make it snap on (2)
To snap the gateway off, push the it downwards (1) and pull it out from
the DIN-rail (2), as to make it snap off from the DIN-rail.
2. Connect the gateway to the Modbus RTU network
3. Set the Modbus RTU communication settings using the on-board switches
4. Connect the gateway to the serial sub-network
5. Connect the gateway to a free COM-port on the PC via the PC-cable.
6. Connect the power cable and apply power
7. Start the ABC Config Tool program on the PC
(The ABC Config Tool software attempts to detect the serial port automatically. If not success-
ful, select the correct port manually in the “Port”-menu).
8. Configure the gateway using the ABC Config Tool and download the configuration

About the Anybus Communicator for Modbus-RTU 1-6
Software Installation
ABC Config Tool
System requirements
• Pentium 133 MHz or higher
• 10 MB of free space on the hard drive
•8MBRAM
• Screen resolution of 800x600 (16 bit colour) or higher
• Microsoft Windows™ NT4 / 2000 / XP
• Internet Explorer 4.01 SP1 or newer
Installation
• Anybus Communicator resource CD
Insert the CD and follow the on-screen instructions. If the installation does not start automati-
cally, right-click on the CD-drive icon and select Explore. Execute ‘setup.exe’ and follow the on-
screen instructions.
• From website
Download and execute the self-extracting .exe-file from the HMS website (www.anybus.com).

Chapter 2
Basic Operation
General
The Anybus Communicator gateway is designed to exchange data between a serial sub-network and a
higher level network (in this case Modbus RTU). Unlike most other gateway devices of similar kind, it
does not have a fixed protocol for the sub-network, and can be configured to handle almost any form
of serial communication.
The gateway can issue serial telegrams cyclically, on change of state, or based on trigger events issued by
the control system of the higher level network (i.e. the fieldbus master or PLC). It can also monitor cer-
tain aspects of the sub-network communication and notify the higher level network when data has
changed.
An essential part of the Anybus Communicator package is the ABC Config Tool, a Windows™ appli-
cation which is used to supply the gateway with a description of the sub-network protocol. No program-
ming skills are required; instead, a visual protocol description-system is used to specify the different parts
of the serial communication.

Basic Operation 2-2
Data Exchange Model
Internally, the data exchanged on the sub-network, and
the data exchanged on the higher level network, resides
in the same memory.
This means that in order to exchange data with the sub-
network, the higher level network simply reads and
writes data to memory locations specified using the
ABC Config Tool. The very same memory locations
can then be exchanged on the sub-network.
The internal memory buffer is divided into three areas
based on their function:
• Input Data (512 bytes)
This area can be read by the higher level net-
work (in this case Modbus RTU).
• Output Data (512 bytes)
This area can be read/written by the higher lev-
el network (in this case Modbus RTU).
• General Data (Up to 1024 bytes)
This area cannot be accessed from the higher
level network, but may be used for transfers be-
tween individual nodes on the sub-network, or
as a general “scratch pad” for data. The actual
size of this area depends on the amount of data
that is exchanged on the sub-network. The gate-
way can handle up to 1024 bytes of General Data.
Memory Map
When building the sub-network configuration using the ABC Config Tool, the different areas described
above are mapped to the memory locations (addresses) specified below.
*HQHUDO'DWD
$%&,QWHUQDO0HPRU\
,QSXW'DWD
E\WHV
6XE1HWZRUN
2XWSXW'DWD
E\WHV
+LJKHU/HYHO1HWZRUN
,QSXW'DWD 2XWSXW'DWD *HQHUDO'DWD
6XE1HWZRUN 6XE1HWZRUN 6XE1HWZRUN
)LHOGEXV
5HDG:ULWH
5HDG2QO\
5HDG2QO\
5HDG:ULWH
5HDG:ULWH
)LHOGEXV )LHOGEXV
[ [
[)) [))
[
["""

Basic Operation 2-3
Data Exchange Example
In the following example, a temperature regulator on the sub-network exchanges information with a
PLC on the higher level network, via the internal memory buffers in the gateway.
7KH7HPSHUDWXUH5HJXODWRUKDVWZR
UHJLVWHUVKROGLQJWKH6HWSRLQW7HPSHUDWXUH
DQGWKH$FWXDO7HPSHUDWXUHUHVSHFWLYHO\
7KH3/&H[FKDQJHGDWDEHWZHHQWKHLQWHUQDO
3/&PHPRU\DQGWKHVODYHVLQWKLVFDVHWKH
$%&RQWKH0RGEXV578QHWZRUN
7KH$%&FRSLHVWKH2XWSXW5HJLVWHURI
WKH7HPSHUDWXUH5HJXODWRUWRWKH,QSXW
'DWDDUHD
7KH$%&FRSLHVWKH7HPSHUDWXUH
6HWSRLQWIURPWKH2XWSXW'DWDDUHDWR
WKH,QSXW5HJLVWHULQWKH7HPSHUDWXUH
5HJXODWRU
7KH3/&0HPRU\DVVRFLDWHGZLWK
WKH$%&LVH[FKDQJHG
'DWDIURPWKH,QSXW'DWDDUHDLVFRSLHGWR
3/&,QSXW0HPRU\DQG3/&2XWSXW
0HPRU\LVFRSLHGWRWKH2XWSXW'DWD
DUHD
,QSXW'DWD
$%&
6HULDO'HYLFH7HPSHUDWXUH5HJXODWRU
3/&0RGEXV5780DVWHU
2XWSXW'DWD *HQHUDO'DWD
[ [
[)) [))
[
["""
2XWSXW5HJLVWHU ,QSXW5HJLVWHU
7HPSHUDWXUH6HWSRLQW
7HPSHUDWXUH6HWSRLQW
$FWXDO7HPSHUDWXUH
$FWXDO7HPSHUDWXUH
3/&0HPRU\,QSXWV 3/&0HPRU\2XWSXWV
7HPSHUDWXUH6HWSRLQW
$FWXDO7HPSHUDWXUH
QRWXVHGLQWKLVH[DPSOH
0RGEXV5786XE1HWZRUN

Basic Operation 2-4
Sub-Network Protocol
Protocol Modes
The gateway features two distinct modes of operation regarding the sub-network communication, called
‘Master Mode’ and ‘Generic Data Mode’. Note that the protocol mode only specifies the basic commu-
nication model, not the actual sub-network protocol.
•MasterMode
In this mode, the gateway acts as a master on the sub-network, and the serial communication
takes place in a Query-Response fashion. The nodes on the network are not permitted to issue
messages unless they have been addressed by the gateway first.
For more information about this mode, see 2-5 “Master Mode”.
• Generic Data Mode
In this mode, there is no master-slave relationship between the sub-network nodes and the gate-
way; any node on the sub-network, including the gateway, may spontaneously produce or con-
sume messages.
For more information about this mode, see 2-5 “Generic Data Mode”.
Protocol Building Blocks
The following building blocks are used in ABC Config Tool to describe the sub-network communica-
tion. How these blocks apply to the two protocol modes will be described later in this document.
•Nodes
A node represents a single device on the sub-network. Each node can be associated with a
number of Transactions, see below.
•Transactions
A ‘Transaction’ represents a complete serial telegram, and consists of a number of Frame Objects
(below). Each Transaction is associated with a set of parameters controlling how and when to
use it on the sub-network.
• Commands
Commands are simply pre-defined Transactions stored in the ABC Config Tool. This simplifies
common operations by allowing Transactions to be stored and re-used.
• Frame Objects
Frame Objects are low level entities used to compose Transactions (see above). A Frame Object
can represent a fixed value (a constant), a range of values (limit objects), a block of data or a cal-
culated checksum.
Table of contents
Other HMS Cell Phone manuals