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. QTModbus
Qt 6.11 is out! See what's new in the release blog

QTModbus

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 879 Views 2 Watching
  • 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.
  • _ Offline
    _ Offline
    __vnv__
    wrote on last edited by
    #1

    Hello everyone,

    I am trying to use encapsulated interface transport inside my modbus slave (based od mobus server example).

    I have to use 0x2b function code wich is listed in documentation but it seems that there is no way to get it in QModbusServer Class.

    Signal dataWritten is only supporting default modbus registers and coils (doc).

    Could anyone please point in the right direction how to solve this?

    Kind regards!

    1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by Kent-Dorfman
      #2

      look for
      (QModbusDataUnit::DiscreteInputs == 1) in your slot connected to the dataWritten signal

      It "looks like" modbus function 2 is mapped to register type 1 for purposes of reading the data.

      The dystopian literature that served as a warning in my youth has become an instruction manual in my elder years.

      1 Reply Last reply
      0
      • _ Offline
        _ Offline
        __vnv__
        wrote on last edited by
        #3

        @Kent-Dorfman said in QTModbus:

        look for
        (QModbusDataUnit::DiscreteInputs == 1) in your slot connected to the dataWritten signal

        It "looks like" modbus function 2 is mapped to register type 1 for purposes of reading the data.

        Thank you for reply, but where does it "look like" it is mapped to 0x2b function code .
        Do you mean 0x2 or 0x2b , I am talking about 0x2b which is encapsulated interface transport.

        1 Reply Last reply
        0
        • Kent-DorfmanK Offline
          Kent-DorfmanK Offline
          Kent-Dorfman
          wrote on last edited by Kent-Dorfman
          #4

          my bad. thought it said 0x02. I would "non-authoritatively" state that function 0x2b is probably not directly supported in the QtModbus module.

          The dystopian literature that served as a warning in my youth has become an instruction manual in my elder years.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dbHu
            wrote on last edited by
            #5

            I have meet the same problem as you. And I solved it by using function sendRawRequest which can set different function code.

            1 Reply Last reply
            1

            • Login

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