Mbap; Function Code - ICP DAS USA tWF-DA1PD2R1 User Manual

Wi-fi communication remote i/o controller
Table of Contents

Advertisement

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:
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 tWF-DA1PD2R1 controller supports 6 function codes,
which allows the reading and writing of data contents of registers.
Function Code
01 (0x01)
02 (0x02)
03 (0x03)
04 (0x04)
05 (0x05)
06 (0x06)
tWF-DA1PD2R1
tWF-DA1PD2R1 User's Manual
Length
Description
Identification of Request/Response transaction – Copied
2 bytes
from request to response
2 bytes
0 = Modbus protocol
2 bytes
Number of following bytes - Includes the Unit Identifier
1 byte
Identification of remote slave
Table 5-1: MODBUS Application Protocol Header
Write Single Coil/Clear Counter/Force Function mode
Table 5-2: Supports Function Codes of tWF series
User's Manual (Rev1.0, APR./2019) ------------- 27
Descriptions
Read Coil Status
Read Input Status
Read multiple AO Registers
Read analog Input Registers/Read counter
Write Single AO

Advertisement

Table of Contents
loading

Table of Contents