Table of Contents Table of Contents 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...
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.
About This Document P-2 Related Documents Document name Author ABC-RTU Installation Leaflet Document History Summary of Recent Changes (2.52... 2.53) Change Page(s) Corrected switch information (‘Physical Interface’) Misc. corrections and adjustments Revision List Revision Date Author Chapter Description 2.00 2005-08-25 PeP Second major release 2.50 2006-04-05 PeP...
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.
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: support@hms-networks.com Phone: +46 (0) 35 - 17 29 20 Fax: +46 (0) 35 - 17 29 09 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.
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...
Green, flashing Running Red, flashing Contact HMS 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.
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.
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...
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.
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.
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.
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. •...
Basic Operation 2-5 Master Mode In this mode, the communication is based on a Query/Response scheme; when the gateway issues a Query on the sub-network, the addressed node is expected to issue a Response to that Query. Nodes are not permitted issue Responses spontaneously, i.e. without first receiving a Query. There is one exception to this rule;...
Basic Operation 2-6 Data Representation on Modbus RTU General The Input- and Output Data areas are mapped to Modbus registers 0... 1279 and Coils 0... 20479. Supported Function Codes The following function codes are supported: Function Code Modbus Function Associated with Area(s) Read Coil Input- and Output Data Area (0x000...
Chapter 3 Navigating the ABC Config Tool Main Window The main window in the ABC Config Tool can be divided in 4 sections as follows: • A: Pull-down Menus & Tool Bar The second drop-down menu from the left will change de- pending on the current context.
Navigating the ABC Config Tool 3-2 Pull-down Menu File This menu features the following entries: • Create a new configuration. See also 12-1 “Configuration Wizards”. • Open... Open a previously created configuration. • Save Save the current configuration. • Save As... Save the current configuration under a new name.
Page 25
Navigating the ABC Config Tool 3-3 Tools This menu features the following entries: • Port This entry selects the COM-port used for the configuration of the gateway. • Upload configuration from ABC Upload the configuration from the gateway to the ABC Config Tool. •...
Page 26
Navigating the ABC Config Tool 3-4 View This menu features the following entries: • Toolbar This entry enables/disables the toolbar icons at the top of the main window. • Status Bar This entry enables/disables the status bar at the bottom of the main window.
Navigating the ABC Config Tool 3-5 Toolbar Icons The toolbar features icons for the most commonly used functions. • New, Open & Save See 3-2 “File”. • Upload from ABC & Download to ABC See 3-3 “Tools”. • Up one Level Clicking on this icon will move the selection in the navigation section.
Chapter 4 Basic Settings Fieldbus Settings (Select ‘Fieldbus’ in the Navigation Section to gain access to the parame- ters described in this section). General During start-up the fieldbus interface of the gateway is initialized to fit the configuration created in the ABC Config Tool.
Basic Settings 4-7 ABC Parameters (Select ‘ABC’ in the Navigation Section to gain access to the parameters described in this section). Interface Currently, only serial communications is supported. Status / Control Word (See 13-1 “Control and Status Registers”). Value Description Enabled Enable the Control- and Status Registers.
Basic Settings 4-1 Sub-Network Parameters (To gain access to the parameters described in this section, select ‘Sub Net- work’ in the Navigation Section). Communication These parameters specify the actual communication settings used for the sub-network. Parameter Description Valid Settings Bit rate Selects the bit rate 1200...57600 Data bits...
Chapter 5 Nodes General In ABC Config Tool, a node represents a single device on the network. While the gateway doesn’t fea- ture a scanlist in the traditional sense, all nodes, and their transactions, will be processed in the order they have been defined in the ABC Config Tool.
Chapter 6 Transactions General As mentioned previously, transactions are representations of the actual serial telegrams exchanged on the serial sub-network. While the gateway doesn’t feature a scanlist in the traditional sense, all nodes, and their transactions, will be processed in the order they have been defined in the ABC Config Tool. Transactions are handled slightly differently in the two protocol modes: •...
Transactions 6-2 Transaction Parameters (Master Mode) Parameters (Query & Broadcast) (To gain access to these parameters, select a Query- or Broadcast- transaction in the Navigation Section) Parameter Description Minimum time between This parameter specifies how long the gateway shall wait after transmitting a broadcast trans- broadcasts (10ms) action before processing the next entry in the scanlist.
Transactions 6-3 Parameters (Response) (To gain access to these parameters, select a Response-transaction in the Navigation Section) Parameter Description Trigger byte This parameter is used to enable/disable the trigger functionality for the response. If enabled, the gateway will increase the trigger byte by one when the gateway receives new data from the sub-network.
Transactions 6-4 Parameter Description Trigger byte address This parameter specifies location of the trigger byte in the internal memory buffer. If ‘Update mode’ is set to ‘Change of state on trigger’, the memory location specified by this parameter is monitored by the gateway. Whenever the trigger byte is updated, the gateway will produce the transaction on the sub-network.
Transactions 6-5 Transaction Editor The Transaction Editor can be used to edit the individual Frame Objects of a Transaction. The same settings are also available in the Parameter Section of the Main Window, however the Transaction Editor presents the Frame Objects in a more visual manner. To edit the value of a parameter, click on it and enter a new value using the keyboard.
Chapter 7 Frame Objects General Each transaction consists of Frame Objects which makes up the serial telegram frame. Each Frame Ob- ject specifies how the gateway shall interpret or generate a particular part of the telegram. There are 5 types of frame objects, which are described in detail later in this chapter: •...
Frame Objects 7-2 Constant Objects (Byte, Word, Dword) Constant Objects have a fixed value and come in three sizes: • Byte 8 bits • Word 16 bits • Dword 32 bits Constants are handled differently depending on the direction of the transaction: •...
Frame Objects 7-3 Limit Objects (Byte, Word, Dword) Limit Objects have a fixed range and come in three sizes: • Byte 8 bits • Word 16 bits • Dword 32 bits Limit Objects are handled differently depending on the direction of the transaction: •...
Frame Objects 7-4 Data Object Data Objects are used to represent raw data as follows: • Produce/Query Transactions The specified data block is forwarded from the higher level network to the sub-network. • Consume/Response Transactions The specified data block is forwarded from the sub-network to the higher level network. To specify the properties of the object, select it in the Navigation Section enter the desired settings in the Parameter section as follows: Parameter...
Page 41
Frame Objects 7-5 To specify the properties of the object, select it in the Navigation Section enter the desired settings in the Parameter section as follows: Parameter Description Byte Swapping • No Swapping No swapping will be performed on the data •...
Frame Objects 7-6 Checksum Object Most serial protocols features some way of verifying that the data has not been corrupted during trans- fer. The Checksum Object calculates and includes a checksum in a transaction. Parameter Description Error Check Start byte This parameter specifies the byte offset in the transaction to start checksum calculations on Error Check Type This parameter specifies which type of algorithm to use: •...
Chapter 8 Commands General As mentioned previously, Commands are actually pre-defined transactions that can be stored and re- used. Just like regular transactions, commands consist of frame objects and are representations of the actual serial telegrams exchanged on the serial sub-network. Adding a command to a node actually results in (a) transaction(s) being added according to the directions specified in the command.
Commands 8-2 Pull-Down Menu File This menu features the following entries: • Select Add the currently selected Command to the node. • Exit Exit without adding a command to the node. Command This menu is used to manage the commands in the list: •...
Commands 8-3 The Command Editor General The Command Editor is used to define new commands and edit existing ones. This makes it possible to build a library of commands, which can be stored and re-used at a later stage. Note that the Command Editor is somewhat protocol-dependent in the sense that certain frame objects may not be deleted or altered.
Commands 8-4 Pull-down Menu File This menu features the following entries: • Apply Changes Save changes and exit to the main window. • Exit Exit without saving. Column The functions in this menu alters the structure of the command. • Append Column Add another column to the command.
Commands 8-5 Editing a Command As mentioned previously, the transaction section in the Command Editor represents the actual transac- tions associated with the command. Each column represents a frame object within the transaction. Each column features four rows with the following parameters: •...
Commands 8-6 Example: Specifying a Modbus-RTU Command in Master Mode In the following example, a Modbus-RTU command is created in Master Mode. In Modbus-RTU, a transaction always feature the following parts: • Slave Address (1 byte) • Function Code (1 bytes) •...
Chapter 9 Sub Network Monitor General The Sub Network Monitor is intended to simplify configuration and troubleshooting of the sub net- work. It’s main function is to display the data allocated for sub-network communication and detect if any area has been allocated twice (i.e if a collision has occurred). All configured nodes, and their transactions, are listed in the middle of the screen (B).
Chapter 10 Node Monitor General The Node Monitor can provide valuable information when setting up the communication with the sub- network, by allowing individual commands to be issued manually, and monitoring the response (if ap- plicable). It also provides an overview of the memory used by a particular node. Note: The node monitor has a negative influence on the overall performance of the gateway, i.e.
Node Monitor 10-2 Navigating the Node Monitor A: Pull-down Menu & Toolbar Icons See 10-3 “Pull-Down Menu” and 10-4 “Toolbar Icons” B: Command Section This section holds the currently selected command. The individual frame objects in the com- mand can be edited in a similar way as in the Transaction- and Command Editors. C: Response Section (Master Mode only) This section holds the response to the selected Command.
Node Monitor 10-3 Pull-Down Menu File There is only one entry in this menu: • Exit This will close the Node Monitor. Note however that if the node has been disabled using ‘Stop Node’ (see below), it will not resume data exchange until enabled again using ‘Start node’.
Node Monitor 10-4 Toolbar Icons The toolbar features icons for the most commonly used functions. • Start Node & Stop Node These icons corresponds to the functions in the ‘Node’-menu. See also 10-3 “Node”. • Select Command & Send Command These icons corresponds to the functions in the ‘Command’-menu.
Chapter 11 Data Logger General This feature allows the sub-network traffic to be logged into a buffer for examination. This may provide valuable information when debugging the lowest levels of the sub-network communication. Note that the logger function is part of the gateway itself and is separate from the ABC Config Tool. This means that logging can be performed even if the gateway is physically disconnected from the PC running the ABC Config Tool.
Data Logger 11-2 Configuration By default, the log-buffer can hold 512 bytes of data in each direction. To specify a different size for the buffer, select ‘Options’ in the ‘Tools’-menu. A window with various settings will appear. Select the ‘ABC’- tab, and enter the desired number of buffer entries under ‘Size of logbuffer’...
Chapter 12 Configuration Wizards General When creating a new sub network configuration, the ABC Config Tool provides a choice between start- ing out with a blank configuration, or using a predefined template, a.k.a a wizard. The wizard automatically creates a sub-network configuration based on information supplied by the us- er, i.e the user simply has to “fill in the blanks”.
Configuration Wizards 12-2 Wizard - Modbus RTU Master This wizard can be used to create a Modbus-RTU-based network configuration based on certain infor- mation about the sub-network. The on-line help system explains each configuration step in detail. • Important Notes: Many OEM devices do not fully comply with the Modbus standard.
Chapter 13 Control and Status Registers General The Control- and Status Registers are disabled by default, but can be enabled using the ABC Config Tool (see 4-7 “Status / Control Word”). These registers form an interface for exchanging status information between the sub-network and the fieldbus control system.
Control and Status Registers 13-2 Data Consistency The ‘Data Valid’-bits in the Control- and Status Registers are used to ensure data consistency during start-up and fieldbus off-line/on-line transitions. If the ‘Status / Control Word’-parameter in ABC Config Tool is set to ‘Enabled’, the gateway will wait for the fieldbus control system to set the ‘Data Valid’-bit in the Control Register before it starts exchang- ing data on the sub-network.
Control and Status Registers 13-3 Status Register Contents (Gateway to Control System) General Information As mentioned previously, the Status Register indicates the current status of the gateway towards the fieldbus control system. bit(s) Name Description Send These bits control the handshaking towards the fieldbus control system. (SR_HS_SEND) See also...
Control and Status Registers 13-4 Status Code in Generic Data Mode (This table is valid only in Generic Data Mode). Code Condition Type Data Description 0x00 Invalid Transaction Error Counter The number of invalid transactions (i.e. received transac- Counter Updated tions which doesn’t match any of the Consume-transac- tions defined in the sub-network configuration) has increased.
Control and Status Registers 13-5 Control Register Contents (Control System to Gateway) General Information As mentioned previously, the Control Register can be used to synchronize data exchange and instruct the gateway to perform certain tasks related to the sub-network communication. bit(s) Name Description...
This is done in the Mailbox Editor, see below. (A mailbox message is a HMS specific command structure used for low-level communication with an Anybus-S interface. Consult the Anybus-S Parallel Design Guide and the fieldbus appendix for the de- sired fieldbus for further information.)
Appendix A Connector Pin Assignments Fieldbus Connector (Modbus-RTU) Signal Description Housing Shield Bus cable shield, connected to PE Transmit data (RS-232) Receive data (RS-232) Ground, galvanically isolated +5V, galvanically isolated (female) A-Line (RS-485) B-Line (RS-485) CAN_V+ Opional CAN external power supply Power Connector Description +24V DC...
Connector Pin Assignments A-3 Sub-network Interface General Information The sub-network interface provides for RS232, RS422 and RS485 communications. Depending on the configuration specified in the ABC Config Tool, different signals are activated in the sub-network con- nector. Bias Resistors (RS485 Only) When idle, RS485 enters an indeterminate state, which may cause the serial receivers to pick up noise from the serial lines and interpret this as data.
Connector Pin Assignments A-4 Typical Connection (RS485) Typical Connection (RS422 & 4-Wire RS485) Note: Bias resistors are normally not needed on RS422, but may be required when using 4-wire RS485. Typical Connection (RS232)
Appendix B Technical Specification Mechanical Properties Housing Plastic housing with snap-on connection to DIN-rail, protection class IP20 Dimensions 120 mm x 75 mm x 27 mm, L x W x H (inches: 4.72” x 2.95” x 1.06”; L x W x H) Electrical Characteristics Power Supply Power: 24V ±...
Technical Specification B-2 Regulatory Compliance EMC Compliance (CE) This product is in accordance with the EMC directive 89/336/EEC, with amendments 92/31/EEC and 93/68/EEC through conformance with the following standards: • EN 50082-2 (1993) EN 55011 (1990) Class A • EN 61000-6-2 (1999) EN 61000-4-3 (1996) 10V/m EN 61000-4-6 (1996) 10V/m (all ports) EN 61000-4-2 (1995) ±8kV...
Appendix C Troubleshooting Problem Solution Problem during configuration Upload / Download. • Serial communication failed. Try again The Config Line “led” turns red in the ABC Config Tool. The serial port seems to be available, but it is not possible •...
Page 75
HMS Industrial Networks AB. HMS Industrial Networks AB assumes no responsibility for any errors that may appear in this document. The product and technology described in this document is patent pending in the following countries: USA, Canada, Japan, Belgium, Denmark, Finland, France, Greece, Ireland, Italy, Luxemburg, Monaco, Netherlands, Portugal, Switzerland, Lichtenstein, Spain, United Kingdom, Sweden, Germany and Austria.
Page 76
E-mail: ge-support@hms-networks.com North America Phone: +1-773-404-2271 Toll Free: 888-8-ANYBUS E-mail: us-support@hms-networks.com Japan Phone: +81-45-478-5340 E-mail: jp-support@hms-networks.com Conditions for trademark use Please contact HMS for further information. Related documents Document name Author Document ID Revision AnyBus Communicator User Manual Edk/MaB ABC-UM 0.91...
Page 77
"CR""LF" are used as stop characters. Longitudinal Redundancy Check (LRC) is used for error checking. A complete Modbus ASCII transaction would appear on the physical interface like this: Start Address Function Data Error check Stop “:” “CR” “LF” Figure 3: Modbus ASCII transactions HMS INDUSTRIAL NETWORKS AB...
Page 78
Should less bytes than specified arrive then the response is considered to have an error and a re-transmission of the query will occur if this command is configured for re-transmission. The same handling is done if more data than expected arrives. HMS INDUSTRIAL NETWORKS AB...
Page 79
Response Byte Count 1 byte value where you enter the number of expected data bytes. Data Data object where you enter the length of the received data and the destination address. Table 4: Read Coil Status HMS INDUSTRIAL NETWORKS AB...
Page 80
Data object with 4 bytes. The fieldbus master should enter Register Address and Preset Data in these four bytes. Response Data Data object with 4 bytes. The slave returns Register Address and Preset Data in these 4 bytes. Table 9: Preset Single register HMS INDUSTRIAL NETWORKS AB...
Page 81
The fieldbus master should enter the preset data in these bytes. Response Data Data object with 4 bytes. The slave returns Starting Address and No. of Registers preset in these bytes. Table 14: Preset Multiple Registers HMS INDUSTRIAL NETWORKS AB...
Page 83
AnyBus® Communicator Protocol Appendix - Modbus DOC. ABC-APPENDIX-MB Rev.0.91 2001-08-01 This page is intentionally left blank. HMS INDUSTRIAL NETWORKS AB...
Page 84
_________________________________________________________________________________________ _________________________________________________________________________________________ _________________________________________________________________________________________ _________________________________________________________________________________________ Other comments: _________________________________________________________________________________________ _________________________________________________________________________________________ _________________________________________________________________________________________ _________________________________________________________________________________________ Send your comments to: You may also mail or fax your comments: HMS Industrial Networks AB E-mail: support@hms-networks.com Support Department Fax: +46 (0)35 172909 Pilefeltsgatan 93-95 302 50 Halmstad SWEDEN...
Page 85
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.
Page 86
Basic Operation 2-6 Data Representation on Modbus RTU General The Input- and Output Data areas are mapped to Modbus registers 0... 1279 and Coils 0... 20479. Supported Function Codes The following function codes are supported: Function Code Modbus Function Associated with Area(s) Read Coil Input- and Output Data Area (0x000...
Need help?
Do you have a question about the Anybus Communicator for Modbus RTU and is the answer not in the manual?
Questions and answers