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.

OPCUA read value issue

More
23 Sep 2021 13:54 #10226 by support
Replied by support on topic OPCUA read value issue
Also possibly related: github.com/OPCFoundation/UA-.NETStandard/issues/1509#issuecomment-925835871 (suggests a licensing issue?)

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

More
23 Sep 2021 08:54 #10225 by support
Replied by support on topic OPCUA read value issue
Thank you.

I am now using the precise same version of the TOP Server, and your configuration of the server. And, I cannot reproduce the issue. Here is the code I am running:
static void Main(string[] args)
        {
            EasyUAClient client = new EasyUAClient();
            var nodes = client.BrowseDataNodes("opc.tcp://localhost:49320", "nsu=TOP Server;s=TESTPLC1.TESTPLC1");
            foreach (var node in nodes)
            {
                Console.WriteLine(node);
            }
 
            Console.WriteLine();
 
            try
            {
                object value = client.ReadValue("opc.tcp://localhost:49320", "nsu=TOP Server;ns=2;s=TESTPLC1.TESTPLC1.BodyStyle");
                Console.WriteLine(value);
            }
            catch (UAException uaException)
            {
                Console.WriteLine($"*** Failure: {uaException.GetBaseException().Message}");
            }
 
            Console.ReadLine();
        }

The program outputs the list of nodes. The ReadValue call then takes several seconds, and I get this error:
*** Failure: Status is not good: {Bad}.
+ The client method called (or event/callback invoked) was 'ReadMultiple[1]'.

I suppose this is the correct behavior, because I have no PLC connected. Notice that I do *not* get the BadNodeIdUnknown status.

Unfortunately, without a reproducible scenario it is difficult to help you further.
Best regards

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

More
22 Sep 2021 13:27 #10224 by brandon.skiles@subaru-sia.com
The version is V6.6.348.0

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

More
30 Aug 2021 11:24 #10165 by support
Replied by support on topic OPCUA read value issue
Thank you.

Which version of the TOP Server are you using please? (in TOP Server Configuration program, do Help -> Support Information).

Best regards

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

More
30 Aug 2021 09:56 #10164 by brandon.skiles@subaru-sia.com
Okay here is the Top Server config file.
Attachments:

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

More
27 Aug 2021 16:11 #10159 by support
Replied by support on topic OPCUA read value issue
Hello,

thank you for the additional information. I understand it perfectly now. And, I do not see anything wrong in what you are doing (the space characters were probably due to some copy/paste issue in the first post).

So, in under to resolve this, I am really missing the TOP Server configuration. It should not be complicated to provide it; something like:

1. Start TOP Server Configuration program.
2. Choose File -> Save As from the menu.
3. If asked about encryption settings, select "No encryption..." (I am assuming you have nothing secret or confidential in the configuration), and press OK.
4. Select where the file (with .OPF extension) should be stored, press Save.
5. Attach the file to a new forum post here (it only has to be zipped if it is extremely big). OR, send it by email to support09 (at) opclabs.com.

Many thanks

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

More
27 Aug 2021 12:34 #10155 by brandon.skiles@subaru-sia.com
I dont believe that the spaces are the issue because when it works for the browse data nodes function and returns all of the nodes properly. I apologize that code was not clear. Here is a more clear version of the code. Also I am not sure how to save a zip of top server config however it seems to me that top server is not the issue as other programs are connected through OPC without a problem.
public void OPCRead()
{   
            EasyUAClient easyUAClient = new EasyUAClient();
            var nodes = easyUAClient.BrowseDataNodes("opc.tcp://DevSSS.ccrtest.ccr:49380", "nsu=TOP Server;s=TESTPLC1.TESTPLC1");
            foreach (var node in nodes)
            {
                Console.WriteLine(node);               
            }
 
I
}

The output of this is the following:

_System -> nsu=TOP%20Server ;ns=2;s=TESTPLC1.TESTPLC1._System (Object)
_Statistics -> nsu=TOP%20Server ;ns=2;s=TESTPLC1.TESTPLC1._Statistics (Object)
BodyStyle -> nsu=TOP%20Server ;ns=2;s=TESTPLC1.TESTPLC1.BodyStyle (Variable)
CarrierNumber -> nsu=TOP%20Server ;ns=2;s=TESTPLC1.TESTPLC1.CarrierNumber (Variable)


