Skip to the content.

SHM Modbus - Modbus RTU Client

SHM Modbus > Modbus Clients > RTU

The modbus-rtu-client-shm is a simple command line based Modbus RTU client for POSIX compatible operating systems that stores the contents of its registers in shared memory.

The client creates four shared memories. One for each register type:

All registers are initialized with 0 at the beginning. The values from these registers (shared memory) are directly accessed by the Modbus server. The actual functionality of the client is realized by applications that read data from or write data to the shared memory.

Usage

modbus-rtu-client-shm [OPTION...]

Serial device options:

Shared memory options:

Modbus options:

None:
--monitor can have a strong performance impact.

Note:
Usually there is no need to specify --byte-timeout and --response-timeout

Examples

modbus-rtu-client-shm -d /dev/ttyUSB0 -i 1 --baud 9600

This command initializes the Modbus RTU client with Modbus client id 1, using serial communication via the device /dev/ttyUSB0 with a baud rate of 9600.

Install

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

Using the Modbus Collection Package: SHM Modbus

SHM Modbus is a collection of multiple tools to simulate a Modbus client.

Flatpak

The Flatpak package is available via Flathub as io.github.shmmodbus.shm-modbus.

modbus-rtu-client-shm is invoked by executing the following command:

flatpak run io.github.shmmodbus.shm-modbus modbus-rtu-client-shm

Snap

The snap package can be downloaded via the github release page.

modbus-rtu-client-shm is invoked by executing the following command:

shm-modbus.modbus-rtu-client-shm