[
https://issues.apache.org/jira/browse/PLC4X-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17245127#comment-17245127
]
Stefano Bossi commented on PLC4X-239:
-------------------------------------
Hi Chris,
unfortunately the bug is back!
I have tried with the HelloWord application to read a DATA TIME DATA like this:
{code:java}
"%DB2:12.0:DATE_AND_TIME"
{code}
but I have a Time out Exception:
{code:java}
[ERROR] 11:28:03.966 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:41) [main/:?]
[WARN ] 11:28:04.442
org.pragmaticindustries.cockpit.plc.pool2.CachedPlcConnection.apply() - Request
finished with exception. Reporting Connection as Broken
java.util.concurrent.CancellationException: null
at
java.util.concurrent.CompletableFuture.cancel(CompletableFuture.java:2475)
~[?:?]
at
org.pragmaticindustries.cockpit.plc.pool2.CachedPlcConnection.lambda$0(CachedPlcConnection.java:65)
~[pool2-1.0.0-SNAPSHOT.jar:?]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
~[?:?]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
~[?:?]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
~[?:?]
at java.lang.Thread.run(Thread.java:830) ~[?:?]
{code}
Regards,
Stefano Bossi
> Read DTL (Date and Time)
> ------------------------
>
> Key: PLC4X-239
> URL: https://issues.apache.org/jira/browse/PLC4X-239
> Project: Apache PLC4X
> Issue Type: Bug
> Components: Driver-S7
> Affects Versions: 0.8.0
> Reporter: Stefano Bossi
> Assignee: Christofer Dutz
> Priority: Major
> Attachments: Screenshot 2020-08-19 at 17.02.58.png,
> correctDateAndTimeRead_v0_6_0.pcapng, plc4x-updated-time-handling.pcapng,
> wrongDateAndTimeRead_v0_8_0.pcapng
>
>
> Dear developers,
> I have found a bug in trying to read a Date and Time field from a S7 1200
> PLC, here are the informations to help you in fixing the code.
> I am using the HelloPlc4x application for testing, with this command line:
> {code:java}
> "--connection-string 's7://192.168.1.192' --field-addresses
> '%DB1:264.0:DATE_AND_TIME'"{code}
> The Data Block in the PLC is like in the uploaded jpeg.
> When I reach the line of code for the synchronous read request the code never
> return.
> Via Wire Shark I have captured the dialog and I found that in the Read Var
> request only 1 byte is requested instead of the expected 8.
> I have tried with the version 0.6.0 and in that release of the library are
> requested 8 byte correctly (the parsing after receiving the data fail for
> somewhat reason but via wireshark I could see that the data in the response
> is the correct Date and Time value I have on the PLC)
> I attach the pcap capture with the 0.8.0 version and for comparison the one
> with the 0.6.0
> Hope that this could help to have a more robust library.
> Regards,
> Stefano Bossi
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)