Mbap; Function Code - ICP DAS USA WF-2000 Series User Manual

Wi-fi i/o module
Hide thumbs Also See for WF-2000 Series:
Table of Contents

Advertisement

Transaction ID
Protocol ID
(2 bytes)
(2 bytes)
MBAP Header
Figure 5-1: Modbus/TCP Application Data Unit

5.2.1 MBAP

The Modbus/TCP extension includes 7 additional bytes to the
original Modbus protocol, which allows for transport over the TCP/IP
layers.
A dedicated header is used on TCP/IP to identify the Modbus
Application Data Unit. It is called the MBAP Header (MODBUS
Application Protocol Header). The MBAP Header consists of 7 bytes of
information:
Table 5-1: MODBUS Application Protocol Header
Fields
Transaction
Identifier
Protocol Identifier
Length
Unit Identifier

5.2.2 Function Code

The function code field of a Modbus data unit is coded in one byte.
Valid codes are in the range of 1 ... 255 decimal (the range 128 - 255 is
reserved and used or exception responses). When a Modbus request is
sent from a Modbus Client to a Server device the function code field tells
the Server what kind of action to perform.
The Modbus/TCP feature of WF-2000 series module supports 7
function codes, which allows the reading and writing of data contents of
WF-2000 Series DIO
Modbus/TCP Application Data Unit
Length
(2 bytes)
Length
Description
Identification of Request/Response transaction –
2 bytes
Copied from request to response
2 bytes
0 = Modbus protocol
Number of following bytes - Includes the Unit
2 bytes
Identifier
1 byte
Identification of remote slave
User's Manual (RevB1.0, Oct./2016) ------------- 40
Unit ID
FCode
(1 bytes)
(1 bytes)
Protocol Data Unit
Data
(0 to 252 bytes)

Advertisement

Table of Contents
loading

Table of Contents