This User guide document provides general
information on the setup of Modbus RS-485
networks and explains how to congure the
communication between EKD/EIM and a system
controller, using the Modbus RTU.
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.
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.
Typ e Group. Group (number) indicates the group the relevant parameter
belongs to. The group number is only of importance for presentation
in AKM PC software.
PNUShort for Parameter NUmber. In Modbus terminology it corresponds to the register number which is also often referred to as the oset. 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.”
The wires should have the following characteristics:
• Characteristic impedance: 120 Ohm +/- 10%;
• Specic 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 suciently wide to permit the maximum length
(1000 m ). AWG 22 is always sucient 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 dierential signals and use another conductor
(for example a second twisted pair) for connecting the ground.
Note!
Modbus
D+ (A+)
D– (B–)
Modbus connections
EKEEKDEIM
D+A+TxD+
D-B-TxD-
Danfoss
Fig. 1 Connection example
GND
GndGnd
1
) Gnd has been omitted from EIM.
Connection of a twisted cable in a 2-wire Modbus system may cause damages.
• GND.
The two wires RS-485-A (D+) and RS-485-B (D-) propagate a dierential 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).
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.
A repeater has no address.
A repeater from the company "Phoenix" can be used:
Danfoss code no. = 084B2240 (type AKA 222).
The controller should be connected according to the bus topology. That means that the communication cable is wired from one controller to the next without branches.
Three conductors
T
001
002
T
n
Three conductors + shiels
T
001
Legend
Shield
Communication cable, 120 Ω impedance
T
120 Ω termination
002
T
n
Danfoss
84B3202.10
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).
Fig Fieldbus with ‘’STUB” 01
Fig Star topology
Do not use a ‘STAR topology’
- 0.0.0.- 0.0.0.
Fig Fieldbus with ‘’STUB” 02
Fig Fieldbus wire
Do not route the eldbus wires close to power
lines or wires leading to heavy loads
Route the wires close to the devices separating the twisted wires only for the shortest possible distance needed for inserting
them into the screw terminals.
When controllers are installed in a cabinet,
internal cable ducting must also comply with
the relevant requirements. Use this cable
ducting when one or more controllers are
installed in a cabinet. The short connections
between controllers must also be of the correct cable types.
On running/bundling the communication wires very close to high power wires or
other sources of electrical noise (frequency
converters etc.) could cause electromagnetic
interference. Therefore, try to separate the
wires from such sources if possible.
Max. 5 cm
Danfoss
84B3207.10
Fig Wires close
• Do not use dierent wire types on a network, even
for short distances.
• Do not route through terminal blocks
- 0.0.0.- 0.0.0.- 0.0.0.
Danfoss
84B3209.10
Cable connection and
termination Modbus
Keep a distance to relays, their cables and other things
emitting electric noises
Connect the RS-485 cable to the dedicated terminals of the EKD controller:
• Negative (B-) polarity wire to terminal 9
• Positive (A+) polarity wire to terminal 10
• Cable screen to terminal 11.
For EIM , connect it as shown in the gure to terminal COM
There must be always two terminations on the network, one at each bus end.
The termination can be installed by connecting a 120 Ohm ± 10 % resistor between D+ and Dfor RS-485.
Here is shown a picture of how a Modbus network is typically terminated. The resistors are in this
picture called LT (Line Termination) and are typically 120 Ohm.
The pull up and pull down are usually built into the master on the Modbus. They are not built in
Danfoss controllers i.e EIM 336, EKD 316.
LT
D
Slave 1Slave 2
Danfoss
Ballanced Pair
R
Master
D
R
D+
D–
Common
R
D
Figure. Two wire bus trophology
5V
Pull up
LT
Pull down
The wires are looped from device to device
D+ is connected to D+
D- is connected to DIn other words, Start Node (with termination resistor) from Node x to Node Y …. to End Node (with
Termination Resistor)in such a way that the polarity of the wires matches with the polarity of the
controller terminals.
Conducters
Note!
Ground connections
Modbus
D+ D-D+ D-D+ D-
Shield (drain) should only be connected in one end, not both ends.
In case of EIM, this is how it is done. The communication line in PWR and COM are internally connected.
RS485 +
Master controller
Danfoss
80G165.10
RS485 -
PWR
EIM slave 1
If two EIMs are connected remember to remove the addressing jumper on one of the EIMs.
There must be a clean ground connection between all devices connected in the network.
In unisolated controller like EKD and EIM, if grounding is required , it should strick followed the
guideline as explained on section 3.1
RS485 +
COM
RS485 -
Danfoss
PWR
EIM slave 2
84B3212.10
COM
R = 120 Ohm
Min. 0.25 Watt
Note!
Be careful when connecting the bus to devises that have non isolated communication interfaces. If
the units are tied to dierent ground potentials, this may lead to communication problems or even to
damage to the units!
Introduction This Chapter explains how to congure the communication between a EKE(/EKD/EIM) and a system
controller, using the Modbus RTU (Remote Terminal Unit) protocol. For detailed information about
Modbus communication, refer to Modbus Application Protocol Specications V1.1b from
www.modbus.org
RS-485 CommunicationThe Electronics Industry Association (EIA) established the RS-485 standard as a guide for developing a multi-drop, bi-directional communication network.
RS-485 systems can be implemented using two-wires or four-wires modes. Danfoss uses the two-
wires system with shield. With the two-wires system, communication is half-duplex (cannot transmit
and receive at the same time).
The Modbus line uses one twisted–pair line – two wires twisted around themselves. This is known as
balanced data transmission. The signal on one wire is ideally the exact opposite of the signal on the
second wire. In other words, if one wire is transmitting a high, the other wire will be transmitting the
low, and vice versa. Since RS-485 is a multipoint communication system, all devices are connected to
the single twisted-pair cable.
The RS-485 system uses master/slave architecture, where each slave device (EKE/EKD/EIM) ) has its
unique address and responds only to requests packets addressed to this device. The requests packets
are generated by the master (system controller), which periodically polls all connected slave devices.
Data travels over the single line in both directions.
A basic RS-485 system requires an I/O driver with dierential outputs and an I/O receiver with differential inputs. Since the signal is transferred via a twisted pair of wires, if noise or interference is
introduced into the line, the voltage dierence (between twisted pair wires) of this interference
is almost zero. Because the input to the receiver is dierential, this interference is eliminated. Dierential inputs also ignore dierent earth potentials of the transmitter and the receiver.
The controllers are set up to communicate on the Modbus network using RTU (Remote Terminal Unit)
mode, with each byte in a message containing consisting of 11 bit. The format for each byte is shown
below.
Start bitDate byteStop ParityStop
Cooling system8-bit binary, hexadecimal 0–9, A–F. Two hexadecimal characters contained
in each 8-bit eld of the message
Bits Per Byte1 start bit
8 data bits, least signicant bit send rst
1 bit for even/odd parity; no bit for no parity
1 stop bit if parity is used; 2 bit if no parity
Error check eldCylindric Redundance Check (CRC)
Danfoss controller follows the standard modbus communication with the following defaults :19200
Baudrate, Even parity and one stop bit.
In EIM/EKD, communication frequency (baudrate) can be one of the following: 9600 baud, 19200
baud and 38400 baud.
The only available xed communication setting in EKD is 8 data bit, EVEN parity and 1 stop bit.
The default unit address is 240 which, can be changed using parameter “03 unit address”. Whereas a
wide range of selection bits are available in EIM modbus , check the product manual for detail.
Modbus RTU message
structure
How to access parameters
A typical message frame is shown below.
StartAddressSunctionDataCRC checkEnd
Start8 bits8 bitsN x 8 bits16 bits end
Example
Slave
Address
Function
Code
H1 Byte
Address
Lo byte
Adress
NumRegs
HiLo
CRC
A50300100002DCEA
The PNU (Parameter Number) is translated from the register address contained in the Modbus read
or write message. For detail check the section ‘Example’
When addressing holding registers on Modbus, the range of valid addresses is 0-65535 (0x0000 to
0xFFFF). In the documentation they are however often described in two dierent ways.
The rst is using register numbers instead of addresses. By this convention the range of valid register
numbers is 1-65536, and the register address 0 is refered to as register number 1. Danfoss follows this
convention so when reading the PNU (Parameter Number) 117, the actual request asks for data from
address 116. So address = PNU – 1.
The second convention denes seperate ranges for dierent types of registers (coils, discrete inputs,
input register and holding registers). The number of available registers were originally limited to
10000 for each type, and in order to easily distinguish between the register types, in manuals etc.,
each type was assigned a part of the numbering range. In this way holding registers were numbered
from 40001 to 50000. The address range is however the same as before so the rst holding register
with register number 40001 still is addressed on Modbus as address 0. So address = register number –
40001. This convention was introduced by the company Modicon and is therefore often referred to as
the Modicon convention.
Note!
Modicon conventionway of addressing is available in EIM 336/316 controller only.
Modbus exception code For a full explanation of the structure of an exception code response, please refer to the Modbus
specication.”
CodeNameMeaning
1
2
3
4
Illegal functionThis function code received in the quer y 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 not congured and
is being asked to return register values.
Illegal data adressThe data address received in the query is not an allowable address for the server (or slave).
More specically, the combination of reference number and transfer length is invalid. For a
controller with 100 registers, a request with oset 96 and length 4 would succeed. a request
with oset 96 and length 5 will will generate exeption 02.
Illegal data valueA value contained in the query data eld is not an allowable value for the 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 specically does NOT mean that a data item submitted for
storage in the register has a value outside the expec tation of the application program since
the Modbus protocol is unaware of the signicance of any particular value of any particular
reg ister.
Slave device failureAn unrecoverable error occurred while the ser ver (or slave) was attemptingto perform the
requested action.
Appendix 4.Following are some of the free modbus tool available on the Internet. Please note that Danfoss doesn't provide any support on any third party modbus
communication tools.
For your own notes
Some non commercial free programs are:
ModbusMat - http://www.ataytugal.com/ModbusMat.htm
Modbus Request Pro:
http://forums.mrplc.com/index.php?app=downloads&showle=465
Please note that there may be restrictions on the use of above stated modbus tools for commercial
applications