Hi Sebastian,

could you possibly do a wireshark recording of this, create an issue in our 
jira and attach the capture there?
I am sure we haven't handled all things that could go wrong and with this 
information I might be able to improve the error handling.

Chris




Am 30.08.20, 18:28 schrieb "Sebastian Voss" <svdevl...@gmail.com>:

    Hi,

    I’m trying to read a value from an Siemens S7-1200 PLC). This is my first 
project using the S7 protocol and plc4x. When I try to read a value the read 
request is not being executed (I also do not receive an error message or 
timeout). Would this be the normal behaviour when the field address is wrong? 
I’m out of ideas how to trace this down. Any hints would be highly appreciated.

    This is the simple program I created:

    String url = 
"s7://172.3.4.5:102?local-rack=0&local-slot=1&remote-rack=0&remote-slot=1&controller-type=S7_1200
 
<s7://172.3.4.5:102?local-rack=0&local-slot=1&remote-rack=0&remote-slot=1&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:DBX05.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();

    Thanks a lot in advance!

    Best regards,
    Sebastian

Reply via email to