The information in this document is for informational purposes only. Please inform HMS Industrial Networks of any
inaccuracies or omissions found in this document. HMS Industrial Networks disclaims any responsibility or liability
for any errors that may appear in this document.
HMS Industrial Networks reserves the right to modify its products in line with its policy of continuous product
development. The information in this document shall therefore not be construed as a commitment on the part of
HMS Industrial Networks and is subject to change without notice. HMS Industrial Networks makes no commitment
to update or keep current the information in this document.
The data, examples and illustrations found in this document are included for illustrative purposes and are only
intended to help improve understanding of the functionality and handling of the product. In view of the wide range
of possible applications of the product, and because of the many variables and requirements associated with any
particular implementation, HMS Industrial Networks cannot assume responsibility or liability for actual use based on
the data, examples or illustrations included in this document nor for any damages incurred during installation of the
product. Those responsible for the use of the product must acquire sufficient knowledge in order to ensure that the
product is used correctly in their specific application and that the application meets all performance and safety
requirements including any applicable laws, regulations, codes and standards. Further, HMS Industrial Networks will
under no circumstances assume liability or responsibility for any problems that may arise as a result from the use of
undocumented features or functional side effects found outside the documented scope of the product. The effects
caused by any direct or indirect use of such aspects of the product are undefined and may include e.g. compatibility
issues and stability issues.
This document is intended to provide a good understanding of the functionality offered by the
Anybus CompactCom B40 Modbus Serial.
The reader of this document is expected to be familiar with high level software design and
communication systems in general. The information in this user manual should normally be
sufficient to implement a design. However if advanced network specific functionality is to be
used, in-depth knowledge of network networking internals and/or information from the official
network specifications may be required. In such cases, the persons responsible for the
implementation of this product should either obtain the network specification to gain sufficient
knowledge or limit their implementation in such a way that this is not necessary.
For additional information, please visit the support website at www.anybus.com/support.
1.2Document History
Version
1.02019-04-30
1.12019-05-16
Date
1.3Document Conventions
Ordered lists are used for instructions that must be carried out in sequence:
1.First do this
2.Then do this
Unordered (bulleted) lists are used for:
•Itemized information
•Instructions that can be carried out in any order
...and for action-result type instructions:
►This action...
→leads to this result
Bold typeface indicates interactive parts such as connectors and switches on the hardware, or
menus and buttons in a graphical user interface.
Monospaced text is used to indicate program code and other
kinds of data input/output such as configuration scripts.
Description
First release
Updated for PROFINET release
This is a cross-reference within this document: Document Conventions, p. 3
This is an external link (URL): www.hms-networks.com
This is additional information which may facilitate installation and/or operation.
This instruction must be followed to avoid a risk of reduced functionality and/or damage
to the equipment, or to avoid a network security risk.
Anybus®CompactCom™B40 Modbus Serial User Manual
SCM-1202-130 1.1 en-US
Preface4 (48)
Caution
This instruction must be followed to avoid a risk of personal injury.
WARNING
This instruction must be followed to avoid a risk of death or serious injury.
1.4Document Specific Conventions
•The terms “Anybus” or “module” refers to the Anybus CompactCom module.
•The terms “host” or “host application” refer to the device that hosts the Anybus.
•Hexadecimal values are written in the format NNNNh or 0xNNNN, where NNNN is the
hexadecimal value.
•A byte always consists of 8 bits.
•All dimensions in this document have a tolerance of ±0.10 mm unless otherwise stated.
•Outputs are TTL compliant unless otherwise stated.
•Signals which are “pulled to GND” are connected to GND via a resistor.
•Signals which are “pulled to 3V3” are connected to 3V3 via a resistor.
•Signals which are “tied to GND” are directly connected to GND,
•Signals which are “tied to 3V3” are directly connected to 3V3.
1.4.1Pin Types
The pin types of the connectors are defined in the table below. The pin type may be different
depending on which mode is used.
Pin type
IInput
OOutput
I/OInput/Output (bidirectional)
ODOpen Drain
Power
Definition
Pin connected directly to module power supply, GND or 3V3
1.5Trademark Information
Anybus®is a registered trademark of HMS Industrial Networks.
EtherNet/IP is a trademark of ODVA, Inc.
All other trademarks are the property of their respective holders.
Anybus®CompactCom™B40 Modbus Serial User Manual
SCM-1202-130 1.1 en-US
About the Anybus CompactCom B40 Modbus Serial5 (48)
2About the Anybus CompactCom B40 Modbus Serial
2.1General Information
The Anybus CompactCom B40 Modbus Serial is a communication solution for simple industrial
field devices. The host application communicates with the product using the Modbus RTU
protocol. The Anybus CompactCom B40 Modbus Serial then communicates the data to the
network. Typical applications are basic level I/O blocks, temperature controllers, measuring
devices, and sensors.
The Anybus CompactCom B40 Modbus Serial software interface is designed to be network
protocol independent, making it possible to support several networking systems using the same
application software code/driver.
The Anybus CompactCom B40 Modbus Serial share footprint and electrical interface with the
other members of the product family, independent of fieldbus or network. The host application
connector provides an interface between the host application (Modbus RTU) and the Anybus
CompactCom, while the network connector provides access to the chosen network. The Anybus
CompactCom acts as a Modbus RTU slave on the host application side.
The Anybus CompactCom 40 family offers a wide range of functionality. For advanced products and
applications, we recommend the standard Anybus CompactCom 40.
For general information about other products using the Anybus CompactCom 40 platform,
consult www.anybus.com/support.
This a class A product. In a domestic environment, this product may cause radio
interference in which case the user may be required to take adequate measures.
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.
Anybus®CompactCom™B40 Modbus Serial User Manual
SCM-1202-130 1.1 en-US
About the Anybus CompactCom B40 Modbus Serial6 (48)
Host processor
with applicaon
Anybus
CompactCom
Modbus
Serial
Process DataData
Industrial Network
Modbus RTU
2.2Features
•Simple implementation and great connectivity flexibility
•Serial Communications Interface (UART), that can be connected to almost any standard
microcontroller
•Standard Modbus RTU serial protocol
•Galvanic isolation integrated
•Low power consumption
•Control pins for status indications according to each network standard
•Separate network connector board available
•Precompliance tested for network conformance (where applicable).
•Precompliance tested for CE & UL. Contact HMS Industrial Networks for further information.
All Anybus CompactCom 40 Modbus Serial will be precertified for network conformance.
This is done to ensure that the final product can be certified, but it does not necessarily
mean that the final product does not require recertification. Contact HMS Industrial
Networks for further information.
2.3Overview
The picture below shows the data flow in the Anybus CompactCom B40 Modbus Serial. The
application sets up the Modbus RTU communication, and the Anybus CompactCom maps the
process data to the industrial network/fieldbus.
Fig. 1
2.4How to Use this Manual
This manual includes the following:
1.The implemented Modbus RTU application interface and how to use it (host application).
2.Instructions on how to indesign the Anybus CompactCom in your product (hardware design).
Network specific configuration, performed from the network, is described in the Anybus
CompactCom 40 Modbus Serial Network Guides.
Anybus®CompactCom™B40 Modbus Serial User Manual
SCM-1202-130 1.1 en-US
About the Anybus CompactCom B40 Modbus Serial7 (48)
2.4.1Host Application
The Modbus application interface is set up and configured in the same way, independent of
which network the data will be sent to/read from. This process, including an example is
described in Modbus Application Interface, p. 8.
2.4.2Hardware Design
•When creating your hardware design, refer to Hardware Design, p. 13 for descriptions of
connectors etc. Please note that some inputs should be strapped to ensure correct behavior.
•Dimensions and other mechanical information is presented in Mechanical Specification, p.
33.
•Technical specifications, like temperature limits and electrical specifications, are given in
Technical Specification, p. 31.
Anybus®CompactCom™B40 Modbus Serial User Manual
SCM-1202-130 1.1 en-US
Modbus Application Interface8 (48)
3Modbus Application Interface
The host application interface of the product consists of a Modbus Serial interface, which
implements a reduced set of registers and commands. The Anybus CompactCom acts as a
Modbus RTU slave.
3.1How To Set Up and Initialize the Modbus Communication
To set up and initialize the communication between the host application and the network, follow
the steps below. Steps 2 - 6 includes examples of what the Modbus messages can look like.
1.Set Modbus address, baud rate, stop bits, and parity according to Communication Settings,
p. 19.
See Hardware Design, p. 13 for information on how to connect the corresponding pins.
2.Write initial values to the Write Process Data area (registers 0x0000-). (Optional)
Example – Using the Modbus function Write Multiple Holding Registers to set
initial values for 10 Write Process Data registers (20 bytes) to CompactCom with address 5.
AddressFunction Code
0x05160x00001020
DataCRC
Starting
Address
Quantity of
Registers
Byte Count
Register
Values
20 bytes of
data
CRC-16-ANSI
3.Write switch settings to register 0x5200-0x5201, “Application switch 1” and “Application
switch 2”. Optional for networks that do not require these settings.
Example – Using the Modbus function Write Single Holding Register to set the
Node Address for a network using a node address for identification. NOTE: Node address 7
will be used on the Industrial Network (e.g. PROFIBUS).
AddressFunction Code
0x0560x52007CRC-16-ANSI
DataCRC
Register AddressRegister Value
4.Set Offline Action for Read Process Data in register 0x5101 (Clear or No action). (Oprtional)
Example – Using the Modbus function Write Single Holding Register to configure
Clear as the Offline Action for Read Process Data (all data will be 0 if the network is
offline).
AddressFunction Code
0x0560x51010CRC-16-ANSI
DataCRC
Register AddressRegister Value
5.Set the size of the Write Process Data area to register 0x5102. Data type (byte or word) is
configured with register 0x5100.
Example – Using the Modbus function Write Single Holding Register to configure
Write Process Data size 20 bytes. Assuming default value of register 0x5100, i.e. data type is
UINT8.
AddressFunction Code
0x0560x510220CRC-16-ANSI
DataCRC
Register AddressRegister Value
®
Anybus
CompactCom™B40 Modbus Serial User Manual
SCM-1202-130 1.1 en-US
Modbus Application Interface9 (48)
6.Set the size of the Read Process Data area to register 0x5103. Data type (byte or word) is
configured with register 0x5100.
Example – Using the Modbus function Write Single Holding Register to configure
Read Process Data size 18 bytes. Assuming default value of register 0x5100, i.e. data type is
UINT8.
AddressFunction Code
0x0560x510318CRC-16-ANSI
DataCRC
Register AddressRegister Value
7.The CompactCom is now ready to start communicating with the network master with the
configured settings. Start cyclical read/write of process data to register 0x0000- and 0x1000-.
Also consider to cyclically monitor the values of register 0x0FFD (Anybus Switch Status),
0x0FFE (LED status), and 0x0FFF (Anybus Status).
If a reset request is indicated in the Anybus Status register, the host application must reset
the CompactCom, and start the initialization sequence from step 1. See RESET (Reset Input),
p. 18.
Example – The Modbus function Read/Write Multiple Registers allows you to
both read and write registers with one command. In this example the status registers and
the read process data registers are read, at the same time as the write process data
registers are written.
Command:
AddressFunction Code
0x05230x0FFD120x00001020
DataCRC
Read
Starting
Address
Quantity
to Read
Write
Starting
Address
Quantity
to Write
Write
Byte
Count
Write
Reg
Values
20 bytes
of data
CRC-16-ANSI
Response:
AddressFunction Code
0x052324
DataCRC
Read Byte CountRead Reg Values
24 bytes of data
CRC-16-ANSI
The Anybus CompactCom will stay in state SETUP until values have been written to 0x5102 and
0x5103 (items no. 5 and 6 in the list above). The Anybus CompactCom will then change states to
WAIT_PROCESS, and the registers 0x5100-0x5103 will be read-only.
See also ..
•The Anybus State Machine, p. 42
Anybus®CompactCom™B40 Modbus Serial User Manual
SCM-1202-130 1.1 en-US
Modbus Application Interface10 (48)
3.2Supported Modbus Commands
#Name
3
4
6
16
23
70
Read multiple registersAll mapped to the same register space.
•Modbus writes, addressing undefined registers, do not return any error.
•Modbus writes containing invalid data to registers do not return any error.
•Modbus writes, addressing read-only registers, do not return any error.
3.2.2Endianess
•If 8-bit data types are mapped to Modbus registers, the first byte is mapped to LSB and the
second byte is mapped to MSB of the Modbus register.
3.2.3Anybus Command (Modbus Function Code 70)
This command can be used to send an Anybus CompactCom message. Allowed content depends
on which network is connected to the Anybus CompactCom. The data field part of the telegram
is composed by concatenating the content for each configuration option to include. Note that
the total amount of configuration options to set is limited to 244 bytes of data. Please refer to
the applicable network appendix for more information.
The content of the telegram will be stored and used at the next startup. It is not necessary to
send this telegram at each startup. Instead it is recommended to send it once to customize the
Anybus CompactCom behavior.
Request format:
012
345678910–n
AddressFunctionSizeData FieldCRC
(Address)
70661101 70
The content of the data field depends on which network is connected. Please refer to the applicable
network appendix for details.
Size of
Data
Field
0
0-244 bytes of
data,
configuring the
Anybus
CompactCom
behavior
(n+1)(n+2)
(CRC)
Response format
012345678910–11
AddressFunction
(Address)
®
Anybus
CompactCom™B40 Modbus Serial User Manual
70211017000
Size
CRC
(CRC)
SCM-1202-130 1.1 en-US
Modbus Application Interface11 (48)
3.3Modbus Register Map
The Modbus register space is designed to allow easy and efficient communication using a single
cyclic read/write Modbus command.
Register#
0x0000 -
0x0FFD
0x0FFELED status
0x0FFF
0x1000 -
0x5003
NameAccess
Write process data
Anybus Switch statusRead onlyValue of INPUT1 and INPUT2 pins.
Anybus status
Read process dataRead onlyArea is updated with new data from Network ONLY when address
Module typeRead onlyAnybus CompactCom 40 (0x0403)
Description
Read/
Write
Read onlyBit field holding the current state of the network status LEDs as
Read/
Write
When the last byte of mapped process data is written, data is sent
to the network for consistency reasons.
INPUT1:
INPUT2:
follows:
Bit:
b0:
b1:
b2:
b3:
b4:
b5:
b6:
b7:
b8 - b15
Anybus status register with two additional bits, Reset and Set
Default added.
Bit(s)
0 - 2
3SUP
4 -13
14
15Reset
0x1000 is read.
LSB
MSB
Contents:
LED1A status (0=OFF, 1=ON)
LED1B status (0=OFF, 1=ON)
LED2A status (0=OFF, 1=ON)
LED2B status (0=OFF, 1=ON)
LED3A status (0=OFF, 1=ON)
LED3B status (0=OFF, 1=ON)
LED4A status (0=OFF, 1=ON)
LED4B status (0=OFF, 1=ON)
(reserved)
Description
Anybus state (See The Anybus State Machine, p. 42)
0: Module is not supervised
1: Module is supervised by another network device
The SUP bit indicates the overall status of the network
communication. For example, on CIP, this bit indicates
that the master has a connection towards the module.
Exactly how this functionality should be handled, the
offered level of security, and how to correctly activate
it is network specific and often depends on external
circumstances, e.g. configuration of the network as
well as other network devices. Whether use of the
SUP-bit is appropriate must therefore be decided for
each specific application and network.
(reserved)
Set Default
0: No action
1: Application is requested to set “factory default” to
all parameters/settings. Application shall acknowledge
this by writing 1 to this bit to clear it.
0: No action
1: Application is requested to reset the Anybus
No exception
Application timeout
Invalid device address
Invalid communication settings
Major unrecoverable application event
Waiting for application reset
Invalid process data configuration
Invalid application response
NVS memory checksum error
Functional Safety Module error
Insufficient application implementation
Missing serial number
File system is corrupt
Data type of the parameters that are mapped to Write and Read
process data.
UINT8:
UINT16:
0x0004 (Default)
0x0005
R/W in SETUP state.
Read only in other states.
Action taken when the Anybus CompactCom is not in PROCESS_
ACTIVE state.
0x0000:
0x0001:
Clear “Read Process data area”
No action (Default)
R/W in SETUP state.
Read only in other states.
Number of parameters mapped to Write process data.
If the value written is bigger than module can handle, the value will
automatically be adjusted to max possible value (according to
network) after the SETUP state.
R/W in SETUP state. Read only in other states.
Number of parameters mapped to Read process data.
If the value written is bigger than module can handle, the value will
automatically be adjusted to max possible value (according to
network) after the SETUP state.
R/W in SETUP state. Read only in other states.
This register can be used for the node address.
Value written to this register may be defined by DIP switches on
the application. See Network Configuration Switches, p. 28.
This register can be used for defining stop bits and baud rate.
Value written to this register may be defined by DIP switches on
the application. See Network Configuration Switches, p. 28.
®
Anybus
CompactCom™B40 Modbus Serial User Manual
SCM-1202-130 1.1 en-US
Hardware Design13 (48)
Pin 1
Application
interface
Pin 1
Network
interface
Outline of brick
Top view
4Hardware Design
Information needed to design the hardware for a product embedding the Anybus CompactCom
B40 Modbus Serialis presented later in this section. This includes mechanical and electrical
specification, connector pinnings etc. An example on how to design a network interface is also
included. An optional connector board is available.
•For the host application and network interfaces, see Hardware Design, p. 13
•For further implementation guidelines see Implementation Guidelines, p. 44
•For brick dimensions, footprint dimensions and height restrictions, see Mechanical
Specification, p. 33
•For electrical characteristics and other technical specifications, see Technical Specification, p.
31
•The optional connector board is described in Network Connector Boards (Optional), p. 35
•How to mount the Anybus CompactCom on the host application PCB is described in
Assembly, p. 37
•A typical example of how to design the network interface is offered in Network Interface
Examples, p. 47
4.1Host Application Interface
The host application connector provides an interface between the host application and the
Anybus CompactCom B40 Modbus Serial.
Anybus®CompactCom™B40 Modbus Serial User Manual
Fig. 2
The connector is implemented by a standard 1.27 mm 56 pin header surface mounted to the
bottom side of the PCB.
SCM-1202-130 1.1 en-US
Hardware Design14 (48)
1
2
56
55
Top view
GND 2 1 3V3
INPUT1_0 4
3 RESET
INPUT1_2 6
5 INPUT1_1
GND 8
7 INPUT1_3
INPUT1_5 10
9 INPUT1_4
INPUT1_7 12
11 INPUT1_6
GND 14
13
16
15
GND 18
17
20
19
INPUT2_6 22
21 INPUT2_7
GND 24
23 INPUT2_5
INPUT2_3 26
25 INPUT2_4
GND 28
27 INPUT2_2
MD0 30
29 INPUT2_1
OM0 32
31 INPUT2_0
GND 34
33 OM1
36
35 OM2
DE 38
37
GND 40
39
42
41
GND 44
43
46
45
48
47
GND 50
49
TX/OM3 52
51 RX
MI0 54
53 MI1
GND 56
55 3V3
Fig. 3
The picture shows the pinning of the mating connector on the host application as seen from the
top.
Anybus®CompactCom™B40 Modbus Serial User Manual
Fig. 4
See Pin Overview, p. 15 for information on how each pin is used.
SCM-1202-130 1.1 en-US
Loading...
+ 37 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.