• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Concurrency parameter

    Modbus4J general discussion
    2
    5
    3.5k
    Loading More Posts
    • 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.
    • P
      pentavalle
      last edited by

      Just taking a look at 1.13 release in CVS, I have seen that ModbusFactory.createRtuMaster and ModbusFactory.createAsciiMaster now requires an int "concurrency" parameter.
      This parameter could be SerialMaster.SYNC_TRANSPORT, SerialMaster.SYNC_SLAVE or SerialMaster.SYNC_FUNCTION and modify the behaviour of SerialWaitingRoomKeyFactory.
      What's the difference between those 3 values?

      1 Reply Last reply Reply Quote 0
      • M
        mlohbihler
        last edited by

        This parameter tells Modbus4J at what concurrency level it needs to operate. This is for when you have multiple threads using the same modbus master to send requests. (Note that Modbus4J doesn't handle the multi-threading for you. You still need to do that yourself.)

        For example, one thread may be sending requests to slave 1, and another to slave 2. You can send both requests at the same time and have each slave generate the response concurrently, which is more efficient then sending them serially. To do this, you should set your master concurrency level to SYNC_SLAVE.

        Does this make sense?

        Best regards,
        Matthew

        1 Reply Last reply Reply Quote 0
        • P
          pentavalle
          last edited by

          Good improvement! :)

          Looks like SYNC_FUNCTION syncs on slaveId and functionCode, so both must be different to send a concurrent request, and SYNC_TRANSPORT doesn't allow to send concurrent modbus requests, like before.
          Please correct me if I'm wrong.

          1 Reply Last reply Reply Quote 0
          • M
            mlohbihler
            last edited by

            You are correct.

            Best regards,
            Matthew

            1 Reply Last reply Reply Quote 0
            • First post
              Last post