SMAX MODBUS®
value. The CRC value is calculated by the transmitting device, which
appends the CRC to the message. The device that receives recalculates a
CRC during receipt of the message and compares the calculated value to
the actual value it received in the CRC field. If the two values are not
equal, an error results.
The Modbus protocol defines three PDUs. They are:
•
Modbus Request PDU
;
•
Modbus Response PDU
;
•
Modbus Exception Response PDU
.
The
Modbus Request PDU
is defined as {function_code, request_data}, where:
function_code = Modbus function code [1 byte];
request_data = this field is function code dependent and usually contains
information such as variable references, variable counts, data offsets, sub-
function, etc. [n bytes].
The
Modbus Response PDU
is defined as {function_code, response_data},
where:
function_code = Modbus function code [1 byte];
response_data = this field is function code dependent and usually contains
information such as variable references, variable counts, data offsets, sub-
function, etc. [n bytes].
The
Modbus Exception Response PDU
is defined as {exception-
function_code, exception_code}, where:
exception-function_code = Modbus function code + 80 hex [1 byte];
exception_code = Modbus Exception code, refer to the table “Modbus Exception
Codes” in the section 7 of the document “Modbus Application Protocol
Specification V1.1b”.
6.3 Transmission modes
Two different serial transmission modes are defined in the Modbus serial
protocol: the
RTU
(
Remote Terminal Unit
)
mode
and the
ASCII mode
. The
transmission mode defines the bit contents of message fields transmitted
serially on the line. It determines how information is packed into the message
fields and decoded. The transmission mode and the serial port parameters must
be the same for all devices on a Modbus Serial Line. All devices must implement
the RTU mode, while the ASCII mode is an option. Lika devices only implement
RTU transmission mode, as described in the following section.
MAN SMAX MB E 1.2
Modbus® interface
46 of 84