Giter Site home page Giter Site logo

skogach / qslave Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maisvendoo/qslave

0.0 0.0 0.0 82 KB

Modbus network emulator

License: GNU General Public License v2.0

Shell 1.22% C++ 88.08% C 1.84% Objective-C 4.96% QMake 2.06% Inno Setup 1.84%

qslave's Introduction

QSlave: Modbus network emulator

Introduction

This application is software emulator of Modbus network. It emulate several slave devices connected by virtual network. This network connected to the physical Modbus network.

Adapter USB RS485 required for connection QSlave with physical network.

1. Installation

1.1. Building from sources

  1. Get sources from repository
$ mkdir qslave
$ cd qslave
$ git clone https://github.com/maisvendoo/qslave.git qslave
  1. Make build directory
$ mkdir build
$ cd build
  1. Generate Makefile
$ qmake ../qslave
  1. Run make
$ make

1.2. Windows setup

Download last release from release page. Run qslave-vX.Y.Z-setup.exe and folow installation instructions.

2. Setup virtual network configuration

You need several configuration files in XML format for setup network configuration. You can see example configuration in directory cfg/example. The list of virtual slaves is in file exmaple.net

<?xml version="1.0" encoding="UTF-8" ?>
<Config>
	<Slave>
		<!-- Slave description -->
		<Description>Traffic light</Description>
		<!-- Slave ID -->
		<id>1</id>
		<!-- Slave config file (without *.xml extension) -->
		<config>traffic-light</config>
	</Slave>
</Config>

Earch slave has own config file. You can see file traffic-light.xml for example of slave configuration

<?xml version="1.0" encoding="UTF-8" ?>
<Config>
	<!-- Coils list -->
	<Coil>
		<address>16</address>
		<description>Red signal</description>
		<value>0</value>
	</Coil>
	<Coil>
		<address>17</address>
		<description>Yellow signal</description>
		<value>0</value>
	</Coil>
	<Coil>
		<address>18</address>
		<description>Green signal</description>
		<value>0</value>
	</Coil>
	
	<!-- Discrete inputs list -->
	<DiscreteInput>
		<address>0</address>
		<description>Ready</description>
		<value>1</value>
	</DiscreteInput>
	
	<!-- Holding registers list -->
	<HoldingRegister>
		<address>5</address>
		<description>Signal activity time</description>
		<value>15</value>
	</HoldingRegister>
	
	<!-- Input registers list -->
	<InputRegister>
		<address>2</address>
		<description>Signals count</description>
		<value>3</value>
	</InputRegister>
</Config>

3. Load configuration and work with QSlave

  1. Run QSlave
  2. Load network configuration from *.net file (File -> Open config)

  1. Select device in device list. You can see all device data structures in application Windows

  1. Plugin USB RS485 adapter to you PC USB port. Adapter must connected to physical Modbus RTU network.
  2. Select connection parameters (port name, baudrate, etc.) and press connect button
  3. You can change all values in tables of device memory (Coils, Holding registers, Discrete inputs and Input registers). You also can see changes in coils and holding registers, when master device send data to virtual device.

qslave's People

Contributors

maisvendoo avatar iharuspex 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.