Skip to the content.

SHM Modbus

This project is a a collection of applications to simulate a Modbus TCP/RTU client.

It contains the following tools:

In addition, a QT6 GUI is included. It provides a subset of all SHM Modbus features.

Install

The application is available as shm-modbus in the Arch User Repository. See the Arch Wiki for information about how to install AUR packages.

Snap

The application is available as snap package. You can download it via the github releases page.

  1. download snap file
  2. install: sudo snap install --dangerous <shm-modbus_....snap>
  3. connect plugs:
    • sudo snap connect shm-modbus:shm
    • sudo snap connect shm-modbus:serial-port

Flatpak

The application is available as flatpak and published on flathub as io.github.shmmodbus.shm-modbus.

To install from the command line, use the following command:

flatpak install io.github.shmmodbus.shm-modbus

Use

A short Getting Started guide can be found here.

Memory layout

Each instance of a Modbus client (TCP and RTU) creates 4 shared memories. Two of them store discrete inputs and coils (binary values). The other two store the Modbus registers. (See the Modbus specification for details.)

Each binary value (discrete input or coil) is represented by one byte in the shared memory. As they are representing binary values, every non zero value of the byte is interpreted as 1.

The 16 bit Modbus registers are stored as 16 bit values (16 bit aligned) in the shared memory.

Common Problems

A list of common problems can be found here.