OPC-UA, Problem with username/password security policy

OPC-UA, Problem with username/password security policy

sebastien_b49
Advocate Advocate
685 Views
17 Replies
Message 1 of 18

OPC-UA, Problem with username/password security policy

sebastien_b49
Advocate
Advocate

[ FlexSim 20.2.3 ]

Hi !

I am trying to build a OPC-UA connection. I can see the Server, the issue comes when I try to browse the server for a specific node.

I first had the same issue as in this post https://answers.flexsim.com/questions/125109/index.html

but when I don't activate the debug option AND do not display the System Console, then FlexSim does not hang anymore but I still have an issue with browsing..

By deactivating the debug option FlexSim shows an exception on trying to browse the Server nodes.

exception: Failed to connect the session: BadIdentityTokenInvalid on OPC UA Connection. Error code 0x80200000 BadIdentityTokenInvalid
exception: Could not open OPC UA client connection on OPC UA Connection. Error code 0x80200000 BadIdentityTokenInvalid
exception: FlexSim::OPC UA Connection

First I thought that something was wrong with the connection credentials but I tried it with UAExpert, same credentials, and it worked as I could browse the server.

Does anybody have a clue on how to fix this error ?

EDIT: I tried also with the newest FlexSim Express Version (23.0.1) but I get the same error. Also tried to run it as admin.

EDIT 2: I tried this with a simulation server. It works when I connect without username and password but when I setup the simulation server to enforce the username and password connection I get the same error. And it still works with UA Expert.

EDIT 3: Here is my OPC UA configuration in FlexSim.

opc-ua-config.jpg

And the error when browsing

opc-ua-error.jpg

The same data for connecting to the OPC UA Server works with UA Expert.

The OPC UA Server is on a Siemens Simatic S7 1500

And I also tried with a Prosys Simulation Server. I got the same error with FlexSim but it worked with UA Expert.

0 Likes
Accepted solutions (1)
686 Views
17 Replies
Replies (17)
Message 2 of 18

jason_lightfootVL7B4
Autodesk
Autodesk
What server are you trying to connect to? I know some firmware versions of embedded UA servers on PLCs can have compatibility issues with the earlier FlexSim emulation implementation. To test 23.0's OPC-UA connection I believe you'll need an emulation license.
0 Likes
Message 3 of 18

sebastien_b49
Advocate
Advocate

I am trying to connect to a Siemens OPC-UA Server, on a Simatic S7 1500.

Yet when I tried with the newer version of FlexSim it said that I could not run the model without an emulation license but I could test the connectivity. I tried and I had the same error.


0 Likes
Message 4 of 18

ralf_gruber
Collaborator
Collaborator
@Luciano Cavallero Would you mind taking a look at this?

Thx

0 Likes
Message 5 of 18

Jeanette_Fullmer
Community Manager
Community Manager

@Luciano Cavallero, @Tancredi Canonico, @Fiorenzo A, can you please take a look at this emulation-related question?

0 Likes
Message 6 of 18

lcavallero
Contributor
Contributor

Could you try to setup your OPC UA Server to accept anonymous connection, then connect it from FlexSim and try to browse tags again?

NOTE: FlexSim 2023 Express doesent't support OPC UA, you need a emulation license


0 Likes
Message 7 of 18

sebastien_b49
Advocate
Advocate

Hi @Luciano Cavallero !

Although it is impossible to run the model without an emulation license in FlexSim 2023, it is still possible to test the connection and browse the OPC-UA Server.

1693206973439.png

I did set up the OPC-UA Server to accept anonymous connection and it does work. It does not work with username/password in FlexSim but UA Expert can connect and browse the very same OPC-UA Server. I tried it with a real server and also with Prosys Simulation Server.


0 Likes
Message 8 of 18

Jeanette_Fullmer
Community Manager
Community Manager
Hello @Luciano Cavallero,

Do you have an update?

0 Likes
Message 9 of 18

lcavallero
Contributor
Contributor
Hi Sebastien, could you share a screenshot or you OPC UA connection configuration or share the model?
0 Likes
Message 10 of 18

sebastien_b49
Advocate
Advocate
Hi @Luciano Cavallero ,

I have no particular model to share. I tried to make the OPC-UA connection in an empty one, both with a real and simulated OPC-UA server.

Does it work when you setup an OPC-UA connection with FlexSim and Password/Username policy ?



0 Likes
Message 11 of 18

lcavallero
Contributor
Contributor
Hi @Sebastien, could you share your connection configuration in FlexSim and which OPC-UA Server are you using?
0 Likes
Message 12 of 18

sebastien_b49
Advocate
Advocate
Hi @Luciano Cavallero ,

I updated my post with the opc ua configuration and server details.


0 Likes
Message 13 of 18

maurizio_giubilato
Not applicable
Accepted solution

@Sebastien.

As @Luciano Cavallero already pointed out, from FlexSim 2023 OPC/UA connection requires an Emulation license. If you don' t have it OPC/UA connection will not work..

Pls contact yout local FlexSim distributor (@Ralf Gruber, i guess) to get it

0 Likes
Message 14 of 18

sebastien_b49
Advocate
Advocate

Hi @Maurizio Giubilato ,

Although it is not possible to run the model with the emulation module in the Version 2023, it still is possible to view the server and browse the node. Here a test with the Version 2023 and an anonymous connection.

flexsim2023-opc-ua.jpg

0 Likes
Message 15 of 18

maurizio_giubilato
Not applicable

@Sebastien,

This is known; Emulation GUI is working in the same way of all FlexSim GUIs, allow a user browsing the server node, creating and setting connections, ... OPC/UA connection require a license in order to work properly.

If you need to test Emualtion module OPC/DA and Modbus connections are available without Emulation license, also in FlexSim Express.

Al the other other connectors require both a FlexSim GP and an Emulaiton license.

0 Likes
Message 16 of 18

sebastien_b49
Advocate
Advocate

@Maurizio Giubilato

Originally my question concerned the 20.2.3 Version. I just had tested the connection with the 2023 Version in order to know if the version was the problem.


BUT, just out of curiosity concerning the 2023 Version which is not the version I use for my project:

Is this a known behavior that FlexSim Express 2023 OPC UA Connection allows users to browse an anonymous OPC UA Server but return a "Server Browse Error" with the same version, and only a username/password policy on the server instead of the anonymous connection ? And without running the model at all.




0 Likes
Message 17 of 18

maurizio_giubilato
Not applicable
@Sebastien

In FlexSim 2023 OPC/UA connection has been reviewed and enhanced in stability and performance, under many point of views, including the support on several OPC/UA servers

So it is a rather different feature from the past version, despite it shares most of the GUI; therefore some behaviours could be different from the past version.

We are also planning further enhacement in this connector to speed-up the import of tags and support more data types.

I hope i answered to your question.



0 Likes
Message 18 of 18

Jeanette_Fullmer
Community Manager
Community Manager

Hi @Sebastien, was one of Maurizio Giubilato's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes