0
votes

I'm using the open source OPC UA client/server implementation of Eclipse Milo. I got a S7-1500 Siemens PLC configurated with a IP address, Port number and Urn name.

To test the Milo Client ReadExample I changed the server configuration settings so that instead of making it's own default server it would connect to the Siemens PLC.

I did but instead of seeing and reading from the PLC it gives an exception.

Exception

Changes

Changes2

1
restart your pc and try again - John Joe
I tried but it gave the same exception. Thanks for your reaction - LamarSt
You only want to construct the OpcUaClient. Don't build the OpcUaServerConfig and don't construct the OpcUaServer. - Andrew Cullen
Andrew you helped me to fix it. John Joe and andrewcullen thanks for the help! I'll post the solution. - LamarSt

1 Answers

0
votes

The ReadExample is running through the ClientExampleRunner where the configuration of the server is called. I first cleaned the project and after that I only runned the ReadExample

ClientExampleRunner

Only now after some instruction I commented the calls to the ExampleServer, where the configuration is made, out and changed the endpoint to the address of the PLC.

enter image description here

Don't forget to comment out the exampleServer.shutdown().get() at the end because it will give you an error.

enter image description here