![Mean Well CMU2C Скачать руководство пользователя страница 35](http://html1.mh-extra.com/html/mean-well/cmu2c/cmu2c_installation-manual_1757957035.webp)
63
5
5.3.3 MBAP Header Definition
MBAP Header consists of the following parts:
5.3.4 Function Code Description
The main purpose of the function codes is to tell the
what
server
kind of action to perform. For example: Function code 03 will
query the
to read holding registers and respond with
server
their contents
.
5.3.5 Data Field and Command Lists
Data field provides additional information by the
to
server
complete the action specified by the function code in the
client's request. The data field typically includes register
addresses, count values, and written data. There are several
forms according to the function codes.
Identification of a MODBUS
Request / Response transaction.
Initialized by the client and
recopied by the server from the
received request
.
0 = Modbus TCP, meaning a PDU
communication protocol
.
Number of following bytes
,
including Unit Identifier
,
Function code and Data Fields
.
Identification of a remote slave
connected on a serial line or on
other buses. Initialized by the
client and recopied by the server
from the received request (Not
for the purpose of Modbus TCP
to RTU gateway)
Fields
Transaction Identifier
Protocol Identifier
Length
Unit Identifier
Length
2 bytes
2 bytes
2 bytes
1 byte
Description
Function
Read Holding Register
Read Input Register
Preset Single Register
Write Multiple Register
Read Array Log
0x03
Code
0x04
0x06
0x10
0x64
64
5
FC = 03
Request:
FC = 04
Request:
FC = 06
Request:
Response:
Response:
Response:
N* = Quantity of Registers
N* = Quantity of Registers
Starting Address
Starting Address
Register Address
Byte Count
Byte Count
Starting Address
2 Bytes
2 Bytes
2 Bytes
1 Byte
1 Byte
2 Bytes
Quantity of Registers
Quantity of Input Registers
Register Value
Register Value
Input Register
Register Value
2 Bytes
2 Bytes
2 Bytes
N* x 2 Bytes
N* x 2 Bytes
2 Bytes