Modbus

Characteristics - Modbus

MODBUS is an application-layer messaging protocol, positioned at level 7 of the OSI model. It provides client/server communication between devices connected on different types of buses or networks. To learn more about the standard visit the MODBUS website.

Information Model Requirements

Configuration - Modbus

  1. Select Modbus/Tcp Client as Channel Type.

  2. Click the Configure button.

Modbus Tcp Client Setup
  1. Make sure the root model node is selected to configure the Modbus/TCP Client

  2. Enter the IP address and the port

  3. (Optional) Change the Connect interval if needed

  4. (Optional) Change the Reconnect interval if needed

  5. (Optional) Change the Receive interval if needed

ModbusTcpClientRootNodeConfig
  1. Select the complex variable node

  2. Enable the checkbox TCP Client connection configuration

  3. (Optional) Enable Autorefresh to specify the retrieval rate

  4. Select the Function Code

  5. (Optional) Change the Max update interval if needed

ModbusTcpClientComplexNodeConfig
  1. Select the complex variable node

  2. Enable the checkbox Variables configuration

  3. Select the Data type

  4. (Optional) Enter the register address

Note

If address is left empty, SMARTUNIFIER assumes that the Information Model structure is in line with the register addresses.

ModbusTcpClientVariableNodeConfig

Description of data type format:

Data Type

Size

Range

BYTE, USINT, UInt8

8 Bit

0 - 255

WORD, UINT, UInt16

16 Bit

0 - 65.535

DWORD,UDINT, UInt32

32 Bit

0 - 4.294.967.295

LWORD,ULINT, UInt64

64 Bit

0 - 2^64-1

SINT, Int8

8 Bit

–128 - 127

INT, Int16

16 Bit

–32.768 - 32.767

DINT, Int32

32 Bit

–2.147.483.648 - 2.147.483.647

LINT, Int64

64 Bit

–2^63 - 2^63-1

REAL, Float32

32 Bit

-3,402823e+38 - 3,402823e+38

LREAL, Float64

64 Bit

-1,7976931348623158e+308 - 1,7976931348623158e+308

Description of configuration properties:

Property

Description

Example

IP

Client IP

localhost

Port

Client port

502

Connection timeout

Time interval the connection times out

60

Reconnect interval

Time interval to reconnect to the client after loss of connection

5

Receive interval

TCP/IP receive timeout

50

Autorefresh

Automatic polling of Modbus server

2

Read function code

Function code used for reading variables from a modbus server

FC04

Max update interval

Minimum time between requests to the Modbus server (if autorefresh is not used)

60

Variable configuration Type

Format of variable

DWORD

Variable configuration Address

Address of the variable on the modbus server

0