[ 
https://issues.apache.org/jira/browse/PLC4X-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17180672#comment-17180672
 ] 

Stefano Bossi commented on PLC4X-239:
-------------------------------------

Dear Christofer,

I don't know if this could be of any help but reading each Byte as indicated in 
the picture all the value are returned correctly:
"--connection-string 's7:tcp://192.168.1.192?controller-type=S7_1200' 
--field-addresses '%DB1:264.0:UINT' '%DB1:266.0:USINT[7]' '%DB1:271.0:UDINT'"
 
[INFO ] 18:35:28.632 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-0]: 2020
[INFO ] 18:35:28.636 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-1]:
[INFO ] 18:35:28.640 it.fox.datapicker.HelloPlc4x.printResponse() -  - 8
[INFO ] 18:35:28.644 it.fox.datapicker.HelloPlc4x.printResponse() -  - 19
[INFO ] 18:35:28.648 it.fox.datapicker.HelloPlc4x.printResponse() -  - 4
[INFO ] 18:35:28.652 it.fox.datapicker.HelloPlc4x.printResponse() -  - 16
[INFO ] 18:35:28.656 it.fox.datapicker.HelloPlc4x.printResponse() -  - 35
[INFO ] 18:35:28.660 it.fox.datapicker.HelloPlc4x.printResponse() -  - 28
[INFO ] 18:35:28.664 it.fox.datapicker.HelloPlc4x.printResponse() -  - 8
[INFO ] 18:35:28.668 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-2]: 470320773

This with the 0.8.0 version of the library.

Regards,
S.
 

> 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, 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)

Reply via email to