- Contain ModBus RTU Master and Slave implementation
- Support the following functions:
- Read Coils (0x01)
- Read Discrete Inputs (0x02)
- Read Holding Registers (0x03)
- Read Input Registers (0x04)
- Write Single Coil (0x05)
- Write Single Register (0x06)
- Write Multiple Coils (0x0F)
- Write Multiple registers (0x10)
- Possible to run master and slave functionality on one hardware platform
- Contain examples of:
- ModBus Master RTU implementation
- ModBus Slave RTU implementation
- ModBus Master & Slave implementation on one harwdware platform
- Library contain unit test and integration tests that can be reused in project if needed
TBD
Library contain an examples of three different configurations that can be implemented in project. The fallowin configurations allow to run device as:
- ModBus RTU Slave (ModBus RTU Sever)
- ModBus RTU Master (ModBus RTU Client)
- ModBus RTU Slave&Master (ModBus RTU Sever&Client)
- CMake installed
- Make or Ninja installed
- ARM GNU Toolchain (gcc-arm-none-eabi) installed
- STM32_Programmer_CLI installed
- ST-link (placed on Nucleo Board) installed
In order to test the slave node, any software that can simulate Modbus Master RTU is required. In my case I was using qModMaster
- Open the location you want to clone the repository to in your termina
- Clone the repository to your preferred localization
git clone https://github.com/niwciu/MODBUS.git
- Enter to MODBUS/examples/STM32G071RB_MODBUS_SLAVE
cd ./MODBUS/examples/STM32G071RB_MODBUS_SLAVE
- For Make type:
cmake -S ./ -B Debug -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug
cd Debug
make all
make flash
- For Ninja type:
cmake -S ./ -B Debug -G"Ninja" -DCMAKE_BUILD_TYPE=Debug
cd Debug
ninja
ninja flash
- In some cases Nucleo board requires plugging out and in a USB port to run the program.
- CMake installed
- Make or Ninja installed
- ARM GNU Toolchain (gcc-arm-none-eabi) installed
- STM32_Programmer_CLI installed
- ST-link (placed on Nucleo Board) installed
In order to test the Master node, any software that can simulate Modbus Slave RTU is required. In my case I was using xxx
- CMake installed
- Make or Ninja installed
- ARM GNU Toolchain (gcc-arm-none-eabi) installed
- STM32_Programmer_CLI installed
- ST-link (placed on Nucleo Board) installed
In order to test the Master node, any software that can simulate Modbus Slave RTU is required. In my case I was using xxx
For information about the configuration and usage of the library, as well as collaboration in the project please refer to MODBUS wiki