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

Error in reading Array

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.8.0
    • 0.8.0
    • Driver-S7
    • None

    Description

      Dear developer,

      after the commit [ Improve the reading of S7 Date and Time handling|https://github.com/apache/plc4x/commit/9c25eb319f5c4e9192d4fc6a4abf5bedc3838c0c] I have found that reading array raise an exception.
      The code I am trying to use is the HelloWord:

      try (PlcConnection conn = manager.getConnection(connectionString)) {
          if (conn.isConnected()){
              PlcReadRequest.Builder builder = conn.readRequestBuilder();
              builder.addItem("PollingValue", "%DB2:126.0:INT[2]");
              // builder.addItem("PollingValue", "%DB2:114.0:INT");
              PlcReadRequest readRequest = builder.build();
              PlcReadResponse syncResponse = readRequest.execute().get(2000, TimeUnit.MILLISECONDS);
              printResponse(syncResponse);
          } else {
              logger.info("PLC is not connected, let's try to connect");
              conn.connect();
          }
      }
      

      and the exception is:

      [INFO ] 10:58:21.274 org.apache.plc4x.java.transport.tcp.TcpChannelFactory.configureBootstrap() - Configuring Bootstrap with Configuration{local-rack=1, local-slot=1, remote-rack=0, remot-slot=0, pduSize=1024, maxAmqCaller=8, maxAmqCallee=8, controllerType='null'}
      [INFO ] 10:58:21.412 org.apache.plc4x.java.s7.readwrite.protocol.S7ProtocolLogic.onConnect() - S7 Driver running in ACTIVE mode.
      [ERROR] 10:58:23.656 it.fox.datapicker.HelloPlc4x.main() - Timeout exception fired
      java.util.concurrent.TimeoutException: null
              at java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1957) ~[?:?]
              at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2092) ~[?:?]
              at it.fox.datapicker.HelloPlc4x.main(HelloPlc4x.java:43) [main/:?]
      

      If I try with the simple

      builder.addItem("PollingValue", "%DB2:114.0:INT");
      

      Everything works.

      Regards,
      Stefano Bossi

      Attachments

        Activity

          People

            cdutz Christofer Dutz
            fox_pluto Stefano Bossi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: