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. Read command
Forum Updated to NodeBB v4.3 + New Features

Read command

Scheduled Pinned Locked Moved Unsolved General and Desktop
capture read coof modbuse
4 Posts 2 Posters 906 Views 1 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.
  • C Offline
    C Offline
    Chobin
    wrote on last edited by
    #1

    Hi,
    I'm studying Modbus server example. I need to captare the read command of modbus master, but I don't understand how I can do it. I need to do this because I have to discriminate the write command from the read command. The qt example doesn't show how do this. I saw that there is a writen signal about client write command, but there isn't a read signal. I'm working with qt 5.8.

    Can someone help me, please?

    Many thanks in advance.

    Best regards,
    Chobin

    FlotisableF 1 Reply Last reply
    0
    • C Chobin

      Hi,
      I'm studying Modbus server example. I need to captare the read command of modbus master, but I don't understand how I can do it. I need to do this because I have to discriminate the write command from the read command. The qt example doesn't show how do this. I saw that there is a writen signal about client write command, but there isn't a read signal. I'm working with qt 5.8.

      Can someone help me, please?

      Many thanks in advance.

      Best regards,
      Chobin

      FlotisableF Offline
      FlotisableF Offline
      Flotisable
      wrote on last edited by
      #2

      @Chobin
      although I'm not familiar with modbus.
      but isn't dataWritten signal enough to discriminate read and write request?

      or you have some reason that you need to know the client sends a read request?

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Chobin
        wrote on last edited by
        #3

        Hi,

        I need to know when the client sends a read request because in this situation I have to cancel some parameters.

        If I set a breakpoint in the dataWritten signal handler: the software stops there when the client sends a write request, but when it sends a read request the software doesn't stop so I can't implement anything.

        I don't understood if it's possible to create an object to read the request type.

        Please, help me.

        Thank you,

        Chobin

        FlotisableF 1 Reply Last reply
        0
        • C Chobin

          Hi,

          I need to know when the client sends a read request because in this situation I have to cancel some parameters.

          If I set a breakpoint in the dataWritten signal handler: the software stops there when the client sends a write request, but when it sends a read request the software doesn't stop so I can't implement anything.

          I don't understood if it's possible to create an object to read the request type.

          Please, help me.

          Thank you,

          Chobin

          FlotisableF Offline
          FlotisableF Offline
          Flotisable
          wrote on last edited by
          #4

          @Chobin
          I think maybe subclass QModbuServer and reimpliment QModbusServer::processRequest or QModbusServer::processPrivateRequest can meet your need

          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