Chapter 6. Serial I/O, SNP & RTU ProtocolsGFK-2222AD April 2018 239Message (04): Read Analog InputsFormat:Address StartingAnalog InputNo.Number ofAnalogInputsErrorCheckFunc04QueryHi HiLo LoAddress Data ErrorCheckFunc04Normal ResponseByteCountFirstAnalogInputNo.Hi HiLo LoFigure 55: RTU Read Analog Inputs Message FormatQuery:▪ An Address of 0 is not allowed as this request cannot be a broadcast request.▪ The function code is equal to 4.▪ The Starting Analog Input Number is two bytes in length. The Starting Analog Input Number may beany value less than the highest analog input number available in the attached CPU. It is equal to oneless than the number of the first analog input returned in the normal response to this request.▪ The Number of Analog Inputs value is two bytes in length. It must contain a value from 1 to 125inclusive. The sum of the Starting Analog Input value and the Number of Analog Inputs value mustbe less than or equal to the highest analog input number available in the at-attached CPU. The highorder byte of the Starting Analog Input Number and Number of Analog Inputs fields is sent as thefirst byte in each of these fields. The low order byte is the second byte in each of these fields.Response:▪ The Byte Count is a binary number from 2 to 250 inclusive. It is the number of bytes in the normalresponse following the byte count and preceding the error check. Note that the Byte Count is equalto two times the number of analog inputs returned in the response. A maximum of 250 bytes (125)analog inputs is set so that the entire response can fit into one 256-byte data block.▪ The analog inputs are returned in the Data field in order of number with the lowest number analoginput in the first two bytes and the highest number analog input in the last two bytes of the Datafield. The number of the First Analog Input in the Data field is equal to the Starting analog inputnumber plus one. The high order byte is sent before the low order byte of each analog input.