BIN
docs/img/QmodMaster.jpg
Normal file
BIN
docs/img/QmodMaster.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 137 KiB |
33
docs/modbus_tcp.md
Normal file
33
docs/modbus_tcp.md
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# Modbus-TCP
|
||||||
|
This is the documentation of the Modbus-TCP task
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
- [Table of contents](#table-of-contents)
|
||||||
|
- [Initialization](#initialization)
|
||||||
|
- [Usage](#usage)
|
||||||
|
- [Guide](#Guide)
|
||||||
|
- [Extra](#Extra)
|
||||||
|
|
||||||
|
## Initialization
|
||||||
|
The Modbus task is initialized in the main function.
|
||||||
|
```c
|
||||||
|
// Initialize Modbus task
|
||||||
|
modbus_init();
|
||||||
|
```
|
||||||
|
## Usage
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Guide
|
||||||
|
|
||||||
|
- Set qmodmaster to tcp mode
|
||||||
|
- Set IP of device
|
||||||
|
- Set the device in multiple register mode
|
||||||
|
- Connect with the board
|
||||||
|
- Fill in the data as in the example
|
||||||
|
- Send the data
|
||||||
|
|
||||||
|
## Extra
|
||||||
|
|
||||||
|
The start addres is ignored and the timeout warnings arne normal because there is no response from my code back to QModMaster.
|
||||||
|
|
||||||
@@ -49,6 +49,7 @@ static err_t modbus_incoming_data(void* arg, struct tcp_pcb* pcb, struct pbuf* p
|
|||||||
char text[TEXT_LENGTH];
|
char text[TEXT_LENGTH];
|
||||||
uint32_t result_background = 0xff000000;
|
uint32_t result_background = 0xff000000;
|
||||||
uint32_t text_foreground_color = 0xff000000;
|
uint32_t text_foreground_color = 0xff000000;
|
||||||
|
|
||||||
LWIP_UNUSED_ARG(arg); // This is used to prevent a warning
|
LWIP_UNUSED_ARG(arg); // This is used to prevent a warning
|
||||||
|
|
||||||
// Putting underscores in the whole array
|
// Putting underscores in the whole array
|
||||||
|
|||||||
Reference in New Issue
Block a user