Platforms
Product Lines
Platforms Safecrete Safewall Mine Operating System (Coming Soon)
On this page

Modbus Connector

Overview

This documentation will help you set up the Modbus connector for the IndustryOS IoT Gateway. The Modbus is a widely used protocol for industrial automation and control systems, allowing devices to communicate with each other over a network. This connector allows seamless integration with the IndustryOS platform.

Configuration Modes

The Modbus connector can be configured in two modes:

  • Basic mode - designed for users who are new to IndustryOS IoT Gateway and want to quickly set up the connector with minimal configuration
  • Advanced mode - intended for experienced users who need more control over the configuration

General Settings

This configuration section contains general connector settings:

  • Name - connector name used for logs and saving to persistent devices
  • Logs configuration - settings for local and remote logging
  • Report strategy - strategy for sending data to IndustryOS

Master Connections (Gateway as a Master)

A Modbus Master is used to query data from Modbus servers (slaves).

Servers (Slaves) Settings

A Modbus Slave is a device that responds to requests from a Modbus Master. Configuration parameters:

  • Unit ID - ID of the Modbus slave
  • Device name - name of the device on the platform
  • Device profile - device profile name on the platform
  • Report strategy - strategy for sending data to IndustryOS

Connection Settings

Modbus supports three connection types:

TCP Connection

  • Host - hostname or IP address of the Modbus server
  • Port - port of the Modbus server for connection
  • Method - type of a framer, either Socket or RTU

UDP Connection

  • Similar parameters to TCP

Serial Connection

  • Port - serial port for connection
  • Method - type of framer (ASCII, RTU)
  • Baudrate - baud rate for serial connection
  • Stopbits - number of stop bits
  • Parity - parity checking (E, O, N)
  • Bytesize - number of bits in a byte

Advanced Connection Settings

Additional configuration options:

  • Connection timeout - timeout in seconds for connecting
  • Byte order - LITTLE or BIG
  • Word order - LITTLE or BIG
  • Retries - retry sending data to the master
  • Poll period - period in milliseconds to check data
  • Connect attempt time - waiting period before connecting
  • TLS - TLS connection configuration (TCP/UDP only)

Data Mapping

Attributes and Time Series

Configuration for reading data from Modbus registers:

  • Key - key of the attribute or time series on the platform
  • Type - data type of the Modbus register (16int, 32int, string, bits, etc.)
  • Function code - Modbus function code for reading (1, 2, 3, 4)
  • Objects count - number of registers to read
  • Address - address of the register on the Modbus server
  • Modifier - multiplier or divider for the value

Requests Mapping

Attribute Updates

Allows updating register values from IndustryOS platform:

  • Key - shared attribute name
  • Type - data type
  • Function code - Modbus function code for writing (5, 6, 15, 16)
  • Objects count - count of objects to write
  • Address - object address

RPC Requests

Allows sending RPC commands to devices:

  • Method name - RPC method name
  • Type - data type
  • Function code - function code for processing
  • Objects count - count of objects to process
  • Address - object address

Server (Gateway as a Slave)

Gateway can run as a Modbus slave to store data and send updates to the platform.

Connection Settings

Similar to Master connections (TCP, UDP, Serial).

Data Mapping

Initial values for registers:

  1. Holding registers
  2. Coils initialiser
  3. Input registers
  4. Discrete inputs

Additional Information

Modbus Functions

Supported Modbus functions:

Read data:

  • 1 - Read Coils
  • 2 - Read Discrete Inputs
  • 3 - Read Multiple Holding Registers
  • 4 - Read Input Registers

Write data:

  • 5 - Write Coil
  • 6 - Write Register
  • 15 - Write Coils
  • 16 - Write Registers

Data Types

Supported data types:

  • string, bytes, bits
  • 16int, 16uint, 16float
  • 32int, 32uint, 32float
  • 64int, 64uint, 64float

Next Steps

Explore guides related to main IndustryOS features:

  • Data Visualisation
  • Device attributes
  • Telemetry data collection
  • Using RPC capabilities
  • Pipeline