Function Code 2: Read Discrete Inputs Request 1 Byte 1 to 255 PLC Node Address 1 Byte 0x02 Function Code 2 Bytes 0x0000 to 0xFFFF Starting Address 2 Bytes 1 to 2000 Quantity of Inputs 2 Bytes Variable CRC Response 1 Byte 1 to 255 PLC Node Address 1 Byte 0x02 Function Code 1 Byte N = Quantity of inputs / 8 Byte Count N Bytes Value(s) Input Status 2 Bytes Variable CRC Function Code 3: Read Holding Registers Request 1 Byte 1 to 255 PLC Node Address 1 Byte 0x03 Function Code 2 Bytes 0x0000 to 0xFFFF Starting Address 2 Bytes 1 to 125 Quantity of Registers 2 Bytes Variable CRC Response 1 Byte 1 to 255 PLC Node Address 1 Byte 0x03 Function Code 1 Byte 2 * N (Quantity of registers) Byte Count N * 2 Bytes Value(s) Holding Registers 2 Bytes Variable CRC
Function Code 2: Read Discrete Inputs Request PLC Node Address 1 Byte 1 to 255 Function Code 1 Byte 0x02 Starting Address 2 Bytes 0x0000 to 0xFFFF Quantity of Inputs 2 Bytes 1 to 2000 CRC 2 Bytes Variable Response PLC Node Address 1 Byte 1 to 255 Function Code 1 Byte 0x02 Byte Count 1 Byte N = Quantity of inputs / 8 Input Status N Bytes Value(s) CRC 2 Bytes Variable Function Code 3: Read Holding Registers Request PLC Node Address 1 Byte 1 to 255 Function Code 1 Byte 0x03 Starting Address 2 Bytes 0x0000 to 0xFFFF Quantity of Registers 2 Bytes 1 to 125 CRC 2 Bytes Variable Response PLC Node Address 1 Byte 1 to 255 Function Code 1 Byte 0x03 Byte Count 1 Byte 2 * N (Quantity of registers) Holding Registers N * 2 Bytes Value(s) CRC 2 Bytes Variable
PI_ModbusS_4.0.7.61.docx