LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OPC UA Server on Codesys, OPC UA Client on Labview

Solved!
Go to solution

Hello everybody

 

I have a OPC UA Server on Codesys and it works on its own. I want to send now a few variables to an OPC UA Client on Labview. My block diagram is in the picture.

I Always get the error message: "OPC UA Toolkit: The operation timed out." What is wrong with my block diagram? Is the problem the NodeID?

 

1.png

 

Here is the URL and the NodeID from UAExpert:

 

2.png

 

Thaks for every help

 

mgele

0 Kudos
Message 1 of 12
(267 Views)

I just inserted some probes to analyse the problem and it seems that the connection to the OPC UA server itself is the problem. 

The URL should be correct because with UAExperts it works with this URL

Does anybody know what the problem could be?

0 Kudos
Message 2 of 12
(252 Views)

If nothing wrong with security, then a very first suggestion — try to remove ".button" from NodeId, I don't see this in UA Expert (or you show screenshot not from exact this node):

Screenshot 2024-04-18 16.21.24.png

This is how it looks in my case (B&R PLC) - i checked with both Byte and Variant:

Code:

OPCUA.png

UA Expert:

UA Expert 1.png

Complete Node Attributes:

UA Expert 2.png

And result:

Screenshot 2024-04-18 16.36.41.png

And check error code, of course, if any.

0 Kudos
Message 3 of 12
(236 Views)

Hi Andrey

 

Thanks for your reply. 

I tried to remove .button but it still doesnt work. What coud be wrong with security?

 

mgele

0 Kudos
Message 4 of 12
(229 Views)

@mgele wrote:

Hi Andrey

 

Thanks for your reply. 

I tried to remove .button but it still doesnt work. What coud be wrong with security?

 

mgele


For example, your PLC Strictly required to have Sha256, but NI OPC UA Toolkit cannot do that, its unsupported.

If I will set security option on B&R Side like this: prohibit everything except Sha256, then it will stop working (but you should see error on the Connect):

Screenshot 2024-04-18 16.38.48.png

I'll check shortly what happened then, need to restart PLC.

 

And try to set Flag "Trust any server" in LabVIEW, it is False by default.

0 Kudos
Message 5 of 12
(220 Views)

@Andrey_Dmitriev wrote:

I'll check shortly what happened then, need to restart PLC.


OK, tested.

With unsupported security you will get the following error:

Screenshot 2024-04-18 16.48.29.png

 

Also check user name/password if it not set on PLC side, but also in this case you should have an error.

0 Kudos
Message 6 of 12
(211 Views)

Hi Andrey

 

I dont have any security on my PLC:

mgele_0-1713452641491.png

 

0 Kudos
Message 7 of 12
(204 Views)

Then may be you accessing wrong NodeId (for example containing folder and not variable).

This is how it looks in my case, you should drag node to the list, then check that the connection is good and then note NodeId:

Screenshot 2024-04-18 17.18.22.png

Can you please show complete NodeId attrubutes from UA expert which you attempting to access?

0 Kudos
Message 8 of 12
(191 Views)

Hi Andrey

 

Thanks that you tanking s much time for me.

Here is my NodeID:

4.jpeg

 

 

0 Kudos
Message 9 of 12
(185 Views)

@mgele wrote:

Hi Andrey

 

Thanks that you tanking s much time for me.

Here is my NodeID:

 

 

 


You're welcome, but I have no more ideas, because the NodesID are identical with your first screenshot (so, the ".button" should be here against my first suggestion) and usually if they are identical, then it works (I checked this in the past also with Siemens OPC UA Server and self-made LabVIEW Server).

 

Screenshot 2024-04-18 17.59.43.png

 

May be OPC UA don't like "|" character (needs to be checked), but I don't see any difference. Any you have really no any error when you hit Stop Button?

0 Kudos
Message 10 of 12
(172 Views)