Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75282

QModbusRTUSerialMaster erroneous request retransmissions overlap slave reply

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.13.0 Beta2
    • 5.12.2
    • SerialBus: MOD Bus
    • None

    Description

      I have run into the following issue: an application is polling a Modbus slave via RS485 using QModbusRTUSerialMaster. Under normal load conditions everything works fine, but if I put a high load on the GUI hence leading to delay in event loop processing I start to get invalid replies. After investigation it turned out that the retransmit timers get fired erroneously, overlapping the reply coming from the slave. The timeout is set to 500ms, but on this scope capture is visible that a second request is sent just 30ms after the first one, while the salve is in the process of replying:

       

      I have applied this changeset https://codereview.qt-project.org/#/c/256482/ and it seems to fix the issue, I have noticed no timeout failures so far. Just sharing this in case someone else encounters the same issue.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            heimrich Karsten Heimrich
            radolin Radoslav Kolev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes