Function
Function
code
Subfunction
code
Subfunction
Diagnostics 8
1
Restart communication.
2
Return diagnostic
register.
10
Clear counters and
diagnostic register.
11
Return bus message
count.
12
Return bus communi-
cation error count.
13
Return slave error count.
14
Return slave message
count.
Table 7.20 Function Codes
7.8.11 Modbus Exception Codes
For a full explanation of the structure of an exception code
response, refer to
Code Name
Meaning
1
Illegal
function
The function code received in the query 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 configured and is being
asked to return register values.
2
Illegal data
address
The data address received in the query is
not an allowable address for the server (or
slave). More specifically, the combination
of reference number and transfer length is
invalid. For a controller with 100 registers,
a request with offset 96 and length 4
succeeds, while a request with offset 96
and length 5 generates exception 02.
3
Illegal data
value
A value contained in the query data field
is not an allowable value for 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 does NOT mean that a data
item submitted for storage in a register
has a value outside the expectation of the
application program, since the Modbus
protocol is unaware of the significance of
any value of any register.
Code Name
Meaning
4
Slave device
failure
An unrecoverable error occurred while the
server (or slave) was attempting to
perform the requested action.
Table 7.21 Modbus Exception Codes
7.9 How to Access Parameters
7.9.1 Parameter Handling
The PNU (parameter number) is translated from the
register address contained in the Modbus read or write
message. The parameter number is translated to Modbus
as (10 x parameter number)
decimal
. Example: Reading
parameter 3-12 Catch up/slow Down Value
(16 bit): The
holding register 3120 holds the parameters value. A value
of 1352 (decimal), means that the parameter is set to
12.52%
Reading
parameter 3-14 Preset Relative Reference
(32 bit):
The holding registers 3410 and 3411 hold the parameters
values. A value of 11300 (
decimal
), means that the
parameter is set to 1113.00.
For information on the parameters, size, and conversion
index, see the
programming guide
.
7.9.2 Storage of Data
The coil 65 decimal determines whether data written to
the frequency converter is stored in EEPROM and RAM (coil
65=1), or only in RAM (coil 65=0).
7.9.3 IND (Index)
Some parameters in the frequency converter are array
parameters, for example
parameter 3-10 Preset Reference
.
Since the Modbus does not support arrays in the holding
registers, the frequency converter has reserved the holding
register 9 as pointer to the array. Before reading or writing
an array parameter, set the holding register 9. Setting
holding register to the value of 2 causes all following read/
write to array parameters to be to the index 2.
7.9.4 Text Blocks
Parameters stored as text strings are accessed in the same
way as the other parameters. The maximum text block size
is 20 characters. If a read request for a parameter is for
more characters than the parameter stores, the response is
truncated. If the read request for a parameter is for fewer
characters than the parameter stores, the response is space
filled.
RS485 Installation and Set-...
Design Guide
MG18N202
Danfoss A/S © 12/2015 All rights reserved.
61
7
7