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.

Read problem

More
05 Feb 2020 19:20 - 05 Feb 2020 19:20 #8203 by support
Replied by support on topic Read problem
QuickOPC reads NamespaceArray and ServerArray (their Value attributes) as part of opening the session.
NamespaceArray appears usable, but ServerArray returns BadNodeInvalid.
ServerArray is, however, mandatory, and the server is thus not compliant with the OPC UA specification.

You will not be able to connect to this server with QuickOPC until the server is fixed.

Best regards.
Last edit: 05 Feb 2020 19:20 by support. Reason: small typo

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

More
05 Feb 2020 18:07 - 05 Feb 2020 18:10 #8202 by Boris
Read problem was created by Boris
Hello.

There is a server in public access, here are its parameters:
EndpointUrl: opc.tcp://opc.owencloud.ru:4843
UserName: This email address is being protected from spambots. You need JavaScript enabled to view it.
Password: demo123
Security: None, None

This server has a problem with tags. Some attributes cannot be read (see the example in the attachment). But some attributes are readable.
Unfortunately, my program users want to work with this server and read those attributes that can be read. But an error occurs every time I try to read tags through the "ReadValue" function. Therefore, I decided to read only one attribute: "UAAttributeId_DataType" from the tag "NamespaceArray". With the help of UAExpert, I see that this attribute (DataType) is available and can be read. I took the code from the example "..\OPC Labs QuickOPC 2019.2\Examples-COM\OP\UADocExamples\_EasyUAClient\ReadMultipleValues.DataType.inc". Changed it like this:
class procedure ReadMultipleValues.DataType;
var
  Client: OpcLabs_EasyOpcUA_TLB._EasyUAClient;
  ReadArguments1, ReadArguments2, ReadArguments3: _UAReadArguments;
  Arguments, Results: OleVariant;
  I: Cardinal;
  Result: _ValueResult;
  aSession: _UASmartSessionParameters;
begin
  Client := CoEasyUAClient.Create;
  Client.Isolated := TRUE;
  aSession := Client.IsolatedParameters.SessionParameters;
  aSession.UserIdentity.UserNameTokenInfo.UserName := 'demo@owen.ru';
  aSession.UserIdentity.UserNameTokenInfo.Password := 'demo123';
 
  ReadArguments1 := CoUAReadArguments.Create;
  ReadArguments1.EndpointDescriptor.UrlString := 'opc.tcp://opc.owencloud.ru:4843';
  ReadArguments1.NodeDescriptor.NodeId.ExpandedText := 'ns=0;i=2255';   // NamespaceArray
  ReadArguments1.AttributeId := UAAttributeId_DataType;   // DataType attribute
 
  Arguments := VarArrayCreate([0, 0], varVariant);
  Arguments[0] := ReadArguments1;
 
  TVarData(Results).VType := varArray or varVariant;
  TVarData(Results).VArray := PVarArray(Client.ReadMultipleValues(Arguments));
 
  for I := VarArrayLowBound(Results, 1) to VarArrayHighBound(Results, 1) do
  begin
      Result := IInterface(Results[I]) as _ValueResult;
      WriteLn;
      if Result.Succeeded then
      begin
          WriteLn('Value: ', Result.Value);
          WriteLn('Value.ExpandedText: ', Result.Value.ExpandedText);
          WriteLn('Value.NamespaceUriString: ', Result.Value.NamespaceUriString);
          WriteLn('Value.NamespaceIndex: ', Result.Value.NamespaceIndex);
          WriteLn('Value.NumericIdentifier: ', Result.Value.NumericIdentifier);
      end
      else
        WriteLn('results(', I, ') *** Failure: ', Result.ErrorMessageBrief);
  end;
end;
But again I get the error: "results(0) *** Failure: OPC-UA service result - (no description available) = BadNodeIdUnknown". The same thing when trying to read other attributes.
Is there any way to read those attributes that are readable? Maybe I'm doing something wrong?
Attachments:
Last edit: 05 Feb 2020 18:10 by Boris. Reason: removed duplicate text

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

Moderators: support
Time to create page: 0.052 seconds