Hello, Titus,

the discovery part is an optional parameter. By default the opc ua driver uses 
the discovery endpoint of an opc ua server to get the correct endpoint 
description.
If the parameter is set to false, it ignores this discovery result and forces 
the specified ip + port combination. We had to implement this option because 
opc ua servers do not always seem to be configured correctly.
But you are right, the documentation part is missing there. We will address 
this soon to avoid these ambiguities.


The bug you mentioned is already fixed in the upcoming versions 7.0 and 6.1 and 
should be released soon.

Greetings
Matthias


________________________________
Von: Titus Hartmann <titus.hartma...@gmail.com>
Gesendet: Mittwoch, 29. April 2020 14:57:35
An: dev@plc4x.apache.org
Betreff: OPC UA communication

Hello everyone,

following the mail addressed to Julian I have a Question regarding the
communication between Prosys OPC UA and PLC4X.

In the demo Julian used in his Webinar there is this Connection String:

"opcua:tcp://10.8.0.2:53530/opcua/SimulationServer?discovery=false&username=tester&password=test1234"

I’m wondering what the discovery part does. Can you help me with this?
Using this Code the following error appeared:

org.apache.plc4x.java.api.exceptions.PlcConnectionException: Unable to
discover 
URL:opc.tcp://192.168.222.27:53530/OPCUA/SimulationServer?discovery=false/discovery

       at 
org.apache.plc4x.java.opcua.connection.OpcuaTcpPlcConnection.connect(OpcuaTcpPlcConnection.java:187)

       at 
org.apache.plc4x.java.PlcDriverManager.getConnection(PlcDriverManager.java:73)

       at org.titus.plc4x.OpcReader.main(OpcReader.java:48)

After Debugging I noticed that the URL is not correctly separated.
Thats why the discovery part is ignored. Not sure why it worked in the
demo though.

Do you guys have any idea how I could fix this?

Thanks and best regards

Titus

Reply via email to