+1
Completed

OPCUA Interface - Error in activating session

Ernesto 2 months ago in OPCUA4Unity updated by maokeuncle 4 days ago 10

Dear all,

I'm having problems to connect to a remote OPC UA server using the OPCUA Interface Component.

I followed the "Connection troubleshouting" guidelines provided in "/game4automation/Documentation/opcua.html".

Configuring the OPC Server with "No security certificates and passwords" I could connect OPC Watch with the server (see Image):



However, when I tried connecting through the Unity OPCUA Interface:



I get the following error message:

OPCUA Interface - Error in activating session [BadUnknownResponse]
UnityEngine.Debug:LogError (object)
game4automation.OPCUA_Interface:Connect () (at Assets/game4automation/private/Interfaces/OPCUA4Unity/OPCUA_Interface.cs:179)
game4automation.OPCUA_Interface:EditorImportNodes () (at Assets/game4automation/private/Interfaces/OPCUA4Unity/OPCUA_Interface.cs:246)
game4automation.OPCUAInterfaceEditor:OnInspectorGUI () (at Assets/game4automation/private/Interfaces/OPCUA4Unity/private/Editor/OPCUAInterfaceEditor.cs:20)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)


As it can be seen in the last image, I'm using Unity 2021.3.2f1 Editor with Game4Automation Digital Twin Professional 2020.


Any idea of what I'm missing?


Thank you in advanced.

Answer

+1
Answer
Completed

Hi Erenesto,

I am sending you an email with a new code for OPCUA_Interface.cs. Please replace yours with this new code and I hope connection will work.

Changes will be included in upcoming 2021 release.

I tried to communicate locally (localhost) with the same result.

The server I'm using is:

https://www.kepware.com/en-us/products/kepserverex/version-6/

Update: Looking at the comments in https://forum.game4automation.com/en/communities/1/topics/356-error-in-opening-secure-channel-badencodinglimitsexceeded, I downloaded a previous version of the game4Automation in  https://game4automation.com/download/customers/, concretely the 2019 one.


This version works perfectly, and I can read/write OPCUA nodes in Unity (tested in Unity 2021.3.2f1 editor). However, it would be good to work with the latest game4automation library.  

Under review

I am sorry for the problems. If you have problems you could downgrad to the OPCUA solution in our Version 2020.13 and before. But there were reasons for chaning to the new version. Mainly because of open source, pure .Net, Andoid, IOS and Hololens compatiblity. The new library is based on 

https://github.com/nauful/LibUA/.  But there are still issues and we are going to improve it in future.

Ok. Thanks for the comment. I will work with the previous version until the issues are fixed.

Planned

What kind of OCUA Server are you using. Is there any possiblity that we test and debug with the same server?

请尽快解决这个问题,我使用 ABBIRC5OPCUAserver

Any update? I cannot connect to kepserverex yet. Could you please indicate me a tested OPCUA server compatible with Siemens PLC? Perhaps Siemens OPCUA server?

Thank you in advance!

+1
Answer
Completed

Hi Erenesto,

I am sending you an email with a new code for OPCUA_Interface.cs. Please replace yours with this new code and I hope connection will work.

Changes will be included in upcoming 2021 release.

i have the same problem,may you send the new code to me?thanks. my email:  maokeuncle@163.com