Message (67): Read Scratch Pad Memory
Format:
Address
Query:
▪
An Address of 0 is not allowed as this cannot be a broadcast request.
▪
The Function Code is equal to 67.
▪
The Starting Byte Number is two bytes in length and may be any value less than or equal to the
highest scratch pad memory address available in the attached CPU as indicated in the table below.
The Starting Byte Number is equal to the address of the first scratch pad memory byte returned in
the normal response to this request.
▪
The Number of Bytes value is two bytes in length. It specifies the number of scratch pad memory
locations (bytes) returned in the normal response. The sum of the Starting Byte Number and the
Number of Bytes values must be less than two plus the highest scratch pad memory address
available in the attached CPU. The high order byte of the Starting Byte Number and Number of Bytes
fields is sent as the first byte in each of these fields. The low order byte is the second byte in each of
the fields.
Response:
▪
The Byte Count is a binary number from 1 to 256 (0 = 256). It is the number of bytes in the Data field
of the normal response.
▪
The Data field contains the contents of the scratch pad memory requested by the query. The scratch
pad memory bytes are sent in order of address. The contents of the scratch pad memory byte whose
address is equal to the Starting Byte Number is sent in the first byte of the Data field. The contents
of the scratch pad memory byte whose address is equal to one less than the sum of the starting byte
number and number of bytes values is sent in the last byte of the Data field.
GFK-2222AD
Address
Func
Starting
Byte No.
67
Func
Byte
Count
67
Normal Response
Figure 63: RTU Read Scratch Pad Memory Message Format
April 2018
Chapter 6. Serial I/O, SNP & RTU Protocols
Number of
Bytes
Query
Data
Error
Check
Error
Check
251