I am currently creating an HMI, using Qt 5.6.0; MSVC 2013, 32-bit, to communicate with external devices via serial port using the Modbus RTU protocol. I have three such devices. Call them A, B, and C. My code, which sends a customized string and then waits (~100 milliseconds) and checks for a reply: Simple tool to send custom strings and receive a reply
My code successfully communicates with A and B. But, when I attempt to communicate with device C, I 'see' no reply when I read from the input buffer. However: 1. There are LEDs which indicate data flowing on Rx as well as Tx lines. Both light up, indicating that traffic has gone both ways 2. The Windmill software known as ComDebug is successfully communicating with A, B, AND C.
I have recently modified my code to poll the serial port every 20 milliseconds for 5000 milliseconds but it has made no difference. I have no idea where to even begin looking for the source of this bug. Any suggestions are welcome!