Appendix B – Modbus Protocol
B-6
NMBA-01 Installation and Start-up Guide
Contents of the Data
Field
The data field is constructed using sets of two hexadecimal digits, in
the range of 00 to FF hexadecimal. These are made from one RTU
character, according to the network’s serial transmission mode.
The data field of messages sent from a master to slave devices con-
tains additional information which the slave must use to take the action
defined by the function code. This can include items like discrete 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 specifies the starting register
and how many registers are to be read. If the master writes to a group
of registers in the slave (function code 10 hexadecimal), the data field
specifies the starting register, how many registers to write, the count of
data bytes to follow in the data field, and the data to be written into the
registers.
If no error occurs, the data field of a response from a slave to a master
contains the data requested. If an error occurs, the field contains an
exception code that the master application can use to determine the
next action to be taken.
The data field can be nonexistent (of zero length) in certain kinds of
messages. For example, in a request from a master device for a slave
to respond with its communications event log (function code 0B hexa-
decimal), the slave does not require any additional information. The
NMBA-01 does not support the function code 0B hexadecimal. The
function code alone specifies the action.
Contents of the Error
Checking Field
Two kinds of error-checking methods are used for standard Modbus
networks. The error checking field contents depend upon the method
that is being used.
ASCII
When ASCII mode is used for character framing, the error checking
field contains two ASCII characters. The error check characters are the
result of a Longitudinal Redundancy Check (LRC) calculation that is
performed on the message contents, exclusive of the beginning ’colon’
and terminating CRLF characters.
The LRC characters are appended to the message as the last field pre-
ceding the CRLF characters.
efesotomasyon.com - Control Techniques,emerson,saftronics -ac drive-servo motor