Design guide
DATA COMMUNICATION MODBUS RS 485 RTU
For product type - EKD / EIM controllers
This User guide document provides general information on the setup of Modbus RS-485 networks and explains how to configure the communication between EKD/EIM and a system controller, using the Modbus RTU.
Features |
• |
Simplicity |
|
• |
Standard Ethernet |
|
• |
Open protocol |
• Availability on many devices
© Danfoss | DCS (sw) | 2015.10 |
DKRCC.PS.R00.A1.02 | 520H10468 | 1 |
Design guide | Data Communication Modbus RS485 RTU
Part 1 - Hardware network specification |
|
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
3 |
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
3 |
Definitions and abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
3 |
Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
4 |
RS-485 specific . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
5 |
Repeater . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
5 |
Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
6 |
Cable connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
7 |
Termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
8 |
Conductors in a daisy chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
8 |
Ground connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
8 |
Part 2 - Software specification and configuration |
|
Introduction of RS-485 Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
9 |
Modbus RTU message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
10 |
Modbus RTU message structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
10 |
How to access parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
11 |
RS485 bus function codes overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
11 |
EKD examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
11 |
EIM examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
14 |
Appendix 1 EIM Modbus conversion table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
16 |
Appendix 2 EKD Modbus table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
17 |
Appendix 3 Modbus exception code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
18 |
Appendix 4 Modbus tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
18 |
© Danfoss | DCS (sw) | 2015.10 |
DKRCC.PS.R00.A1.02 | 520H10468 | 2 |
Design guide | Data Communication Modbus RS485 RTU
Introduction
References
Definitions and abbreviations
Making a network means to connect devices together with a communication bus. But to make reliable and high performance networks strict rules must be followed.
Modbus specifications, Modbus.org
EIA-485 RS-485 fieldbus specification
RTU |
Remote Terminal Unit |
SW |
Software |
HW |
Hardware |
AWG |
American Wire Gauge |
EKE / EIM / EKD |
Superheat Controller/driver |
Parameter |
The parameter number indicates the number of a given parameter. |
Value |
Indicates the factory settings. |
Type |
Group. Group (number) indicates the group the relevant parameter |
|
belongs to. The group number is only of importance for presentation |
|
in AKM PC software. |
PNU |
Short for Parameter NUmber. In Modbus terminology it corresponds to the |
|
register number which is also often referred to as the offset. The PNU numbers |
|
can have values in the range from 1 to 65535. The corresponding Modbus |
|
address is found by subtracting 1 from the PNU number. For instance PNU |
|
number 117 would correspond to Modbus address 116.” |
© Danfoss | DCS (sw) | 2015.10 |
DKRCC.PS.R00.A1.02 | 520H10468 | 3 |
Design guide | Data Communication Modbus RS485 RTU
Wiring
Wiring characteristics
Wiring types
Recommendations
(Source Modbus.org)
Note!
The wires should have the following characteristics:
•Characteristic impedance: 120 Ohm +/- 10%;
•Specific resistance depending on network length.
•Cable must be with Screen if the bus cable exceeds 3m.
•The cable is connected from controller to controller and no branches are allowed on the cable
•Each shield must be grounded at one side only.
Two types of wires can be used based on required ruggedness:
1.Twisted pair with ground: short leads, no power lines in proximity.
2.Twisted pair + ground and shield: long leads, disturbed environment.
When choosing a transmission line for RS-485, it is necessary to examine the required distance of the cable and the data rate of the system.
An RS485-Modbus must use a balanced pair (for D+-D-) and a third wire (for the Common/Gnd). For RS485-Modbus, Wire Gauge must be chosen sufficiently wide to permit the maximum length (1000 m ). AWG 22 is always sufficient for the Modbus Data.
Category 5 cables may operate for RS485-Modbus, to a maximum length of 600m.
For the balanced pairs used in an RS485-system, a Characteristic Impedance with a value higher than 100 Ohms may be preferred, especially for 19200 and higher baud rates.
Use one twisted pair of conductors for connecting the differential signals and use another conductor (for example a second twisted pair) for connecting the ground.
|
Modbus |
Modbus connections |
|
|
|
D+ (A+) |
EKE |
EKD |
EIM |
|
|
|
|
|
|
D– (B–) |
D+ |
A+ |
TxD+ |
|
GND |
D- |
B- |
TxD- |
84N404.10 |
Gnd |
Gnd |
1) |
|
Danfoss |
|
|
|
|
Fig. 1 |
Connection example |
1) Gnd has been omitted from EIM. |
Connection of a twisted cable in a 2-wire Modbus system may cause damages.
© Danfoss | DCS (sw) | 2015.10 |
DKRCC.PS.R00.A1.02 | 520H10468 | 4 |
Design guide | Data Communication Modbus RS485 RTU
RS-485 specific |
The RS-485 consists of three wires: |
|
|
|||
|
• |
RS-485-A (D+); |
|
|
|
|
|
• |
RS-485-B (D-); |
|
|
|
|
|
• |
GND. |
|
|
|
|
|
The two wires RS-485-A (D+) and RS-485-B (D-) propagate a differential communication signal. |
|||||
|
In addition there is the ground wire for the common mode voltage reference. |
|||||
|
The recommended maximum Modbus cable length between the EKE(/EKD/EIM) and the system |
|||||
|
controller should not exceed 1000 meters (3300 feet). |
|
||||
|
|
Wire length |
|
|
|
|
|
|
|
|
|
|
|
|
|
Length (m) |
|
Max. baudrate |
Min. Wire size |
Suggested types |
|
|
|
|
|
|
|
|
|
1000 |
|
125 K |
AWG22 |
Belden 3106A / 3107A |
|
|
|
|
|
||
RS-485: Controllers |
The maximum number of controllers that can be connected to a Modbus line is 120. |
|||||
|
One repearter must be added for every 32 controllers. If the data communication cable runs through |
|||||
|
an electrically noisy environment which impairs the data signal, one or more repeaters must be |
|||||
|
added to stabilize the signal. |
|
|
|||
Repeater |
A repeater has no address. |
|
|
|
||
|
A repeater from the company "Phoenix" can be used: |
|
||||
|
Danfoss code no. = 084B2240 (type AKA 222). |
|
|
Modbus
Master |
Slaves |
max. 1000 m
<![endif]>Danfoss 84B3210.10
Modbus |
Repeater |
|
|
Slaves |
Slaves |
Master
<![endif]>Danfoss 84B3210.10
© Danfoss | DCS (sw) | 2015.10 |
DKRCC.PS.R00.A1.02 | 520H10468 | 5 |
Design guide | Data Communication Modbus RS485 RTU
Topology |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Standard topology |
|
The controller should be connected according to the bus topology. That means that the communica- |
||||||||||||||
|
|
tion cable is wired from one controller to the next without branches. |
||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Three conductors |
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
T |
002 |
|
|
|
|
T |
|
|
|||||
|
|
|
|
|
|
|
|
|||||||||
|
|
001 |
|
|
|
|
n |
|
|
|||||||
|
|
|
Three conductors + shiels |
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
T |
|
002 |
|
|
|
|
T |
|
|
||||
|
|
|
|
|
|
|
|
|||||||||
|
|
001 |
|
|
|
|
n |
|
|
|||||||
|
|
Legend |
|
|
<![if ! IE]> <![endif]>Danfoss 84B3202.10 |
|
|
|||||||||
|
|
|
|
|
|
Shield |
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
|
|
|
|
|
Communication cable, 120 impedance |
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
|
|
T |
|
|
|
|
|
|
|||||||
|
|
|
120 termination |
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Recommendations |
|
Avoid making stubs on the line. |
|
|
|
|
|
|
||||||||
|
|
If stubs are present in the network they should be kept as short as possible |
(<0.3 m at 1 Mbit; <3 m at 50 kbit).
<![if ! IE]> <![endif]>Danfoss 84B3203.10 |
Field BUS |
|
Stub |
||
|
|
<![if ! IE]> <![endif]>Danfoss 84B3204.10 |
- 0.0.0. |
- 0.0.0. |
Fig Fieldbus with ‘’STUB” 01 |
Fig Fieldbus with ‘’STUB” 02 |
Field BUS |
Field BUS |
|
<![if ! IE]> <![endif]>Danfoss 84B3205.10 |
Fig Star topology
Do not use a ‘STAR topology’
Min 10-15 cm |
<![if ! IE]> <![endif]>Danfoss 84B3206.10 |
Fig Fieldbus wire
Do not route the fieldbus wires close to power lines or wires leading to heavy loads
© Danfoss | DCS (sw) | 2015.10 |
DKRCC.PS.R00.A1.02 | 520H10468 | 6 |