Chapter 6. Serial I/O, SNP & RTU Protocols
GFK-2222AD
April 2018
229
Message Fields
The message fields for a typical message are shown in the figure below, and are explained in the following
sections.
FRAME
Station Address
Function Code
Information
Error Check
Station Address
The Station Address is the address of the slave station selected for this data transfer. It is one byte in
length and has a value from 0 to 247 inclusive. An address of 0 selects all slave stations, and indicates
that this is a broadcast message. An address from 1 to 247 selects a slave station with that station
address.
Function Code
The Function Code identifies the command being issued to the station. It is one byte in length and is
defined for the values 0 to 255 as follows:
Function Code
Description
0
Illegal Function
1
Read Output Table
2
Read Input Table
3
Read Registers
4
Read Analog Input
5
Force Single Output
6
Preset Single Register
7
Read Exception Status
8
Loopback Maintenance
9-14
Unsupported Function
15
Force Multiple Outputs
16
Preset Multiple Registers
17
Report Device Type
18
–
21
Unsupported Function
22
Mask Write 4x Register
23
Read/Write 4x Registers
24
–
66
Unsupported Function
67
Read Scratch Pad Memory
68-127
Unsupported Function
128-255
Reserved for Exception Responses