10. MMooddbbuuss RRTTUU ffoorr FFCC 110000
2009-June-22
Flemming Huusmann DD-SMPM Confidential / Property of Danfoss Drives A/S
10
Drives Division
FC 100 Modbus Exception Codes
code in
data field Exception code description
0x00 The parameter number does not exist
0x01 There is no write access to the parameter
0x02 The data value exceeds the parameter limits
0x03 The sub-index in use does not exist
0x04 The parameter is not of the array type
0x05 The data type does not match the parameter called
0x06 Only reset
0x07 Not changeable
0xB No write access
0x11 Data change in the parameter called is not possible in the present mode
0x12 Other error
0x40 Invalid data address
0x41 Invalid message length
0x42 Invalid data length or value
0x43 Invalid function code
0x82 There is no bus access to the parameter called
0x83 Data change is not possible because factory set-up is selected
12. MMooddbbuuss RRTTUU ffoorr FFCC 110000
1 byte 1 byte 2 bytes 2 bytes 2 bytes
1 byte 1 byte 2 bytes 2 bytes 2 bytes
2 bytes
2009-June-22
Flemming Huusmann DD-SMPM Confidential / Property of Danfoss Drives A/S
12
Drives Division
Modbus RTU Frame example:
FFuunnccttiioonn ccooddee == 0033hheexx :: RReeaadd HHoollddiinngg RReeggiisstteerrss......
Slave
Function
First word
Number of
Address code=0x03
address
words to read
CRC16 RReessppoonnssee ::
Slave
Function
Number of
Value of the
Value of the
Address code=0x03
bytes read
first word
last word
CRC16 RReeqquueesstt ::
13. MMooddbbuuss RRTTUU ffoorr FFCC 110000
RReeqquueesstt ::
1 byte 1 byte 2 bytes 2 bytes 2 bytes
1 byte 1 byte 2 bytes 2 bytes 2 bytes
2009-June-22
Flemming Huusmann DD-SMPM Confidential / Property of Danfoss Drives A/S
13
Drives Division
Modbus RTU Frame example:
FFuunnccttiioonn ccooddee == 0066hheexx :: WWrriittee ssiinnggllee RReeggiisstteerr
Slave
Function
Word
Address code=0x06 address
Value of word
CRC16 RReessppoonnssee ::
Slave
Address Word address CRC16 Function
code=0x06 Value of word
14. MMooddbbuuss RRTTUU ffoorr FFCC 110000
RReeqquueesstt ::
1 byte 1 byte 2 bytes 2 bytes 1 byte 2 bytes
2 bytes
Slave
Function
First word
Address code=0x10
address
CRC16 1 byte 1 byte 2 bytes 2 bytes 2 bytes
2009-June-22
Flemming Huusmann DD-SMPM Confidential / Property of Danfoss Drives A/S
14
Drives Division
Modbus RTU Frame example:
FFuunnccttiioonn ccooddee == 1100hheexx :: WWrriittee MMuullttiippllee RReeggiisstteerrss
RReessppoonnssee ::
Number of
words to write
Value of the
first word
Number of
bytes
Slave
Function
First word
Number of
Address code=0x10
address
words to write
CRC16
15. MMooddbbuuss RRTTUU ffoorr FFCC 110000
2009-June-22
Flemming Huusmann DD-SMPM Confidential / Property of Danfoss Drives A/S
15
Drives Division
Supported Modbus Function Codes in FC 100
• TThhee FFuunnccttiioonn CCooddee tteellllss wwhhaatt ttyyppee ooff MMooddbbuuss tteelleeggrraamm iitt iiss......
Function Function
code
Read coils 1 hex
Read holding registers 3 hex
Write single coil 5 hex
Write single register 6 hex
Diagnostics* 8 hex
Write multiple coils F hex
Write multiple registers 10 hex
Get comm. event counter B hex
Report slave ID* 11 hex
Read Device Identification* 2B hex
** ==
16. MMooddbbuuss RRTTUU ffoorr FFCC 110000
2009-June-22
Flemming Huusmann DD-SMPM Confidential / Property of Danfoss Drives A/S
16
Drives Division
Supported Modbus Function Codes
• FFuunnccttiioonn CCooddee 88:: DDiiaaggnnoossttiiccss
Function Function
code
Sub-function code Sub-function
Diagnostics 8
1 Restart communication
2 Return diagnostic register
10 (0xA) Clear counters and diagnostic register
11 (0xB) Return bus message count
12 (0xC) Return bus communication error count
13 (0xD) Return bus exception error count
14 (0xE) Return slave message count
17. MMooddbbuuss RRTTUU ffoorr FFCC 110000
2009-June-22
Flemming Huusmann DD-SMPM Confidential / Property of Danfoss Drives A/S
17
Drives Division
Supported Modbus Function Codes
• FFuunnccttiioonn CCooddee 88:: DDiiaaggnnoossttiiccss,, ssuubb--ffuunnccttiioonn 22 RReettuurrnn ddiiaaggnnoossttiiccss rreeggiisstteerr
Function Function
code
Sub-function code Sub-function
Diagnostics 8 2 Return diagnostic register
Description Length Data
MSB Function code 1 byte 0x08
Sub-function code 2 bytes 0x0002
4 bytes Alarm word
LSB 4 bytes Warning word
• RReessppoonnssee::
18. MMooddbbuuss RRTTUU ffoorr FFCC 110000
2009-June-22
Flemming Huusmann DD-SMPM Confidential / Property of Danfoss Drives A/S
18
Drives Division
Supported Modbus Function Codes
• FFuunnccttiioonn CCooddee 88:: DDiiaaggnnoossttiiccss,, ssuubb--ffuunnccttiioonn 22 RReettuurrnn ddiiaaggnnoossttiiccss rreeggiisstteerr
Function Function
code
Sub-function code Sub-function
Diagnostics 8 11 Return Bus Message Count
Description Length Data
MSB Function code 1 byte 0x08
Sub-function code 2 bytes 0x000B
LSB Data 2 bytes Par. 8-80 Bus Message Count
• RReessppoonnssee::
19. MMooddbbuuss RRTTUU ffoorr FFCC 110000
2009-June-22
Flemming Huusmann DD-SMPM Confidential / Property of Danfoss Drives A/S
19
Drives Division
Supported Modbus Function Codes
• FFuunnccttiioonn CCooddee 88:: DDiiaaggnnoossttiiccss,, ssuubb--ffuunnccttiioonn 22 RReettuurrnn ddiiaaggnnoossttiiccss rreeggiisstteerr
Function Function
code
Sub-function code Sub-function
Diagnostics 8 12 Return bus communication error count
• RReessppoonnssee::
Description Length Data
MSB Function code 1 byte 0x08
Sub-function code 2 bytes 0x000C
LSB Data 2 bytes Par. 8-81 Bus Error Count
22. MMooddbbuuss RRTTUU ffoorr FFCC 110000
• RReessppoonnssee::
2009-June-22
Flemming Huusmann DD-SMPM Confidential / Property of Danfoss Drives A/S
22
Drives Division
Supported Modbus Function Codes
• FFuunnccttiioonn CCooddee 1111hheexx:: RReeppoorrtt SSllaavvee IIDD
Function Length Data
MSB Function code 1 byte 0x11
Byte count 1 byte 1-251(N)
Slave ID 0-250 bytes Slave ID
LSB Run status Indicators 1 bytes 0x00 or 0xFF
FC
Parameter
Name
15-40 FC Type
15-41 Power section
15-42 Voltage
15-43 SW version
• 00xx0000 iiff ccooiill ‘‘SSttooppppeedd // RRuunnnniinngg’’ iiss 00 ((ccooiill nnoo.. 4444))
• 00xxFFFF iiff ccooiill ‘‘SSttooppppeedd // RRuunnnniinngg’’ iiss 11 ((ccooiill nnoo.. 4444))
23. MMooddbbuuss RRTTUU ffoorr FFCC 110000
• RReessppoonnssee::
2009-June-22
Flemming Huusmann DD-SMPM Confidential / Property of Danfoss Drives A/S
23
Drives Division
Supported Modbus Function Codes
• FFuunnccttiioonn CCooddee 22BBhheexx:: DDeevviiccee IIddeennttiiffiiccaattiioonn
Description Length Data
MSB Function code 1 byte 0x2B
MEI type 1 byte 0x0E
Read device ID code 1 byte 1 or 2 or 3 or 4
Conformity level 1 byte 1 or 2 or 3 or 81 or 82
More Follows 1 byte 0x00 or 0xFF
Next Object ID 1 byte Object ID number
Number of objects 1 byte 0x00 – 0x0F
1st object ID 1 byte
1st object length 1 byte
1st object Value 1st obj. length
...
LSB ...
DDeevviiccee IIddeenntt..
25. MMooddbbuuss RRTTUU ffoorr FFCC 110000
2009-June-22
Flemming Huusmann DD-SMPM Confidential / Property of Danfoss Drives A/S
25
Drives Division
Coils (single bit)
Coil number Description Signal direction
1 – 16 Frequency converter control word Master -> slave
17 – 32 Frequency converter speed or set-point
reference
Range 0x0 – 0xFFFF (-200% ...
~200%)
Master -> slave
33 – 48 Frequency converter status word Slave -> master
49 – 64 Open loop mode: Frequency converter
output frequency
Closed loop mode: Frequency
converter feedback signal
Slave -> master
65 Parameter write control Master -> slave
0 = Parameter changes are
written to the RAM of
the frequency converter
1 = Parameter changes are
written to the RAM and
EEPROM of the
frequency converter.
66 - 65536 Reserved
26. MMooddbbuuss RRTTUU ffoorr FFCC 110000
2009-June-22
Flemming Huusmann DD-SMPM Confidential / Property of Danfoss Drives A/S
26
Drives Division
Holding registers (words)
Register number Description
00001 – 00006 Reserved
00007 Last error code from an FC data object interface
00008 Reserved
00009 Parameter index*
00010 – 00999 000 parameter group (parameters 001 through 099)
01000 – 01999 100 parameter group (parameters 100 through 199)
02000 – 02999 200 parameter group (parameters 200 through 299)
03000 – 03999 300 parameter group (parameters 300 through 399)
04000 – 04999 400 parameter group (parameters 400 through 499)
… …
49000 – 49999 4900 parameter group (parameters 4900 through 4999)
50000 Input data: Frequency converter control word register (CTW).
50010 Input data: Bus reference register (REF).
… …
50200 Output data: Frequency converter status word register (STW).
50210 Output data: Frequency converter main actual value register
(MAV).
32. MMooddbbuuss RRTTUU//TTCCPP
1 byte 1 byte 2 bytes 2 bytes 2 bytes
1 byte 1 byte 2 bytes 2 bytes 1 byte 2 bytes
2 bytes
2009-June-22
Flemming Huusmann DD-SMPM Confidential / Property of Danfoss Drives A/S
32
Drives Division
Read/write block of data (Process data)
FFuunnccttiioonn ccooddee == 0033hheexx :: RReeaadd HHoollddiinngg RReeggiisstteerrss......
Slave
Function
First word
Number of
Address code=0x03
address
words to read
CRC16 RReeqquueesstt ::
FFuunnccttiioonn ccooddee == 1100hheexx :: WWrriittee MMuullttiippllee RReeggiisstteerrss
RReeqquueesstt ::
Slave
Function
First word
Number of
Number of
Value of the
Address code=0x10
address
words to write
bytes
first word
CRC16 TThhiiss iiss oonnllyy ppoossssiibbllee wwiitthh ccoonnsseeccuuttiivvee rreeggiisstteerrss ((nnoo ““hhoolleess”” iinn tthhee rraannggee))