Skip to content

SysMan-One/mbus-gw-t2r

Repository files navigation

MODBUS TCP to RTU gateway

A yet another gateway for MODBUS TCP to RTU (Limited Edition especialy for LAB240 (tm) Team)

NAPI World

This project is developed and maintained by the NAPI Lab team and is primarily tested on NAPI industrial single-board computers based on Rockchip SoCs.

NAPI Boards

If you are looking for a reliable hardware platform to run modbus_slave in production, check out the NAPI board lineup:

Welcome to NAPI Wolrd (https://github.com/napilab/napi-boards) for more information!

Right now is available:

  • NAPI2 — RK3568J, RS-485 onboard, Armbian
  • NAPI-C — RK3308, compact, industrial grade

Introduction

A simple TCP-to-RTU gateway for MODBUS protocol is supposed to be used as a tutorial for:

  • a development of programming skills
  • a programming for I/O on RS323 and RS-485 ports
  • basic checking of work of MODBUS-capable devices
  • build two-directionional gateways for TCP-to-RTU and RTU-to-TCP (not implemetde yet)

Main features & advantages

  • support of RS-232 and RS-485 specific signaling
  • single process with multithreaded architecure for high performance
  • coordinating access between multiple TCP-clients is connected to single serial bus\device
  • robust error handling ad recognising serial-line garbage

Build from sources

$ git clone  https://gitlab.com/SysMan-One/mbus-gw-t2r
$ cd mbus-gw-t2r
$ git submodule update --init

$ mkdir build
$ cd build
$ cmake ../CMakeLists.txt -B ./

or

$ cmake ../CMakeLists.txt -DCMAKE_BUILD_TYPE=Debug -B ./
$ make -s

Run & Configuration rules

Quick start

General CLI format to start gateway
./build/mbusgw-t2r <CLI options> --settings=<network-n-serials-settings.fil>
Example:
./build/mbusgw-t2r --trace --settings=modbus-t2r-settins.conf
CLI options
Option Description
trace Enable extensible diagnostic output. Useful for for debug and troubleshouting purpose.
logfile=<fpsec> Set a file name to accept logging output
logsize=<number> Limit size of log file.
settings=<fspec> Provide a rin-time configuration for network stuff and serial devices
Settings options

Check an example of settings file for reference of parameters and rules of configurations

Authors and acknowledgment

Developer: Ruslan (AKA : The BadAss SysMan) Laishev VAX/VMS bigot, BMF.

About

A yet another gateway for MODBUS TCP to RTU (by StarLet Team Edition)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors