Skip to content

Commit 46c2414

Browse files
committed
Version 0.2.0 based on ModbusLib submodule
1 parent e72faaf commit 46c2414

30 files changed

+41
-26
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "src/modbus"]
2+
path = src/modbus
3+
url = https://github.com/serhmarch/ModbusLib

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,41 @@ Software implements such Modbus functions as:
1515
* 15 (0x0F) - `WRITE_MULTIPLE_COILS`
1616
* 16 (0x10) - `WRITE_MULTIPLE_REGISTERS`
1717

18+
ModbusTools work with Qt Framework version 5 (5.8 or later).
19+
It based on `ModbusLib` cross platform library project:
20+
21+
https://github.com/serhmarch/ModbusLib
22+
23+
1824
## About Modbus Client
1925

2026
The client implements access to a remote Modbus device. However, the client can work not only with one device, but with several devices that can be connected to a single network, which is especially useful when working with RTU and ASCII protocols, when access to all Modbus servers is realized through a single serial port. However, it can also be useful when using the TCP version of the protocol, for example, if you use the TCP->RTU bridge.
2127

2228
All work is done within a single project. The main entities in the project are Port, Device and DataViewItem. Port contains network settings for both TCP/IP and serial ports. Device contains settings for a single device (such as Modbus Unit Address, etc.). The DataViewItem contains a single data unit to be read from the remote device and has many formats to represent the current data.
23-
![ModbusClient-img001](https://github.com/serhmarch/ModbusTools/assets/10882627/93fccbad-3eca-415f-8454-c0e8cd890d51)
29+
![ModbusClient-img001](./help/client/ModbusClient-img/ModbusClient-img001.png)
30+
31+
The client has the ability to process one separate Modbus function with full configuration of the parameters of this function, view/edit read/write data with the format specified, view Modbus packets of this function:
32+
33+
![ModbusClient-img017](./help/client/ModbusClient-img/ModbusClient-img017.png)
2434

2535
## About Modbus Server
2636

2737
The server implements Modbus server device and works like Modbus simulator. However, the server can not only simulate single device, but can simulate several devices that can be connected to a single network, which is especially useful when working with RTU and ASCII protocols, when access to all Modbus servers is realized through a single serial port. However, it can also be useful to simulate Modbus network using the TCP version of the protocol, for example, if you use the TCP->RTU bridge, Modbus server can replace this bridge with remote devices for testing purposes.
2838

2939
All work is performing within a single project. The main entities in the project are Port, Device, DataViewItem and Action. Port contains network settings for both TCP/IP and serial ports. Device contains settings for a single device (such as Modbus Unit Address, memory size etc). The DataViewItem contains a single data unit to be read/write from the device and has many formats to represent the current data. Action provides simulation capabilities (automatic change of device memory values).
3040

31-
![ModbusServer-img001](https://github.com/serhmarch/ModbusTools/assets/10882627/e53d9d87-1b77-4f8c-9ad9-1b4c967219c7)
41+
![ModbusServer-img001](./help/server/ModbusServer-img/ModbusServer-img001.png)
42+
43+
The server has the ability to simulate data (actions, automaticaly change values) with predefined action types (`Actions` tab near `LogView`, menu `View->Actions` window and menu `Actions`):
44+
* `Increment` - changing value by adding or subtracting (if incrementValue < 0) incrementValue
45+
* `Sine` - sine function with parameters of period, shift, amplitude
46+
* `Random` - randomly changing values with specified range
47+
48+
![ModbusServer-img010](./help/server/ModbusServer-img/ModbusServer-img010.png)
3249

3350
## Binary
3451

35-
Modbus Tools binary using Qt5.15.2 version lib.
52+
Modbus Tools binary using Qt5.8 version of the framework or later.
3653
Modbus Tools was compiled for Windows 64 bit and Ubuntu 22.04.
3754
Binary files are located in <root>/bin/
3855

bin/Ubuntu/README.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Building ModbusTools from source on Ubuntu
22

3-
The ModbusTools project requires Qt version 5.15. Therefore, at least Ubuntu 22.04 LTS is required.
4-
Ubuntu 20.04 has qttools with Qt version 5.12.
3+
The ModbusTools project requires Qt version 5.8 or later.
54

65

76
1. Update package list:
@@ -16,7 +15,7 @@ Ubuntu 20.04 has qttools with Qt version 5.12.
1615

1716
3. Install Qt tools:
1817
```console
19-
$ sudo apt-get install qtbase5-dev qttools5-dev libqt5serialport5-dev
18+
$ sudo apt-get install qtbase5-dev qttools5-dev
2019
```
2120

2221
4. Check for correct instalation:
@@ -35,12 +34,6 @@ Ubuntu 20.04 has qttools with Qt version 5.12.
3534
libQt5Help.so.5: /usr/lib/x86_64-linux-gnu/libQt5Help.so.5
3635
libQt5Help.so.5.15: /usr/lib/x86_64-linux-gnu/libQt5Help.so.5.15
3736
libQt5Help.so.5.15.3: /usr/lib/x86_64-linux-gnu/libQt5Help.so.5.15.3
38-
$ whereis libQt5SerialPort*
39-
libQt5SerialPort.prl: /usr/lib/x86_64-linux-gnu/libQt5SerialPort.prl
40-
libQt5SerialPort.so: /usr/lib/x86_64-linux-gnu/libQt5SerialPort.so
41-
libQt5SerialPort.so.5: /usr/lib/x86_64-linux-gnu/libQt5SerialPort.so.5
42-
libQt5SerialPort.so.5.15: /usr/lib/x86_64-linux-gnu/libQt5SerialPort.so.5.15
43-
libQt5SerialPort.so.5.15.3: /usr/lib/x86_64-linux-gnu/libQt5SerialPort.so.5.15.3
4437
```
4538

4639
5. Install git:
@@ -53,7 +46,7 @@ Ubuntu 20.04 has qttools with Qt version 5.12.
5346
$ cd ~
5447
$ mkdir src
5548
$ cd src
56-
$ git clone https://github.com/serhmarch/ModbusTools.git
49+
$ git clone --recursive https://github.com/serhmarch/ModbusTools.git
5750
```
5851

5952
7. Create and/or move to directory for build output, e.g. `~/bin/ModbusTools`:
@@ -91,9 +84,5 @@ Ubuntu 20.04 has qttools with Qt version 5.12.
9184
lrwxrwxrwx 1 march march 16 May 6 18:44 libcore.so.0 -> libcore.so.0.1.4
9285
lrwxrwxrwx 1 march march 16 May 6 18:44 libcore.so.0.1 -> libcore.so.0.1.4
9386
-rwxr-xr-x 1 march march 993376 May 6 18:44 libcore.so.0.1.4
94-
lrwxrwxrwx 1 march march 18 May 6 18:43 libmodbus.so -> libmodbus.so.0.1.0
95-
lrwxrwxrwx 1 march march 18 May 6 18:43 libmodbus.so.0 -> libmodbus.so.0.1.0
96-
lrwxrwxrwx 1 march march 18 May 6 18:43 libmodbus.so.0.1 -> libmodbus.so.0.1.0
97-
-rwxr-xr-x 1 march march 183336 May 6 18:43 libmodbus.so.0.1.0
9887
-rwxr-xr-x 1 march march 907872 May 6 18:47 server
9988
```

bin/Ubuntu/x64/client

2.11 KB
Binary file not shown.

bin/Ubuntu/x64/libcore.so

21.8 KB
Binary file not shown.

bin/Ubuntu/x64/libcore.so.0

21.8 KB
Binary file not shown.

bin/Ubuntu/x64/libcore.so.0.1

-979 KB
Binary file not shown.

bin/Ubuntu/x64/libcore.so.0.1.5

-979 KB
Binary file not shown.

bin/Ubuntu/x64/libcore.so.0.2

1000 KB
Binary file not shown.

bin/Ubuntu/x64/libcore.so.0.2.0

1000 KB
Binary file not shown.

0 commit comments

Comments
 (0)