5 Implementation of Modbus TCP
5.1 Common Modbus description
XI/ON: XNE-GWBR-2ETH-MB
10/2011 MN05002008Z-EN
www.eaton.com
51
If an error related to the Modbus function requested occurs, the field contains an exception
code that the server application can use to determine the next action to be taken.
5.1.2
Data model
The data model distinguishes 4 basic data types:
For each of these basic data types, the protocol allows individual selection of 65536 data
items, and the operations of read or write of those items are designed to span multiple
consecutive data items up to a data size limit which is dependent on the transaction function
code.
It’s obvious that all the data handled via Modbus (bits, registers) must be located in device
application memory.
Access to these data is done via defined access-addresses (see Chapter 5.3 Modbus regis-
ters, Page 54).
The example below shows the data structure in a device with digital and analog in- and
outputs.
Figure 35:
Modbus data
transmission
(acc. to Mod-
bus-IDA)
Table 8:
Data types for
Modbus
Data type
Object
type
Access
Comment
Discrete
Inputs
Bit
Read
This type of data can be provided by an I/O
system.
Coils
Bit
Read-Write This type of data can be alterable by an application
program.
Input
Registers
16-Bit,
(Word)
Read
This type of data can be provided by an I/O
system.
Holding Regis-
ters
16-Bit,
(Word)
Read-Write This type of data can be alterable by an application
program.