Hello Matthias,

thank you for your response! Is there any Option to get around this so
that I can read some nodes for test cases?
The other question that comes to my mind is if there is a write
methode like the one in the S7 Adapter already implemented? Or is
there help needed?

I started my program this morning and there was another error present.
Could you help me out with this aswell?

java.util.concurrent.ExecutionException: java.lang.ClassCastException:
class org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId
cannot be cast to class
org.eclipse.milo.opcua.stack.core.types.builtin.NodeId
(org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId and
org.eclipse.milo.opcua.stack.core.types.builtin.NodeId are in unnamed
module of loader 'app')
 at 
java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
 at 
java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2070)
 at org.titus.plc4x.OpcReader.main(OpcReader.java:44)
Caused by: java.lang.ClassCastException: class
org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId cannot
be cast to class
org.eclipse.milo.opcua.stack.core.types.builtin.NodeId
(org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId and
org.eclipse.milo.opcua.stack.core.types.builtin.NodeId are in unnamed
module of loader 'app')
 at 
org.apache.plc4x.java.opcua.connection.OpcuaTcpPlcConnection.encodeFieldItem(OpcuaTcpPlcConnection.java:115)
 at 
org.apache.plc4x.java.opcua.connection.OpcuaTcpPlcConnection.lambda$read$8(OpcuaTcpPlcConnection.java:404)
 at 
java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1771)
 at 
java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1763)
 at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
 at 
java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
 at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
 at 
java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
 at 
java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)

Thank you and greets
Titus

Am Do., 30. Apr. 2020 um 09:35 Uhr schrieb Strljic, Matthias Milan
<[email protected]>:
>
> 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 <[email protected]>
> Gesendet: Mittwoch, 29. April 2020 14:57:35
> An: [email protected]
> 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