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

Faulty timeout in qmodbusrtuserialmaster_p.h

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.9.6
    • Fix Version/s: 5.12.0 Beta 3
    • Component/s: SerialBus: MOD Bus
    • Labels:
    • Environment:
      Distribution: Yocto Version: 2.4 (rocko)
      Hardware Platform: Embedded platform with PHYTEC core module.
    • Platform/s:
      Linux/Other display system
    • Commits:
      fcf05e2399a2d94af1c6a907221a95e3ab96ed1d (qt/qtserialbus/5.12)

      Description

      We use for our project qt5 with the following components:
      GUI, Modbus, DBus, Qml, SQL, etc. The event-loop processes all named components. At the moment we have the problem with the Modbus. We get the following debug output:

      15:28:31.723 [debug] qt.modbus.lowlevel: (RTU client) Sent Serial ADU: 0x0110006000060c0000ffffffff00000000000012f3
      
      15:28:31.749 [debug] qt.modbus.lowlevel: (RTU client) Response buffer: "0110006000064015"
      
      15:28:31.750 [debug] qt.modbus: (RTU client) Received ADU: "0110006000064015"
      
      15:28:31.752 [debug] qt.modbus: (RTU client) Send successful: 0x10006000060c0000ffffffff000000000000
      
      15:28:36.641 [debug] qt.modbus: (RTU client) Receive timeout: 0x10006000060c0000ffffffff000000000000

      It seems that the Modbus Response has arrived faster than switching to the "Receive" state.

      case Send: // class QModbusRtuSerialMasterPrivate
       ....
       } else {
        qCDebug(QT_MODBUS) << "(RTU client) Send successful:" <<  
        m_current.requestPdu;
        m_state = Receive;
        m_responseTimer.start(m_responseTimeoutDuration);
        }
        break;
      

       Modbus Settings:

      Parity: even
      Baudrate: 115200 Bd
      Databits: 8
      Stop bits: 1
      Response Time: 200 ms
      Number of retries: 0  

        Attachments

        1. bug_qt_modbus.txt
          1 kB
          Yevgeniy Ruts
        For Gerrit Dashboard: QTBUG-69188
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            ablasche Alex Blasche
            Reporter:
            yruts Yevgeniy Ruts
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes