You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@plc4x.apache.org by "Christofer Dutz (Jira)" <ji...@apache.org> on 2020/09/01 06:54:00 UTC
[jira] [Commented] (PLC4X-246) S7 driver hangs on read
[ https://issues.apache.org/jira/browse/PLC4X-246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17188182#comment-17188182 ]
Christofer Dutz commented on PLC4X-246:
---------------------------------------
Ok ... so the testcase seems to work now, but if I explicitly configure my S7-1200 to not allow PUT/GET I am still getting the hanging you describe ... will investigate.
> S7 driver hangs on read
> -----------------------
>
> Key: PLC4X-246
> URL: https://issues.apache.org/jira/browse/PLC4X-246
> Project: Apache PLC4X
> Issue Type: Bug
> Components: Driver-S7
> Affects Versions: 0.7.0
> Reporter: Sebastian Voss
> Priority: Major
> Attachments: s7_capture.pcapng
>
>
> I’m trying to read a value from an Siemens S7-1200 PLC). When I try to read a value the read request is not being executed (I also do not receive an error message or timeout).
> This is the simple program I created:
> {code:java}
> String url = "s7://172.29.118.20:102?controller-type=S7_1200";
> PlcDriverManager manager = new PlcDriverManager();
> PlcConnection connection = manager.getConnection(url);
> boolean isConnected = connection.isConnected();
> boolean canRead = connection.getMetadata().canRead();
> System.out.println(isConnected); // prints true
> System.out.println(canRead); // prints true
> String field = "%DB20:5.0:BOOL";
> PlcReadRequest request = connection
> .readRequestBuilder()
> .addItem("value-1", field)
> .build();
> PlcReadResponse response = request.execute().get(); // here is hangs forever
> System.out.println(response.getFieldNames());
> connection.close();{code}
> I created a Wireshark capture and it seems the PLC is reporting:
> {code:java}
> [Error code: This service is not implemented on the module or a frame error was reported (0x8104)]{code}
> Thanks to the help of [~cdutz] I figured out this is related to the protection settings of the PLC. I will try to adjust those settings and report back the result. Maybe the driver can be improved to report back those error codes to the user.
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)