Uploaded image for project: 'Apache PLC4X'
  1. Apache PLC4X
  2. PLC4X-159

modbus: Future which writes data correctly in modbus does not return

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.7.0
    • Driver-Modbus
    • None

    Description

      When writing data registers in modbus, the data is written correctly but the Future which does it does not return. The hack is just to not wait for the Future because you don't need the results. Just that the data is written. But if there are some error during the writing you don't know it. And probably the resources are not freed correctly.

      Some sample code:

      PlcWriteRequest writeRequest =  connection.writeRequestBuilder()
        .addItem(registerName, "register:" + offset + "[" + size + "]", writeRegister)
        .build();
      writeRequest.execute().whenComplete((writeResponse, error) -> {
        assertNotNull(writeResponse);
      });
      

      The whenComplete is never called. I have follow the code and the "decode" method is called, so it is when processing the response from the modbus slave where the problem is.

      Attachments

        1. Screenshot from 2019-12-07 09-44-45.png
          25 kB
          Alvaro del Castillo

        Activity

          People

            cdutz Christofer Dutz
            acs Alvaro del Castillo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: