Stefano Bossi created PLC4X-239:
-----------------------------------
Summary: 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
Attachments: Screenshot 2020-08-19 at 17.02.58.png,
correctDateAndTimeRead_v0_6_0.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)