Data field, Error checking field – Watlow CPC400 User Manual
Page 201
CPC400 Series User’s Guide
Appendix A: Modbus Protocol
Doc. 0600-2900-2000
Watlow Anafaze
187
In addition to its modification of the function code for an ex-
ception response, the slave places a unique code into the
data field of the response message. This tells the master
what kind of error occurred, or the reason for the exception.
The master device’s application program has the responsi-
bility of handling exception responses. Typical processes
are to post subsequent retries of the message, to try diag-
nostic messages to the slave, and to notify operators.
Data Field
The contents of the data field varies depending on whether
messages originate from a master or slave. Data fields in
slave messages consist of hexadecimal values.
Data fields of master messages contain additional informa-
tion which the slave must use to take the action defined by
the function code. This can include items like digital and
register addresses, the quantity of items to be handled, and
the count of actual data bytes in the field.
For example, if the master requests a slave to read a group
of holding registers (function code 03), the data field speci-
fies the starting register and how many registers are to be
read.
If no error occurs, the data field of a response from a slave
to a master contained the data requested. If an error oc-
curs, the field contains an exception code that the master
application can use to determine the next action to be tak-
en.
The data field can be nonexistent (of zero length) in certain
kinds of messages, where the function code alone specifies
the action.
Error Checking Field
The error-checking field contains a 16-bit value implement-
ed as two 8-bit bytes. The error check value is the result of
a cyclical redundancy check (CRC) calculation performed
on the message contents.
The CRC field is appended to the message as the last field
in the message. When this is done, the low-order byte of the
field is appended first, followed by the high-order byte. The
CRC high-order byte is the last byte to be sent in the mes-
sage.