5.8.9 How to Control the FrequencyConverterThis section describes codes which can be used in thefunction and data fields of a Modbus RTU message.5.8.10 Function Codes Supported byModbus RTUModbus RTU supports use of the following function codesin the function field of a message.Function Function code (hex)Read coils 1Read holding registers 3Write single coil 5Write single register 6Write multiple coils FWrite multiple registers 10Get comm. event counter BReport slave ID 11Table 5.19 Function CodesFunction FunctionCodeSub-functioncodeSub-functionDiagnostics 8 1 Restart communication2 Return diagnostic register10 Clear counters anddiagnostic register11 Return bus message count12 Return bus communi-cation error count13 Return slave error count14 Return slave messagecountTable 5.20 Function Codes5.8.11 Modbus Exception CodesFor a full explanation of the structure of an exception coderesponse, refer to chapter 5.8.5 Function Field.Code Name Meaning1 IllegalfunctionThe function code received in the query isnot an allowable action for the server (orslave). This may be because the functioncode is only applicable to newer devices,and was not implemented in the unitselected. It could also indicate that theserver (or slave) is in the wrong state toprocess a request of this type, forexample because it is not configured andis being asked to return register values.2 Illegal dataaddressThe data address received in the query isnot an allowable address for the server(or slave). More specifically, thecombination of reference number andtransfer length is invalid. For a controllerwith 100 registers, a request with offset96 and length 4 would succeed, a requestwith offset 96 and length 5 generatesexception 02.3 Illegal datavalueA value contained in the query data fieldis not an allowable value for server (orslave). This indicates a fault in thestructure of the remainder of a complexrequest, such as that the implied length isincorrect. It specifically does NOT meanthat a data item submitted for storage ina register has a value outside theexpectation of the application program,since the Modbus protocol is unaware ofthe significance of any particular value ofany particular register.4 Slave devicefailureAn unrecoverable error occurred while theserver (or slave) was attempting toperform the requested action.Table 5.21 Modbus Exception Codes5.9 How to Access Parameters5.9.1 Parameter HandlingThe PNU (Parameter Number) is translated from theregister address contained in the Modbus read or writemessage. The parameter number is translated to Modbusas (10 x parameter number) decimal. Example: Reading3-12 Catch up/slow Down Value (16bit): The holding register3120 holds the parameters value. A value of 1352(Decimal), means that the parameter is set to 12.52%RS485 Installation and Set-... Design Guide70 Danfoss A/S © 09/2014 All rights reserved. MG06B40255