Danfoss RS 485 RTU Design guide

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 congure the communication between EKD/EIM and a system controller, using the Modbus RTU.
Features • Simplicity
• Standard Ethernet
• Open protocol
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 1
Design guide | Data Communication Modbus RS485 RTU
Part 1 - Hardware network specication
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Denitions and abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
RS-485 specic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Repeater . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Cable connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Conductors in a daisy chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Ground connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Part 2 - Software specication and conguration
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
Denitions 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 specications, Modbus.org EIA-485 RS-485 eldbus specication
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. PNU Short for Parameter NUmber. In Modbus terminology it corresponds to the register number which is also often referred to as the oset. 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
84N404.10
Design guide | Data Communication Modbus RS485 RTU
Wiring
Wiring characteristics
Wiring types
Recommendations (Source Modbus.org)
The wires should have the following characteristics:
• Characteristic impedance: 120 Ohm +/- 10%;
• Specic 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 suciently wide to permit the maximum length (1000 m ). AWG 22 is always sucient 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 dierential signals and use another conductor (for example a second twisted pair) for connecting the ground.
Note!
Modbus
D+ (A+) D– (B–)
Modbus connections
EKE EKD EIM
D+ A+ TxD+
D- B- TxD-
Danfoss
Fig. 1 Connection example
GND
Gnd Gnd
1
) Gnd has been omitted from EIM.
Connection of a twisted cable in a 2-wire Modbus system may cause damages.
1
)
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 4
Danfoss
84B3210.10
Repeater
Design guide | Data Communication Modbus RS485 RTU
RS-485 specic
RS-485: Controllers
Repeater
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 dierential 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
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).
Master
Modbus
Master
Modbus
Slaves
max. 1000 m
Slaves Slaves
Danfoss
84B3210.10
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 5
Min 10-15 cm
Danfoss
84B3206.10
Field BUSField BUS
Danfoss
84B3205.10
Field BUS
Stub
Danfoss
84B3203.10
Design guide | Data Communication Modbus RS485 RTU
Topology
Standard topology
Recommendations
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
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
Danfoss
84B3204.10
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 6
Danfoss
80G168.10
Danfoss84B3208.1
Design guide | Data Communication Modbus RS485 RTU
Cabinet mounting
Note!
Route the wires close to the devices sepa­rating the twisted wires only for the short­est 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 cor­rect cable types.
On running/bundling the communica­tion 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 dierent 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
EIM
-
TxD
TxD+
D
PWR
COM
0
Modbus to master controller
POS4S2
ADR
EEV
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 7
80G169.10
Design guide | Data Communication Modbus RS485 RTU
Termination
Conductors in a daisy chain
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 D­for 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 D­In 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 dierent ground potentials, this may lead to communication problems or even to damage to the units!
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 8
Design guide | Data Communication Modbus RS485 RTU
Part 2 Software specication and conguration
Introduction This Chapter explains how to congure 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 Specications V1.1b from www.modbus.org
RS-485 Communication The 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 dierential outputs and an I/O receiver with dif­ferential inputs. Since the signal is transferred via a twisted pair of wires, if noise or interference is introduced into the line, the voltage dierence (between twisted pair wires) of this interference is almost zero. Because the input to the receiver is dierential, this interference is eliminated. Dier­ential inputs also ignore dierent earth potentials of the transmitter and the receiver.
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 9
Design guide | Data Communication Modbus RS485 RTU
Modbus RTU message
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 bit Date byte Stop Parity Stop
Cooling system 8-bit binary, hexadecimal 0–9, A–F. Two hexadecimal characters contained
in each 8-bit eld of the message
Bits Per Byte 1 start bit
8 data bits, least signicant 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 eld Cylindric 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.
Start Address Sunction Data CRC check End
Start 8 bits 8 bits N x 8 bits 16 bits end
Example
Slave Address
Function Code
H1 Byte Address
Lo byte Adress
NumRegs
Hi Lo
CRC
A5 03 00 10 00 02 DC EA
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 dierent 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 denes seperate ranges for dierent 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.
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 10
Design guide | Data Communication Modbus RS485 RTU
RS485 bus function codes overview
Example The following examples illustrate various Modbus RTU commands in EKD
Note!
Action Description
Setup Switching the Main switch OFF/ON.
1 = Set “r12 Main switch ” PNU 117 to 0 (using address 240). 2 = Set “r12 Main switch ” PNU 117 to 1 (using address 240).
Result Verify that the EKD respond the Modbus master with an accept message.
Conclusion Writing r12 (PNU 117) to 0 [F0][06][00][74][00][00][DC][F1] [F0][06][00][74][00][00][DC][F1] – Slave acknowledges
Writing r12 (PNU 117) to 1 [F0][06][00][74][00][01][1D][31] [F0][06][00][74][00][01][1D][31] – Slave acknowledges
EKD/EIM RS485 Function code Comment
Read PNU 0x03 Read holding registers
Write PNU 0x06 Write Single PNU/holding register only
1. Requests are shown in blue and the hexadecimal representation of the data on the Modbus .
2. Responses are shown in green. The text in green is an interpretation of the response.
Action Description
Setup Setting up the Superheat maximum parameter n09
1 = Write “r12 Main switch ” PNU 117; Set it to 0. 2 = Write “n09 Max. SH “ PNU 3015; Set to 60. 3 = Read “n09 Max. SH ” PNU 3015; veryfying step 2.
Result Reading n09 max. SH i.e. PNU 3015 must be 60.
Conclusion Write r12 (PNU 117) to 0 [F0][06][00][74][00][00][DC][F1] [F0][06][00][74][00][00][DC][F1] – Slave acknowledges
Reading PNU 3015 [F0][03][0B][C6][00][01][73][32] [F0][03][02][00][64][C4][7A] – Slave responds 100
Writing PNU 3015 to 60 [F0][06][0B][C6][00][3C][7E][E3] [F0][06][0B][C6][00][3C][7E][E3] – Slave acknowledges
Reading PNU 3015 again [F0][03][0B][C6][00][01][73][32] [F0][03][02][00][3C][C5][80] – Slave responds 60
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 11
Design guide | Data Communication Modbus RS485 RTU
Example The following examples illustrate various Modbus RTU commands in EKD
Note!
Action Description
Setup Changing the device address
1 = Read “o03 Unit addr. ” PNU 2008 using address: 240. 2 = Set “o03 Unit addr. “ PNU 2008 to 239
Result 1 = Verify that it’s possible to use address 240. 2 = Verify that it’s possible to use address 239.
Conclusion Reading PNU 2008 from ID 240
[F0][03][07][D7][00][01][20][67]
[F0][03][02][00][F0][C5][D5] – Slave responds 240
Setting PNU 2008 to 239 on ID 240
[F0][06][07][D7][00][EF][6C][2B]
[F0][06][07][D7][00][EF][6C][2B] – Slave acknowledges
Reading PNU 2008 from ID 240
[F0][03][07][D7][00][01][20][67]
No response since the address is changed
Reading PNU 2008 from ID 239
[EF][03][07][D7][00][01][22][08]
[EF][03][02][00][EF][11][DF] – Slave responds 239
1. Requests are shown in blue and the hexadecimal representation of the data on the Modbus .
2. Responses are shown in green. The text in green is an interpretation of the response.
Action Description
Setup Reading Evaporator Pressure
1 = Read “u25 EvapPress Pe ” PNU 2543 using Modbus function code 0x03. 2 = Read “u25 EvapPress Pe ” PNU 2543 using Modbus function code 0x04.
Result Note: Read 0x04 function is only available in some selective danfoss controllers. 1 & 2 = Both Modbus commands responds with the same answer.
Conclusion Reading PNU 2543 with function code 03
[F0][03][09][EE][00][01][F2][82]
[F0][03][02][00][87][85][F3] – Slave responds 135
Reading PNU 2543 with function code 04
[F0][04][09][EE][00][01][47][42]
[F0][04][02][00][87][84][87] – Slave responds 135
Action Description
Setup Setting the controller in Manual mode
Set “o45 Manual OD%” PNU 2064 to 45.
Result Verify that the message and responds are: Message: 0xA5 0x06 0x08 0x0F 0x00 0x2D 0x62 0x90 Responds: 0xA5 0x06 0x08 0x0F 0x00 0x2D 0x62 0x90
Conclusion Setting PNU 2064 to 45 [A5][06][08][0F][00][2D][62][90] [A5][06][08][0F][00][2D][62][90] – Slave acknowledges
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 12
Design guide | Data Communication Modbus RS485 RTU
Example The following examples illustrate various Modbus RTU commands in EKD
Note!
Action Description
Setup Examples explaining some illegal addressing and request with 0x03 (Read function) and 0x06 (Write).
Result The device must respond with illegal address or no response.
Conclusion Read 2 register starting from PNU 2008 from slave 240
[F0][03][07][D7][00][02][60][66]
[F0][83][02][91][02] - slave responds illegal address because 2009 is not dened
Read o03 unit address (PNU 2008) from slave 240 with wrong CRC
[F0][03][07][D7][00][01][20][68]
no response
Read PNU 2009 (undened) from slave 240
[F0][03][07][D8][00][01][10][64]
[F0][83][02][91][02] - slave responds illegal address because 2009 is not dened
Write 2 to r12 main switch (PNU 117) on slave 240 [F0][06][00][74][00][02][5D][30] [F0][86][03][53][92] - slave responds illegal data
Write 1 to PNU 118 (undened) on slave 240 [F0][06][00][75][00][01][4C][F1] [F0][86][02][92][52] - slave responds illegal address
1. Requests are shown in blue and the hexadecimal representation of the data on the Modbus .
2. Responses are shown in green. The text in green is an interpretation of the response.
Write 1 to r12 main switch (PNU 117) on slave 240 with wrong CRC [F0][06][00][74][00][01][1D][31] no response
Use function code 5 (undened) [F0][05][00][74][00][01][59][31] [F0][85][01][D2][A3] - slave responds illegal function
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 13
Design guide | Data Communication Modbus RS485 RTU
Example The following examples illustrate various Modbus RTU commands in EIM
Note!
Action Description
Setup
Conclusion
Action Description
Setup
Conclusion
1. Requests are shown in blue and the hexadecimal representation of the data on the Modbus .
2. Responses are shown in green. The text in green is an interpretation of the response.
Switching the Main switch OFF/ON (using address 165).
Reading r12 main switch (PNU 117)
[A5][03][00][74][00][01][DD][34]
[A5][03][02][00][00][C9][9D] – Slave responds 1
Setting r12 main switch (PNU 117) to 1
[A5][06][00][74][00][01][11][34]
[A5][06][00][74][00][01][11][34] - Slave acknowledges
Setting r12 main switch (PNU 117) to 0
[A5][06][00][74][00][00][D0][F4]
[A5][06][00][74][00][00][D0][F4] – Slave responds 0
Setting up the Superheat Max. SH value on address 165
Reading PNU 3015
[A5][03][0B][C6][00][01][7F][37]
[A5][03][02][00][A0][C9][E5] – Slave responds
Setting PNU 3015 to 100
[A5][06][0B][C6][00][64][73][1C]
[A5][06][0B][C6][00][64][73][1C] – Slave acknowledges
Reading PNU 3015 again
[A5][03][0B][C6][00][01][7F][37]
[A5][03][02][00][64][C8][76] – Slave responds 100
Action Description
Setup
Conclusion
Changing EIM addressing from PNU to Modicon addressing
Reading PNU 64200 (Modbus translation table)
[A5][03][FA][C7][00][01][1C][0B]
[A5][03][02][00][00][C9][9D] – Slave responds 0 (use PNU)
Setting PNU 64200 to 1
[A5][06][FA][C7][00][01][D0][0B]
[A5][06][FA][C7][00][01][D0][0B] – Slave acknowledges
Reading PNU 64200 again
[A5][03][FA][C7][00][01][1C][0B]
[A5][03][02][00][01][08][5D] – Slave responds 1
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 14
Design guide | Data Communication Modbus RS485 RTU
Example The following examples illustrate various Modbus RTU commands in EIM
Note!
Action Description
Setup
Conclusion
Action Description
1. Requests are shown in blue and the hexadecimal representation of the data on the Modbus .
2. Responses are shown in green. The text in green is an interpretation of the response.
Switching the Main switch OFF/ON with Modicon addressing
Setting Modicon 40011 (r12 main switch) to 0
[A5][06][00][0A][00][00][B0][EC]
[A5][06][00][0A][00][00][B0][EC] – Slave acknowledges
Reading Modicon 40011 (r12 main switch)
[A5][03][00][0A][00][01][BD][2C]
[A5][03][02][00][00][C9][9D] – Slave responds 0
Setting Modicon 40011 (r12 main switch) to 1
[A5][06][00][0A][00][01][71][2C]
[A5][06][00][0A][00][01][71][2C] – Slave acknowledges
Reading Modicon 40011 (r12 main switch) again
[A5][03][00][0A][00][01][BD][2C]
[A5][03][02][00][01][08][5D] – Slave responds 1
Setup
Conclusion
Reading the registers with Modicon addressing.
Reading Modicon 40001 to 4004
[A5][03][00][00][00][04][5D][2D]
[A5][03][08][FC][E0][07][08][05][DC][00][00][4D][7A] – Slave responds -800, 1800, 1500, 0
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 15
Design guide | Data Communication Modbus RS485 RTU
Appendix.1
EIM Modbus Conversion table
Parameter PNU Modicon
address
u25 EvapPress Pe 2543 40001
u20 S2 temp. 2537 40002
u16 S4 air temp. 2531 40003
u27 Temp. S3 2545 40004
--- Ctrl Status 3100 40005
u26 EvapTemp Te 2544 40006
u22 SuperheatRef 2535 40007
u21 Superheat 2536 40008
u24 Opening % 2542 40009
--- LOC Alarm 50006 40010
r12 Main switch 117 40 011
--- Te Reference 3117 40012
--- Comp Speed 3120 40 013
ext EvapPress P0 2643 4 0 014
ext S2 temp 2644 40015
--- Di MOP 3121 40016
r09 Adjust S2 113 40017
o45 Manual OD% 2064 40018
n09 Max SH 3015 4 0 019
n10 Min SH 3021 40020
n22 SH close 3027 40021
--- Tn SH 3103 40022
n11 MOP 3013 40023
--- SH Low 3105 40024
--- SH High 3106 40025
--- Gain High 3107 40026
--- Gain Low 3108 40027
--- Tau High 3109 40028
--- Tau Low 3110 40029
--- Alpha 3111 40030
--- Kp MOP 3113 40031
--- Tn MOP 3114 40032
--- Kp Te 3115 40033
Parameter PNU Modicon
address
--- Tn Te 3116 40034
n20 Kp T0 3025 40035
o18 Manual ctrl. 2075 40036
--- LOC Trig 50003 40037
--- LOC Reset 50004 40038
--- LOC Timer 50005 40039
--- LOC SH Trig 50007 40040
o03 Unit addr. 2008 40041
--- Unit Addr. 2 2009 40042
--- Modbus Baud 50060 40043
--- ModbusParity 50061 40044
--- ModbusStopB 50062 40045
--- ClosedValveT 3101 40046
--- Def Activate 50 011 40047
--- Def Hold OD 50008 40048
--- Def HoldTi 1 50009 40049
--- Def HoldTi 2 50010 40050
--- Max SH shdw 64301 40051
--- Min SH shdw 64302 40052
--- Tn SH shdw 64303 40053
--- Alpha shdw 64304 40054
--- DefHold shdw 64305 40055
--- SWVer shdw 64306 40056
--- Startup 64307 40057
n15 StartUp time 3017 40058
n17 Start OD % 3012 40059
--- O Min.OD % 64308 40060
--- HwMainSwitch 6 410 0 40061
o20 MinTransPres 2034 40062
o21 MaxTransPres 2033 40063
o30 Refrigerant 2551 40064
--- Rfg.Fac.A1 2548 40065
--- Rfg.Fac.A2 2549 40066
Parameter PNU Modicon
address
--- Rfg.Fac.A3 2550 40067
--- Standby 20000 40068
--- EKC Error 20001 40069
--- S2 Error 20002 40070
--- S4 Error 20004 40071
--- Pe inp.error 20005 40072
--- No Rfg. Sel. 20006 40073
--- Valve error 20007 40074
--- Reset alarm 2046 40075
n37 Max steps 3032 40076
n38 Max StepsSec 3033 40077
n39 Start BckLsh 3034 40078
n40 Backlash 3035 40079
n56 MotorCurrent 3051 40080
--- Factory2User 64060 40081
--- User2Factory 64062 40082
--- ControlState 3099 40083
--- LOC Tmr 3102 40084
--- Avg Opening 50033 40085
--- OpenHighRes 50052 40086
--- InputMeas 1 64050 40087
--- InputMeas 3 64052 40088
--- Sw. version 2003 40089
--- OrderNoLow 2 011 40090
--- OrderNoHigh 2015 40091
--- Avg KT0 Time 50020 40092
--- Avg OD 3hour 50021 40093
--- Avg CompTime 50022 40094
--- AvgFltTime 3118 40095
--- Modbus trans 64200 Not avail­able in BO address range
For detail description on the above parameters, please refer to the product user guide
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 16
Design guide | Data Communication Modbus RS485 RTU
Appendix 2
EKD modbus table
Parameter PNU
r05 Temp.unit 105
r09 Adjust S2 113
r10 Adjust S3 114
r12 Main switch 117
A34 Battery low 10035
n03 Valve type 3002
n04 Kp factor 3003
n05 Tn seconds 3004
n06 Td seconds 3005
n09 Max SH 3015
n10 Min SH 3021
n11 MOP 3013
n15 Start time 3017
n17 MinOdAtStart 3012
n18 Stability 3014
n19 Kp min. 3024
n20 Kp T0 3025
n21 SH mode 3026
n22 SH close 3027
n32 ETS OD% Max 3023
--- Kp Actual 64090
n37 Max steps 3032
n38 Max StepsSec 3033
n39 Start BckLsh 3034
n40 Backlash 3035
n42 Comp. dir. 3037
n43 Atten.Factor 3038
n44 TnT0 sec. 3039
n45 Min.Lim.Ref 3040
n56 MotorCurrent 3051
--- EKC state 2007
o10 AI type 2027
Parameter PNU
o18 Manual ctrl. 2075
o20 MinTransPres 2034
o21 MaxTransPres 2033
o30 Refrigerant 2551
o45 Manual OD% 2064
o56 Reg. type 2076
o61 Appl.mode 2077
--- Rfg.Fac.A1 2548
--- Rfg.Fac.A2 2549
--- Rfg.Fac.A3 2550
--- Sw. version 2003
--- OrderNoLow 2011
--- Factory2User 64060
--- Open Hyst. 64091
--- Close Hyst. 64092
--- Cal.Interval 64093
--- Alarm relay 2509
--- Reset alarm 2046
u06 Analog input 2504
u10 DI status 2002
u20 S2 Temp 2537
u21 Superheat 2536
u22 SuperheatRef 2535
u24 Opening OD% 2542
u25 EvapPres Pe 2543
u26 EvapTemp Te 2544
u27 Temp S3 2545
P67 Open Hyst. 2181
P68 Close Hyst. 2182
P69 OvD Enable 2183
P70 OvDProtect T 218 4
P71 ForcedCloseT 2185
For detail description on the above parameters, please refer to the product user guide/installation guide.
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 17
Appendix 3.
Modbus exception code For a full explanation of the structure of an exception code response, please refer to the Modbus
specication.”
Code Name Meaning
1
2
3
4
Illegal function This 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 congured and is being asked to return register values.
Illegal data adress The data address received in the query is not an allowable address for the server (or slave).
More specically, the combination of reference number and transfer length is invalid. For a controller with 100 registers, a request with oset 96 and length 4 would succeed. a request with oset 96 and length 5 will will generate exeption 02.
Illegal data value A 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 specically 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 signicance of any particular value of any particular reg ister.
Slave device failure An 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&showle=465
Please note that there may be restrictions on the use of above stated modbus tools for commercial applications
© Danfoss | DCS (sw) | 2015.10
DKRCC.PS.R00.A1.02 | 520H10468 | 18
Loading...