11. Connection to other devices
11.4 Modbus TCP
Function Code 1 byte 0x04 ;Read Input Registers
Start address 2 byte Must always be 1 less than the starting input you
want (zero-based)
Number of input registers 2 byte 1 to 125 (0x7D)
Table 100: Request-PDU
Response to the request being received
1. The starting address is analyzed (distributed among bytes 1 and 2)
b. Byte 1 = Hi; Byte 2 = Lo
2. The number of registers is analyzed (distributed among bytes 3 and 4)
b. Byte 3 = Hi; Byte 4 = Lo
3. The input registers are read from the start of the (starting address) to (starting
address + number of input registers)
(An input register corresponds to two bytes)
Function Code 1 byte 0x04 ;Read Input Registers
Bye Count 1 byte A value of
= 2 * N must always be entered here
Register values n* 2 byte value
n= Number of input registers read
Table 101: Response-PDU
Preparation for sending the response
1. The input registers read are mapped to two bytes per input register
2. There are a high byte and a low byte for each input register
a. The first byte = Hi; the second byte = Lo
b. Example:
- Register word Hi0x00
- Register word Lo0x0A
- Content of marker word 0x000A
3. The LSB within the byte is bit 0
Once the response is encoded, it is sent.
11.4.2.5 Write Single Registers 0x06:
This function writes 16 bites to a register ((NET) marker word in the easy)
Function Code 1 byte 0x06 ;Write single Registers
Target address 2 byte Must always be 1 less than the MW being written
to (if you want MW1 to be written to, there must
be a 0 here)
Register value 2 byte Value to be written
Table 102: Request-PDU
Response to the request being received
550
easyE4 11/18 MN050009 EN www.eaton.com