question

Sebastien avatar image
0 Likes"
Sebastien asked Jeanette F commented

OPC-UA, Problem with username/password security policy

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.

FlexSim 20.2.3
opcua
opc-ua-config.jpg (77.2 KiB)
opc-ua-error.jpg (81.8 KiB)
· 12
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·
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 0 ·
Sebastien avatar image Sebastien Jason Lightfoot ♦ commented ·

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 0 ·
Ralf Gruber avatar image Ralf Gruber ♦ commented ·
@Luciano Cavallero Would you mind taking a look at this?

Thx

0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

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

0 Likes 0 ·
Luciano Cavallero avatar image Luciano Cavallero commented ·

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 0 ·
Sebastien avatar image Sebastien Luciano Cavallero commented ·

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 0 ·
1693206973439.png (7.6 KiB)
Jeanette F avatar image Jeanette F ♦♦ Sebastien commented ·
Hello @Luciano Cavallero,

Do you have an update?

0 Likes 0 ·
Show more comments
Jeanette F avatar image Jeanette F ♦♦ commented ·

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 0 ·
Maurizio Giubilato avatar image
0 Likes"
Maurizio Giubilato answered Sebastien edited

@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

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Sebastien avatar image Sebastien commented ·

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 0 ·
Maurizio Giubilato avatar image
0 Likes"
Maurizio Giubilato answered Maurizio Giubilato commented

@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.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Sebastien avatar image Sebastien commented ·

@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 0 ·
Maurizio Giubilato avatar image Maurizio Giubilato Sebastien commented ·
@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 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.