Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Modbus_RS485_LA
Qt 6.11 is out! See what's new in the release blog

Modbus_RS485_LA

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 792 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Modbus_RS485_LA
    wrote on last edited by
    #1

    Modbus cant able to read and write above 40300

    jsulmJ 1 Reply Last reply
    0
    • M Modbus_RS485_LA

      Modbus cant able to read and write above 40300

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Modbus_RS485_LA Is it a question?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • M Offline
        M Offline
        Modbus_RS485_LA
        wrote on last edited by
        #3

        we can't able to read and write 40300 above , how to solve the problem , so please any give the solution

        Ketan__Patel__0011K 1 Reply Last reply
        0
        • M Modbus_RS485_LA

          we can't able to read and write 40300 above , how to solve the problem , so please any give the solution

          Ketan__Patel__0011K Offline
          Ketan__Patel__0011K Offline
          Ketan__Patel__0011
          wrote on last edited by
          #4

          @Modbus_RS485_LA

          Question 1) are you trying read or write holdings or coils ?
          Question 2) did you try to read or write your holding registers or coils through index ? for example
          if you want to read or write 40001 Holding registers then pass value 0 as index
          if you want to read or write 40002 Holding registers then pass value 1 as index
          Use Index of your registers

          And try to provide some information when you create thread of your problem.

          1 Reply Last reply
          1
          • M Offline
            M Offline
            Modbus_RS485_LA
            wrote on last edited by
            #5

            1)yes, we are try to read and write for holding

            example:Modbus_screen.PNG
            void modbusMaster::on_readButton_clicked()
            {
            if (!modbusDevice)
            return;
            statusBar()->clearMessage();
            QModbusDataUnit readUnit(QModbusDataUnit::HoldingRegisters,300,10);
            if (auto *reply = modbusDevice->sendReadRequest(readUnit, 1)) {
            if (!reply->isFinished())
            connect(reply, &QModbusReply::finished, this, &modbusMaster::readReady);
            else
            delete reply; // broadcast replies return immediately
            } else {
            statusBar()->showMessage(tr("Read error: ") + modbusDevice->errorString(), 5000);
            }
            }

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved