www.accuenergy.com23V: 1.0 Revised: Sept. 2019Chapter 9: Description of Modbus-TCP Protocol9.1.3 Function FieldThe function code field of a message frame contains eight bits. Valid codes are in the rangeof 1-255. When a message is sent from a client to a server device, the function code fieldtells the server what kinds of action to perform.Code Meaning Action02 Read Digital Input (DI) Status Obtain current status of Digital Input03 Read Data Obtain current binary value in one or moreregisters16 Write Multiple-registers Place specific value into a series of consecu-tive multiple-registers9.1.4 Data FieldThe data field is constructed using sets of two hexadecimal digits, in the range of 00 to FF.The data field of messages sent from a master to slave contains additional informationwhich the slave must use to take the action defined by the function code. This can includeinformation such as the register addresses, the quantity of registers to query and the countof the actual number of data bytes. For example, if the master requests a slave to read agroup of holding registers(function code 03), the data field specifies the starting registerand how many registers are to be read.If the master needs to write data(function code 10 hexadecimal) to a group of registersin the slave, the data field specifies the starting register, how many registers to write, thecount of data bytes to follow in the data field and the data to be written into the registers.9.2 Format of communication9.2.1 Explanation of frameTransactionidentifier hiTransactionidentifier loProtocolidentifier hiProtocolidentifier lo Length hi Length lo Unitidentifier00H 00H 00H 00H 00H 06H 01H