beautypg.com

Modbus application protocol – Burkert Type 8640 User Manual

Page 95

background image

95

Configurationandparameter

settingsforModbusTCP

18.

CONFIGURATION AND PARAMETER
SETTINGS FOR MODBUS TCP

18.1. Modbus application protocol

The application protocol is organized independently of the transfer medium used, and follows the client-server
principle. When the request telegram is sent the client initiates a service call which the server answers with
a response telegram. The request and response telegrams contain parameters and/or data. The differences
between the standard Modbus telegram and the Modbus-TCP telegram are shown in the following graphic.

Whereas in standard Modbus communication the slave address and a CRC checksum are transmitted in addition
to the command code and data, in the case of Modbus TCP these functions are handled by the underlaid TCP
protocol.

Modbus telegram for serial RS-232-/RS-485 data transfer

Modbus telegram for TCP/IP data transfer

ADU

Modbus-TCP/IP-ADU

PDU

PDU

Slave address

MBAP Header

Command code

Command code

Data

Data

CRC

checksum

Figure 65:

Differences between the standard Modbus telegram and the Modbus-TCP telegram

In the following the interactions between the client and server are described based on the example of a "Read
Discrete Input" command:

The client uses this command to request reading of the server's digital inputs. The command code and the
parameters are sent to the server in the request telegram:
Example of request telegram

Function code

1 bytes

2

Start address

2 bytes

0 - 65535

Number of
inputs

2 bytes

1 - 2000

If the server has received the read command correctly, the desired input data is transmitted to the client in the
response telegram.
Example of response telegram

Function code

1 bytes

Number of

1 bytes

Input values

N bytes

N corresponds to the number of inputs divided by 8. If the division remainder is greater than 0, N is increased by
1 and the remaining bits are transferred in the last byte. Unneeded bits are filled out with zeros. If the server is
unable to deliver the requested data, instead of the response telegram it sends an error telegram to the client.

english

Type 8640