RT-Thread-packages / freemodbus

A Modbus ASCII/RTU and TCP implementation
Other
227 stars 101 forks source link

Seldom Nonresponses #24

Open j-broome opened 1 year ago

j-broome commented 1 year ago

Running the example rtu slave with no flow control. Just using USB to UART0 for now. When I use FinSH to run the slave demo, everything seems to work, but Modbus Poll has shown occasionally the slave does not respond. I tried adjusting the priority from 10 to 5 so it wasn't fighting with the main task, but still seeing the slave not respond sometimes.

Since the terminal is running on uart0, when I run the slave from uart0, does it hand the port off or is that where my issues are coming from?

image

j-broome commented 1 year ago

I have the demo running on UART port 1 (GP4/pin 6 and GP5/ pin 7). I have Modbus Poll polling 10 holding registers 0 through 9 every second. I run the slave demo through FinSH as suggested: image Modbus Poll Setup: image image Register 3 is incrementing as per the sample code: image But here is the problem (7 out of 132 messages have experienced a transmit timeout) that I was able to screenshot showing the communication log: image

Any suggestions? This is the example with no modifications other than correcting the Pico systick in RT per: https://github.com/RT-Thread/rt-thread/pull/6242/commits/

j-broome commented 1 year ago

The only thing I did notice I had incorrect was the parity, but still seeing the same result after recompiling and trying again. Changed it to Even Parity per the demo setup.