Modbus Server supported access

This page describes the data elements and data types supported by the Modbus Server.

Variables

The Modbus Server supports the following Modbus registers as variables:

Variable Description
Coils Table region of read only single Bit variables.
Discrete Inputs Table region of readable and writeable single Bit variables.
Input Registers Table region of 16 bit (Word) read only variables.
Holding Registers Table region of 16 bit (Word) read and write variables.

Data types, data conversion and addressing

The Modbus Server supports the Modbus data types and the runtime data types as follows:

Modbus data type Size Runtime data type
Bit 1 Byte BOOL
Word 2 Bytes INT2
Unsigned Word 2 Bytes UINT2
Double 4 Bytes (Two Contiguous Words) INT4
Unsigned Double 4 Bytes (Two Contiguous Words) UINT4
Floating Point 4 Bytes (Two Contiguous Words) FLOAT4
String Multiple Contiguous Words of a predetermined length STRING

The Modbus data types are supported in the runtime environment wherever a variable is accessed and the variable is associated with a Modbus Server. Some examples are:

  • Transport map data type parameters
  • Trigger data type parameters
  • Trigger action variable data type parameters
  • From the Workbench > Devices > Variables tab Read and Write functions.

The data representations in the Modbus Server, runtime and the Workbench are supported by the necessary data conversion functions (such as Words to Float4).

The variable addressing supports the assignment of a variable of one data type into a variable with a different data type at the correct starting address location. One way to see this variable addressing support is to use the Workbench > Devices > Variables tab Read and Write functions by right clicking on a data element and reading or writing as a type different than the data element.

The Variable panel can also display values in hexadecimal format. This may be a preferable way to view the data in the Content array in the Message variables.

Limitations

  • The Modbus Server does not support the reading or writing of individual bits within a 16 bit data element.
  • Reading and writing String data into a contiguous group of word based data elements is not supported.