Skip to content

Modbus simulator CLI is a high-performance modbus TCP server with customizable simulation. Available as CLI tool or as docker image

Notifications You must be signed in to change notification settings

paulorb/modbus-simulator-cli

Repository files navigation

Modbus Simulator CLI

Reliability Rating Security Rating Bugs Vulnerabilities

Modbus simulator CLI is a high-performance modbus TCP server with customizable simulation

Please see the project website for documentation

Screenshot

Features

  • High performance TCP Server
  • 100% Kotlin code - JVM (Multiplatform)
  • Ability to associate memory registers with symbols (variable names)
  • Ability to create custom simulation which can during runtime set, clear variables, execute math operations over registers, deal with specific timing requirements
  • Available as CLI tool or as docker image

Registers

The table below shows the supported registers and which datatype and simulation operation can be performed for each register.

Register Datatype Operations
Coils (0x) BOOL Set, IfEqual
Input register (1x) BOOL Set, IfEqual
Discrete Input (3x) INT16 Set, Add, Sub, Random, Linear, Csv, IfEqual
Holding Registers (4x) INT16, FLOAT32 Set, Add, Sub, Random, Linear, Csv, IfEqual

Quick Start

  1. Compile with gradle and generate fat Jar
./gradlew shadowJar
  1. Run it with "-sr" argument which is the most basic simulation, consisting in generating random values each time a read operation is performed.
java -jar build/libs/modbus-simulator-cli-1.0-SNAPSHOT-all.jar -sr

For customization options check full documentation

Quick Start (for Docker)

  1. Pull the Modbus Simulator
docker pull paulorb/modbus-simulator-cli
  1. Run the Modbus Simulator
docker run --rm -p 5002:5002 paulorb/modbus-simulator-cli -sr

Author

Contact me on LinkedIn

About

Modbus simulator CLI is a high-performance modbus TCP server with customizable simulation. Available as CLI tool or as docker image

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published