Stefano Bossi created PLC4X-262:
-----------------------------------
Summary: Error in reading Array
Key: PLC4X-262
URL: https://issues.apache.org/jira/browse/PLC4X-262
Project: Apache PLC4X
Issue Type: Bug
Components: Driver-S7
Affects Versions: 0.8.0
Reporter: Stefano Bossi
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:
{code:java}
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();
}
}
{code}
and the exception is:
{noformat}
[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/:?]
{noformat}
If I try with the simple
{code:java}
builder.addItem("PollingValue", "%DB2:114.0:INT");
{code}
Everything works.
Regards,
Stefano Bossi
--
This message was sent by Atlassian Jira
(v8.3.4#803005)