Overview of Modbus RTU protocol

MindSphere supports the Modbus protocol for the MindConnect IoT2040 and MindConnect Nano plugin. You can select the protocol type Modbus RTU while adding a new data source in Asset Manager.

NOTE

Modbus configuration

The Modbus configuration view is only visible after a successful onboarding of the MindConnect IoT2040/Nano. The MindConnect Nano Version must be higher than V3.3.0.2.

The following picture shows the protocol selection in Asset Manager:

124414175243.png

For more information about how to create a new data source see chapter AUTOHOTSPOT.

Modbus RTU data source parameter

In order to connect a Modbus RTU device, you need to select the Modbus RTU protocol and enter the following data source parameters:

Parameter

Description

Serial Port

Available serial ports:

  • COM1

  • COM2

Serial Type

Supported serial communication standards:

  • RS232

  • RS422

  • RS485 

Baud rate

Baud rate for serial communication:

  • 9600

  • 2400

  • 4800

  • 19200

  • 38400

  • 57600

  • 115200

Data bits

Data bits for serial communication:

  • 5

  • 6

  • 7

  • 8

Stop bits

You can select the number of stop bits for serial communication:

  • 1

Parity

Parity for serial communication:

  • Odd

  • None

  • Even

Termination

Onboard termination:

  • On 

  • Off  

The following parameters are optional and can be adjusted for collecting data from slow Modbus devices:

Parameter

Description

byteTimeout

You can set the timeout interval between two consecutive bytes of the same message received from the Modbus device. If the delay between is longer than the given timeout, an error will be generated. 

Range:

500ms (default) … 2000ms

responseTimeout

You can set the timeout interval used to wait for a response from the Modbus device. If the waiting before receiving the response is longer than the given timeout, an error will be generated.

Range:

500ms (default) … 60000ms

responseSuspensionTime

If a byte timout or a response timeout was detected, then this waiting time is added before the next request is started. During this time any response from the Modbus device will be flushed.

Range:

0ms … 45000ms. (default: 1000ms)

For Modbus RTU it is recommended to set the value to 10000 ms. If the default value 0 ms is set, any incoming incorrect responses will not be destroyed.

requestDelay

You can set the time between the response from the Modbus device and the next request to this Modbus device.

Range:

0ms (default) … 10000ms

Pin assignment of Modbus protocols

The following table shows the pin assignment for the Modbus RTU protocol:

Pin

RS 485

RS 422

RS 232

1

Data- Transmit / receive data - (I/O) for half-duplex mode

TX- Transmitted data - (O) for full-duplex mode

Not supported

2

Data+ Transmit / receive data+ (I/O) for half-duplex mode

TX+ Transmitted data + (O) for full-duplex mode

RxD Received data (I)

3

-

RX+ Receive data + (I) for full-duplex mode

TxD Transmitted data (O)

4

-

RX- Receive data - (I) for full-duplex mode

Not supported

5

M Signal ground

M Signal ground

M Ground

6

-

-

Not supported

7

-

-

Not supported

8

-

-

Not supported

9

-

-

Not supported

Modbus RTU data point parameter

In order to collect the data of your Modbus RTU device, you must add new data points.

The following picture shows the data point parameter window:

118588600075.png

The following table shows the parameter of the Modbus RTU data point window:

Parameter

Description

Data Type

Data type supported by backend (e.g. INT).

Function Type

Function type - depends on the type of the data (see manual of the Modbus device).

1: Read Coils

2: Read Inputs

3: Read Holding Registers

4: Read Input Registers

Currently function codes 1..4 are supported.

Slave Number

Address/Slave number of the Modbus device.

Start Address

Start address (offset) of the data.

Quantity

Quantity of data to be read.

VariableType

You can choose the following variable types of the Modbus data to be read:

1: char

2: unsigned char

3: short

4: unsigned short

5: long

6: unsigned long

7: float

8: double

9: ASCII-Text

Real Type

Real type - determines, if the registers of real values have to be processed in reversed order

0: Normal order

1: Reversed order

Response Address Offset

Offset of the data to return in register units.

Response Quantity

Quantity of the returned data. Only for string data  a value greater than 1 is supported.

Technical specification

Protocol

Description

Value

Data rate

Modbus RTU - RS485

Data provider

32

Max cable length

1200 m

max. 115,2 kBd

Modbus RTU - RS422

Data provider

10

Max cable length

1200 m

max. 115,2 kBd

Modbus RTU - RS232

Data provider

1

Maximum cable length

900 m

2,4 kBd

300 m

4,8 kBd

152 m

9,6 kBd

15 m

19,2 kBd

5 m

57,6 kBd

< 2 m

115,2 kBd