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.

I want to connect to Rockwell Automation's FactoryTalk Linx server as a client

More
21 Jul 2023 13:09 #11944 by support
Hello,
thank you for update, I am glad that it works now!

Best regards

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

More
21 Jul 2023 01:25 #11941 by Shin Hyun Jin
Thank you very much for your reply.

In the first code, nsu omits it and uses it as "ns=2;s=::[Test]Local:1:I.Data" and the read succeeds.

Thanks to you, the problem I was stuck on has been resolved.

The code used is below. (For those who have had the same problem as me)
private void ReadValue(string tagName)
        {
            try
            {
 
                var a = opcClient1.ReadValue
                        (
                            "opc.tcp://DESKTOP-CPDB4R7:4990/qwer/",
                            "ns=2;s=::[Test]Local:1:I.Data"
                        );
            }
            catch(Exception ex)
            {
                Console.WriteLine(ex);
            }
        }

Have a good day!
Best regards.
The following user(s) said Thank You: support

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

More
20 Jul 2023 10:00 #11935 by support
Hello.

I think that the in the first code sample, the namespace index (2) is OK, but you should leave out the "nsu=;" part completely, and fix the string identifier. Looking at the picture from UaExpert, if I can read it well, the string identifier is something like "::[Test]Local:1:I.Data". So, in the first case, with namespace index, you should be passing in "ns=2;s=::[Test]Local:1:I.Data" .

In the second case, with the namespace URI: If you are using UaExpert, navigate in "Address Space" to Root -> Objects -> Server, and then select the NamespaceArray. In the Attributes window, under Value -> Value, row [2] will contain the namespace URI.You should then
- put it after the "nsu="
- leave out the "ns=2;" (optional)
- fix the string identifier as above, in the first case.

I hope this helps.

Best regards

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

More
20 Jul 2023 00:32 - 20 Jul 2023 09:36 #11934 by Shin Hyun Jin
Thank you for your reply.

I tried putting 2 in the namespace index and emptying the namespace URI.

But an exception was thrown, and the value is
Status is not good: {Bad}.
+ The client method called (or event/callback invoked) was 'ReadMultiple[1]'.

UaExpert confirmed that the PLC is connected. -> Attached File Name : Connected from UaExpert.PNG

The sources used are:
 
        private void ReadValue()
        {
        try
        {
        var value = opcClient1.ReadValue
        (
        "opc.tcp://DESKTOP-CPDB4R7:4990/qwer/",
        "nsu=;ns=2;s=ABServer.Test.Online.Local:1:I.Data" // Data is PLC Tag Name.
        );
        }
        catch(Exception ex)
        {
Console.WriteLine(ex);
        }
        }
 


I've also tried
 
        private void ReadValue()
        {
        try
        {
 
        var value = opcClient1.ReadValue
        (
        "opc.tcp://DESKTOP-CPDB4R7:4990/qwer/",
        "nsu=FactoryTalkLinxGateway;ns=2;s=ABServer.Test.Online.Local:1:I.Data"
        );
        }
        catch(Exception ex)
        {
Console.WriteLine(ex);
        }
        }
 
 

This source causes the following exception.
The OPC-UA node descriptor specifies an unknown namespace URI "FactoryTalkLinxGateway". This URI is not among the 6 namespace(s) provided by the server on endpoint URL "opc.tcp://DESKTOP-CPDB4R7:4990/qwer/".
+ The client method called (or event/callback invoked) was 'ReadMultiple[1]'.

So, I am wondering what value should be entered in nsu.

Thanks for your reply.
Attachments:
Last edit: 20 Jul 2023 09:36 by support.

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

More
19 Jul 2023 09:32 #11931 by support
Hello.

With QuickOPC, you can use either namespace index, namespace URI, or both. More information: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...indices%20in%20Node%20Ids.html .

So, if you have namespace index (2), you can leave the namespace URI empty.

If you wanted to use the namespace URI (which, in fact, is what we recommend), you'd need to find it through node browsing. You can use e.g. our Connectivity Explorer tool to view the nodes, including their namespace URIs, for that. If you need help with it, let me know.

Best regards

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

More
19 Jul 2023 08:57 #11930 by Shin Hyun Jin
Hello.

I want to connect from C# to Rockwell Automation's FactoryTalk Linx server as a client.

Connection to Melsec PLC from KepServer was successful. Server connection information is as follows.
Identifier is my PLC information.

EndPoint = "opc.tcp://localhost:49320";
NameSpaceUri = "KEPServerEX";
NameSpaceIndex = "2";
Identifier = "PLC.plc";

I want to connect from the Rockwell Automation's FactoryTalk Linx server like this, but I can't find it no matter how much I search.

I want to know what value should I put in NameSpaceUri.

Please let me know if you have any settings you have used in C#.

Thanks for your help.

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

Moderators: support
Time to create page: 0.087 seconds