9.8.6 Funcon codes
The mode of access to inverter data (parameters) is controlled via funcon codes.
Frame structure
Modbus Applicaon Header (MBAP) Protocol Data Unit (PDU) CRC
Transacon
number
Protocol charac-
ters
(always 0x0000)
Number of the
bytes sll to fol-
low
Slave address Funcon code Data / error code Checksum
2 bytes
2 bytes 2 bytes
1 byte 1 byte n byte 2 bytes
Tab. 1: ADU (Applicaon Data Unit)
Communicaon is established on the basis of the master/slave mode. Communicaon is
always started by a master request.
The inverter (slave) then either gives a valid response or outputs an error code (provided that
the request has been received and evaluated as valid message).
In case of a valid answer, the funcon code is returned. In the event of an error, a funcon
code assigned to the request is returned.
Error causes can be invalid CRC checksums, non-supported funcon codes or impermissible
data accesses.
Elements of the ADU:
•
MBAP (7 bytes)
•
Number of the bytes sll to follow in the message.
•
Address of the inverter Basic sengs ^ 349.
•
The other bytes of the header are not described here.
•
Funcon code
•
The funcon codes exclusively refer to "4X registers", i. e. registers from the address
4000.
•
All data in the inverter can only be accessed via these 4X registers, see Data mapping
^ 360.
•
The 4xxxx reference is implicit, i. e. given by the funcon code used. In the frame there-
fore the leading 4 is omied in the addressing process.
•
Lenze supports the basic 1 addressing of Modbus, i.e. the numbering of the registers
starts with 1 whereas addressing starts with 0. For example, the address 0 is used in
the frame when register 40001 is read.
•
Data or error code
•
Checksum
All ADU contents are represented in the Big Endian format (most signicant byte rst).
Funcon codes
Funcon code Funcon code in the event of an
error
Supported error codes
0x03 0x83 0x01, 0x02, 0x03, 0x04
0x06 0x86 0x01, 0x02, 0x03, 0x04
0x10 0x90 0x01, 0x02, 0x03, 0x04
0x17 0x97 0x01, 0x02, 0x03, 0x04
Funcon code Funcon name Info
3 0x03 Read Holding Registers Reading of a single register or a group of several interconnected regis-
ters.
6 0x06 Preset Single Register Wring of a single register.
16 0x10 Preset Mulple Registers Wring of a single register or a group of several interconnected registers.
23 0x17 Read/Write 4X Registers Reading and wring within a transacon:
•
Wring of a data block into a group of several interconnected regis-
ters.
•
Reading from a block of interconnected registers.
Conguring the network
Modbus TCP
Funcon codes
355