Code Monkey home page Code Monkey logo

modbusplcsimulator's Introduction

modbusPlcSimulator

multi modbus slave devices simulator (modbus server, works as PLC devices)

Chinese version

1.purpose

  • This program is mainly used to simulate MODBUS devices. Through configuration files, multiple devices can be simulated at once, starting and stopping with one key.
  • Support to view the internal value of register and MODBUS client access log.
  • Support automatic data refresh by providing * _data.csv file.

Program run window screenshot.png

Register display window screenshot-register.png

2. How to use

  • After compiling, copy the config directory to the same directory as the executable exe. After configuring the CSV file correctly, you can use it.
  • Click the play button in the play window to refresh the data according to the CSV. When refreshing, select a row from the [data. CSV] to refresh the data.
  • Do not close the play window. Currently, closing the play window will end the data refresh thread.
  • You can view the underlying access of Modbus Protocol in the log window, and the Modbus reading and writing are recorded.
  • If you don't want to comile it. You just need download and run it. Go directly to [Release Page] (https://github.com/alongl/modbusplcsimulator/releases) to download this program

3. Principle

  • PLC provides Modbus protocol, which can be simulated by providing MODBUS service. In the past, modsim was mainly used for simulation. In this way, only one device can be simulated at a time, and the operation is relatively troublesome. This program is easy to operate and use. It only needs to run, that is, it can simulate multiple devices at the same time, and it is convenient to debug the Modbus acquisition software.
  • In the future, more functions can be added, such as automatic simulation of device operation.

4. Profile introduction

  • App.cfg specifies the device configuration file loaded when the program starts. The default is default.csv, which is in the config directory.
  • Default.csv configures all types in a farm and the ports that MODBUS listens to locally. The port is generally 1501, 1502... Etc. to avoid conflict with the port used by other programs in the system.
  • Pcs.csv is configured to simulate the type and value of Modbus registers used by a PCS device.
  • Pcs_data.csv is the data to refresh per second.

5. Precautions

    1. address Modbus protocol uses 1 more address than the actual address. The address displayed when viewing with modscan +1. It is recommended to set offsetaddone=1 in the configuration file app.cfg
    1. Value type At present, the int type is processed as a 16 bit 1 register. Use DWORD for 32-bit int Float is treated as 32-bit. Real is treated as a 32-bit floating-point number.

6. Todo

    1. The value of floating-point number displayed in register viewer
    1. Set the value of variable bit by bit

modbusplcsimulator's People

Contributors

alongl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.