LTDVE8CH-20 – INSTRUCTION MANUAL
28
Write Single Register
0x06
Write Multiple Registers
0x10
Table 16: function codes supported by the controller
Any Modbus request containing an unimplemented function code is silently ignored by the controller
and no response, of any kind, is given back to the master. These supported function codes can be used
to access the controller internal register file, organized as an array of sixteen-bit (two bytes) values.
These function codes are briefly described in the following sections.
14.1.3. Read Holding Registers (0x03)
This function code is used to read the contents of a contiguous block of registers from the controller
register file. The master specifies the starting register address and the number of registers to be read.
Registers are addressed starting at zero. The register data in the response message are packed as two
bytes per register. For each register, the first byte contains the high order bits and the second contains
the low order bits.
14.1.4. Write Single Register (0x06)
This function code is used to write a single register in the controller register file. The master specifies
the address of the register to be written and the actual data to be written. Registers are addressed
starting at zero. The register data in the request message are packed as two bytes per register. For each
register, the first byte contains the high order bits and the second contains the low order bits. The
normal response is an echo of the request, returned after the register contents have been written.
14.1.5. Write Multiple Registers (0x10)
This function code is used to write a block of contiguous registers (1 to 123 registers) in the controller
register file. The master specifies the starting register address, the number of registers and the actual
data to be written. Registers are addressed starting at zero. The register data in the request message
are packed as two bytes per register. For each register, the first byte contains the high order bits and
the second contains the low order bits. The normal response returns the function code, starting
address, and quantity of registers written.
14.2. Register file
Table 17: controller register file
summarizes all the Modbus registers implemented in the
controller. There are 512 registers, each of sixteen-bits (two bytes) in size. The registers are mapped
at contiguous addresses starting from 0 and ending to 511.
Address
Name
Type
Range
Description
0
DEVICE_TYPE
R
0-
65535
Device type
1
BOOT_VERSION
R
0-
65535
Bootloader firmware version
2
MCU_VERSION
R
0-
65535
Microcontroller firmware version