News:

SMF - Just Installed!

Main Menu

OPC UA connection

Started by plcello, January 01, 2023, 06:37:25 PM

Previous topic - Next topic

plcello

Hello, I'm trying to configure the driver for OPC UA connection with an external server but I'm facing some issues:
As I press the CONNECT button, a pop-up message appears telling "Untrusted Server Certificate" and it's asking whether I want to accept it or not.
I press YES to accept it but then every time the connection fails returning the message "Connect failed. Error: BadSecureChannelClosed".

I thought that manually moving the certificates on both Client and Server sides could be helpful, but while I managed to do it very easily on the Server side moving what is called "EasyPLC OPCUA Driver" from the Quarantined to the Trusted certificates folder, I can't find where are certificates folders on the Client side (my PC where Machines Simulators is running).

The PLC application is made on Codesys. I tested it already on localhost and everything run smoothly, then the problem seems to exist only with an external OPC server

Many thanks!!!  :)

EasyPLC_Master

#1
Hello,
If you have purchased the USB License, please install the OPC Core Components Redistributable package located in the Software Components folder of the USB key.
If you have purchased the Single PC License download it from here:
OPC Core Components Redistributable (x86) 3.00.108.msi -> https://drive.google.com/file/d/1ABWb5C5TORDs-ar2mxNrt12i8IO8rHeN/view?usp=share_link
OPC Core Components Redistributable (x64) 3.00.108.msi -> https://drive.google.com/file/d/1eNYxgEmzDlKwG0x_V40nMAV28GKipR3N/view?usp=sharing

And Also the OPC UA Local Discovery Server Utility:

https://drive.google.com/file/d/13HfdO8yR3MLbP4IjDIFq6XyBB-AjHmPa/view?usp=share_link

Joachim.Boling

I seem to have similar issue when trying to connect Codesys softPC to MachineSim. I do have the OPC UA server running on Codesys softPLC and have tested this by connecting with UA Expert => works fine.
When trying to connect the EasyPLC driver I run into problems.
Pressing Connect asks me if I want to trust the untrusted certificate. I click YES but then Machine Simulator reports "Connect failed. Error: BadSecureChannelClosed".
I tried to install the files from the earlier post here but no success.

I've now run out of ideas.. Any ideas what I should do next?

(Running both Codesys softPLC and MachineSimulator on same PC so trying to connect to opc.tcp://localhost:4840)

EasyPLC_Master

Have you followed the steps indicated here?:



What version of Codesys software are you working on?

Do you have other OPC UA clients/servers software's installed on your system? if yes, can you list them?

Joachim.Boling

Hello,

I have checked the video several times and followed the steps there. The video is made with a rather old version of the Codesys so many things have changed in that environment, I think.
I'm running Codesys 3.5.19.0 (also have 3.5.18.40)
I have UA Expert and Prosys OPC server simulator installed on the same computer. As I mentioned I successfully have connected to the Codesys server with the UA Expert and have no problem to browse the server.
When I press connect in EasyPLC I get this message
You cannot view this attachment.

And when I press Yes I only get the "Connect failed. Error: BadSecureChannelClosed" message.

Joachim.Boling

Did some more testing this morning and found the following from the Codesys log
You cannot view this attachment.

EasyPLC_Master

It seems that it is a problem with the certificates, I check it and try to update the tutorial to explain better the connection process!

EasyPLC_Master

#7
I have tested with Codesys v.3.5.18 and works well.
But you must to configure the anonymous login in the controller:

https://faq.codesys.com/display/CDSFAQ/OPC+UA+Server%3A+Anonymous+loginYou cannot view this attachment.

EasyPLC_Master


Joachim.Boling

Thank you very much.
I will have to give it a go from scratch again to see if I get the certificates and user managements under control.