I then run the following code:
public void OPCRead()
{ 
            EasyUAClient easyUAClient = new EasyUAClient();            
            easyUAClient.ReadValue("opc.tcp://DevSSS.ccrtest.ccr:49380", "nsu=TOP Server;ns=2;s=TESTPLC1.TESTPLC1.BodyStyle");
}

I get the following error:

OpcLabs.EasyOpc.UA.OperationModel.UAException: An OPC-UA operation failure with error ID 'Opc.UA.StatusCode=0x80340000' occurred, originating from '' and with depth of 1. The inner exception, of type "OpcLabs.EasyOpc.UA.UAStatusCodeException", contains details about the problem.
---> OpcLabs.EasyOpc.UA.UAStatusCodeException: Status is not good: {BadNodeIdUnknown}. The node id refers to a node that does not exist in the server address space.
+ The node descriptor used was: NodeId="nsu=TOP%20Server ;ns=2;s=TESTPLC1.TESTPLC1.BodyStyle".
+ The client method called (or event/callback invoked) was 'ReadMultiple'.


The QuickOPC version is 5.61.343

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

More
25 Aug 2021 19:25 #10148 by support
Replied by support on topic OPCUA read value issue
Hello.

I see some weird usage of space characters (and its transformation to %20), maybe it is related to the issue.
For example, in "nsu =TOP Server;s=TESTPLC1.TESTPLC1", the space after "nsu" (and before "=") should not normally be there.
The other unusual thing is the space in the namespace ("TOP Server"); this is not normal because the namespace is a URI, and URIs cannot contain unescaped spaces either.

But, I cannot tell with certainty what is happening, I will need a reproducible scenario.

Can you please
1) Post here the TOP Server configuration (possibly zipped), and
2) Post here a full code that shows the problem (the parts you posted so far do not fit together - for example, I cannot tell how you obtained the tagName in the second snippet).
3) Indicate which QuickOPC version you are using

Thank you

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

More
25 Aug 2021 18:23 #10146 by brandon.skiles@subaru-sia.com
I am having a problem trying to read a value from an OPC Server (TOP Server). I am sure that my endpoint descriptor that I am using is correct because it returns multiple nodes when I use EasyUAClient.BrowseDataNodes. When I run the follwing code:
EasyUAClient easyUAClient = new EasyUAClient();
            var nodes = easyUAClient.BrowseDataNodes("opc.tcp://DevSSS.ccrtest.ccr:49380", "nsu =TOP Server;s=TESTPLC1.TESTPLC1");
            foreach (var node in nodes)
            {
                Console.WriteLine(node);               
            }

The output of this code:

BodyStyle -> nsu=TOP%20Server ;ns=2;s=TESTPLC1.TESTPLC1.BodyStyle (Variable)
CarrierNumber -> nsu=TOP%20Server ;ns=2;s=TESTPLC1.TESTPLC1.CarrierNumber (Variable)
ColorCode -> nsu=TOP%20Server ;ns=2;s=TESTPLC1.TESTPLC1.ColorCode (Variable)
D0004520 -> nsu=TOP%20Server ;ns=2;s=TESTPLC1.TESTPLC1.D0004520 (Variable)


I am then trying to read a value from one of the nodes that was found using the following code:
easyUAClient.ReadValue("opc.tcp://" + serverName, tagName);

I get the following error:

OpcLabs.EasyOpc.UA.UAStatusCodeException: Status is not good: {BadNodeIdUnknown}. The node id refers to a node that does not exist in the server address space.
+ The node descriptor used was: NodeId="nsu=TOP%20Server ;ns=2;s=TESTPLC1.TESTPLC1.CarrierNumber".
+ The client method called (or event/callback invoked) was 'ReadMultiple'.


I do not understand this because I know the node I am trying to read exists

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

Moderators: support
Time to create page: 0.059 seconds