Modbus data model, Mapping to tcp/ip, Connection-oriented structure – Burkert Type 8640 User Manual
Page 96

96
Configurationandparameter
settingsforModbusTCP
In addition to the "Read Discrete Input" service, Modbus defines a large number of other standard commands
listed in the specification. Additionally, function codes 65–72 and 100–110 can be used for custom user-defined
services. An overview of some unified (Public) Modbus services is provided in the following table:
Method
Data type
Service
Code
Access
Bit-wise
Inputs
Read Discrete Input
02
Read
Bit-wise
Outputs/Coils
Read Coils
01
Read
Bit-wise
Outputs/Coils
Write Single Coil
05
Write
Word-wise
Inputs
Read Input Register
04
Read
Word-wise
Outputs/Coils
Write Single Register
06
Write
Word-wise
Outputs/Coils
Write Multiple Register 16
Write
18.2. Modbus data model
The data model is simply structured and differentiates between four basic types:
• Discrete Inputs
• Coils (outputs)
• Input Register (input data)
• Holding Register (output data)
The definition and naming indicates the origins of the Modbus protocol. In present-day Modbus implementations
these basic definitions are applied very generously to the wide-ranging data types of modern automation devices.
The meanings and data addresses in each individual case must be specified by the manufacturer in the device
manual. Electronic device data sheets and cross-manufacturer engineering tools as in the case of modern-day
field bus systems do not (as yet) exist in the Modbus environment.
18.3. Mapping to TCP/IP
For data transfer in Ethernet-TCP/IP networks Modbus TCP uses the Transport Control Protocol (TCP) to
transmit the Modbus application protocol. In this, the parameters and data are embedded in the user data con-
tainer of a TCP telegram according to the encapsulation principle. During encapsulation (embedding), the client
generates a Modbus Application Header (MBAP) which enables the server to unambiguously interpret the
received Modbus parameters and commands. Only one Modbus application telegram may be embedded in one
TCP/IP telegram.
18.4. Connection-oriented structure
Before user data can be transferred via Modbus TCP, a TCP/IP connection must first be established between the
client and server. Port number 502 is reserved for Modbus TCP on the server side. The connection is typically
made automatically via the TCP/IP socket interface by the protocol software, which means it is fully transparent
for the application process. Once the TCP/IP connection between the client and server has been established, the
client and server can transfer as much user data as often as they want via that connection. The client and server
can set up multiple TCP/IP connections simultaneously. The maximum number depends on the capacity of the
TCP/IP interface. In cyclic transfer of input and output data the connection between the client and server is main-
tained continuously. For demand-based data transfer for parameters or diagnostic messages, the connection can
be cut when the data transfer is finished and re-established the next time communication is required.
english
Type 8640