User manual
NIC Setup and Testing
35
Function Code:
The function code field tells the addressed slaves what function
to perform. Function codes are specifically designed invoke a
specific action by the slave device. The function code range is
from 1 to 127. However, the OpenComms NIC module
primarily uses Function Code 3 (Read Holding Registers) and
Function Code 6 (Preset Single Register).
Data Field(s):
The data field varies in length depending on whether the
message is a request or a response to a packet. This field
typically contains information required by the slave device to
perform the command specified or to pass back data to the
master device.
Error Check Field:
The Error Check Field consists of a 16-bit (2 byte) Cyclical
Redundancy Check (CRC16). It allows the receiving device to
detect a packet that has been corrupted with transmission errors.