11. Connection to other devices11.4 Modbus TCP3. If a byte is not used fully, the unused bits will be padded with 0's.Once the response is encoded, it is sent.11.4.2.2 Read Discrete Inputs 0x02:This function reads a specified number of bit inputs starting from a specified startingaddress and then returns the result in bytes (8 inputs per byte)Function Code 1 byte 0x02 ;Read Discrete InputsStart address 2 byte Must always be 1 less than the starting input you want(zero-based)Number of out-puts2 byte 1 to 2000 (0x7D0)Table 96: Request-PDUResponse to the request being received1. The starting address is analyzed (distributed among bytes 1 and 2)a. Byte 1 = Hi; Byte 2 = Lo2. The number of inputs is analyzed (distributed among bytes 3 and 4)a. Byte 3 = Hi; Byte 4 = Lo3. The bit input states are reada. From the start of the (starting address) to (starting address + number of bitinputs)Function Code 1 byte 0x02 ;Read Discrete InputsBye Count 1 byte NOutput values n* 1 Byte valueTable 97: Response-PDUn= Number of inputs read / 8Preparation for sending the response1. The read bits are encoded in bytesBit per input state; 1=ON, 0=OFF)2. The LSB of the first byte, i.e., bit 0, contains the state of the input that isaddressed first in the request. The other inputs follow in ascending order.3. If a byte is not used fully, the unused bits will be padded with 0's.Once the response is encoded, it is sent.11.4.2.3 Read Holding Registers 0x03:Function 0x03 reads internal registers (e.g., marker words in the easyE4) word byword.548 easyE4 11/18 MN050009 EN www.eaton.com