Professional OPC
Development Tools

logos

Can't even connect!

More
16 Dec 2016 09:12 #4659 by ItGre
Replied by ItGre on topic Can't even connect!
Thank you very much. It works now. I will study the links you provided.

Regards,
Martin

Please Log in or Create an account to join the conversation.

More
15 Dec 2016 09:25 - 15 Dec 2016 09:31 #4656 by support
Replied by support on topic Can't even connect!
Thank you.

The NodeID you have specified does not contain namespace URI or namespace index, and it is therefore assumed to be in reserved namespace with index 0 and URI http://opcfoundation.org/UA/ .

But according to the UAExpert screenshot, the node you actually have in mind lives in namespace index 4. The namespaces are important part of the NodeID and nothing works without them in OPC UA.

You should therefore specify the node e.g. like this:

ns=4;s=25_SPS->CC.behaelter_b.level.level_act


Even better, you should actually use a namespace URI ("nsu=..."), and not a namespace index ("ns=..."), because the namespace index may change between sessions if the server decides to do so.

Some related reading: You should be able to find the namespace URIs in the NamespaceTable of the server, using UAExpert (or, in fact, they should be documented somewhere by the server vendor). You can also try to use the OPC UA demo application (.NET-based) that comes with QuickOPC, find your node, and the NodeID which includes the namespace URI will be displayed in the bottom part of the form.

Best regards
Last edit: 15 Dec 2016 09:31 by support.
The following user(s) said Thank You: ItGre

Please Log in or Create an account to join the conversation.

More
15 Dec 2016 09:04 - 15 Dec 2016 09:31 #4655 by ItGre
Replied by ItGre on topic Can't even connect!
I've attached a screenshof of UAExpert showing the content of the variable i use in my code.
The Delphi code is the following:
procedure TForm1.FormCreate(Sender: TObject);
var  EasyUAClient : TEasyUAClient;
begin
  EasyUAClient := TEasyUAClient.create(NIL);
  try
 
    Edit1.Text := EasyUAClient.ReadValue('opc.tcp://konti_breit:4870',
                                         '25_SPS->CC.behaelter_b.level.level_act');
 
  except
 
    on e:exception do begin
      MessageDlg(e.message, mtError, [mbOK], 0);
    end;
 
  end;
 
end;
regards,
Martin
Attachments:
Last edit: 15 Dec 2016 09:31 by support.

Please Log in or Create an account to join the conversation.

More
15 Dec 2016 08:20 - 15 Dec 2016 08:21 #4654 by support
Replied by support on topic Can't even connect!
BadAttributeInvalid is returned by the server. It means you are connected, and the Read has been issued and received. It's just that the server does not understand the UA attribute your are asking for.

Please post the code here. And, post an image (or images) of UAExpert showing that it can read the same attribute of the same node (the NodeID should be visible).

The default attribute is Value.

Best regards
Last edit: 15 Dec 2016 08:21 by support.

Please Log in or Create an account to join the conversation.

More
15 Dec 2016 08:17 #4653 by ItGre
Replied by ItGre on topic Can't even connect!
The secured endpoint on the opc server is disabled now. And the software does not work.
Now i get the error "Status is not good: BadAttributeInvalid" (again the same code as above).
UAExpert still connects clean and shows me all values.
I'm in need of a working solution.

Please Log in or Create an account to join the conversation.

More
14 Dec 2016 07:39 #4643 by ItGre
Replied by ItGre on topic Can't even connect!
Thanks a lot for this fast reaction.
I've downloaded and installed the new build according to yout kind posting.
I tried the same code, but now i get another exception:

"Cannot lock the OPC-UA client session because it is not connected"

I used the same code as above. Is there anything i have to change in the code to get the workaround running?

Regards,
Martin

Please Log in or Create an account to join the conversation.

More
13 Dec 2016 17:41 #4640 by support
Replied by support on topic Can't even connect!
I understand.

Given that this is a second occurrence of the issue (albeit probably with the same OPC UA server), we have decided to try to put a workaround into the client component. The problem with it is that we can only work with the information we have from you, and cannot verify some communication details, and cannot test that the workaround actually resolves the problem.

We have made a new build of version 2016.2 with the workaround. Please download the current build from this Web site (it is build 512.1 or later - check it on the installer first page; the previous one was 502.1), reinstall it, rebuild your project, and retest.

We still believe it is a server issue, but it is our interest to be able to work well with as many servers as possible.

Regards

Please Log in or Create an account to join the conversation.

More
13 Dec 2016 11:55 #4638 by ItGre
Replied by ItGre on topic Can't even connect!

support wrote: If you could provide us with a demo version of the server (if PC based), or open access to it over the Web, or provide us with a virtual machine image with the server in it (if PC based), we might be able to investigate the details and possibly even to include a workaround on our side.



I'm afraid i can't do that. I even can't change the OPC server settings. This is not in my hands. The panels, opc servers and nc's are under control of another department/company. I've contacted them to change the server settings as described in the other thread. But it would make me happy if there was any possibility to use a client side workaround for this problem.

Regards,
Martin

Please Log in or Create an account to join the conversation.

More
13 Dec 2016 10:36 #4637 by ItGre
Replied by ItGre on topic Can't even connect!
Thank you for your reply. The server vendor is is Siemens.

When i connect to it via UaExpert, it reports the following:

"Siemens OPC UA Server for WinCC Panel RT"

btw, i own a commerial license of your QuickOPC product.
I will study the mentioned thread and give it a try.

Regards, Martin

Please Log in or Create an account to join the conversation.

More
13 Dec 2016 10:04 #4636 by support
Replied by support on topic Can't even connect!
We have had a similar or same issue earlier, www.opclabs.com/forum/ua-com-discovery-browsing/1983-browse-nodes-opc-ua-in-delphi#4439 .
In our view the cause was a server not compliant to the OPC UA specs. The details are described in the earlier thread so they do not have to be repeated here.

The "workaround" was to configure the server to provide unsecured endpoints only. It should also be possible to define the UAEndpointDescriptor on the client side to allow only unsecured endpoints - the code for that is also in that earlier thread, though the customer reported that it had not helped.

If you could provide us with a demo version of the server (if PC based), or open access to it over the Web, or provide us with a virtual machine image with the server in it (if PC based), we might be able to investigate the details and possibly even to include a workaround on our side.

BTW, which OPC UA server are you connecting to?

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.205 seconds

      

 Recommend this on Google