DOCA0157EN-08

Modbus TCP/IP Functions

General Description

The Modbus messaging service provides a client/server communication between devices connected on an Ethernet TCP/IP network.

The client/server model is based on four type of messages:

  • Modbus Request, the message sent on the network by the client to initiate a transaction.

  • Modbus Indication, the request message received on the server side.

  • Modbus Response, the response message sent by the server.

  • Modbus Confirmation, the response message received on the client side.

The Modbus messaging services (client/server model) are used for real time information exchange between:

  • Two device applications.

  • Device application and other device.

  • HMI/SCADA applications and devices.

  • A PC and a device program providing on line services.

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 contains the following fields:

Fields

Length

Description

Client

Server

Transaction Identifier

2 bytes

Identification of a Modbus Request/Response transaction

Initialized by the client

Recopied by the server from the received request

Protocol Identifier

2 bytes

0 = Modbus protocol

Initialized by the client

Recopied by the server from the received request

Length

2 bytes

Number of following bytes

Initialized by the client (Request)

Initialized by the server (Response)

Unit Identifier

1 byte

Identification of a remote server connected on a serial line or on other buses

Initialized by the client

Recopied by the server from the received request

Table of Modbus Functions

The following table describes in detail the functions supported by the wireless devices of the PowerTag Link gateway:

Function Code

Function Name

01

Read n output or internal bits

02

Read n input bits

03

Read n output or internal bits

05

Write 1 bit

06

Write 1 word

08

Modbus diagnostic data (refer to Function 8: Modbus Diagnostics)

15

Write n bits

16

Write n words

43-14

Read identification (refer to Function 43-14: Read Device Identification (Basic))

43-15

Read the date and time (refer to Function 43-15: Read Date and Time)

43-16

Write the date and time (refer to Function 43-16: Write Date and Time)

100-4

Read non-adjacent words where n ≤ 100 (refer to Function 100-4: Read Non-Adjacent Registers)

QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?