Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Trying to read OPC UA value with Delphi

More
30 Aug 2017 14:40 #5464 by support
Does your code work with some other server? For example, our public demo server (the one used in examples?) It can easily be that the Node ID is correct, but the server is rejecting it for a reason that is outside of our control.

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

More
30 Aug 2017 13:49 #5463 by eh
I still get the same exception... BadNodeIdUnknown

Endpoint: 'opc.tcp://opc-pc:48010'
Node: 'nsu=http://IBHsoftec.com/IBHLinkUA/;ns=4;s=OPC_UA_2017.Lijn3.Generic.TW2_WCS_Ist'

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

More
29 Aug 2017 17:16 #5459 by support
Try to pass
DataDialog.NodeDescriptor.NodeId.ToString

as a 2nd argument to ReadValue instead.


The ToString method of the UANodeDecsriptor returns a string that is not in the right format.
I admit this is not very logical, as the 2nd argument is called 'nodeDescriptorString'. I will make a note and we will try to improve it in the future version.

Best regards

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

More
29 Aug 2017 10:56 #5457 by eh
I'm trying to read a value from a tag on my OPC UA server.
Therefore I used following code, but I get an error(see attachment). What am I missing or doing wrong?

var Client: TEasyUAClient;
    Value: OleVariant;
    DataDialog: TUADataDialog;
    Endpoint, Node: string;
begin
  DataDialog := TUADataDialog.Create(nil);
  DataDialog.UserPickEndpoint := True;
  DataDialog.ShowDialog(nil);
 
  Endpoint := DataDialog.EndpointDescriptor.ToString;
  Node := DataDialog.NodeDescriptor.ToString;
 
  Client := TEasyUAClient.Create(nil);
 
  Value := Client.ReadValue(DataDialog.EndpointDescriptor.ToString, DataDialog.NodeDescriptor.ToString);
  cxtextedit3.Text := Value;
end;

Attachments:

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

Moderators: support
Time to create page: 0.055 seconds