Professional OPC
Development Tools

logos

Browsing all variables in a Device

More
08 Nov 2019 14:12 #7944 by support
I am glad it works now.

The string identifier you wanted was "Channel1.Device2". But, if "s=", "g=", "i=", or "b=" does not immediately follow the semicolon after the namespace URL or namespace index, the whole remainder is the string identifier. So, what you were effectively using (with the space) was " s=Channel1.Device2".

Best regards

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

More
08 Nov 2019 13:43 #7943 by mosrya11
Hi,

Thanks thats sorted it! Didn't realise the spaces were relevant.

I had: "nsu=KEPServerEX; s=Channel1.Device2"
Now : "nsu=KEPServerEX;s=Channel1.Device2"

The space before the s= stops it working.

Thanks for your help.

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

More
08 Nov 2019 13:34 - 08 Nov 2019 14:13 #7942 by support
Hello,

before I get to reproducing it: Do you really have the blank spaces in the node ID, i.e.
"nsu = KEPServerEX ; ns = 2; s = Channel1.Device2"
Because - it's relevant. Some of it is plainly wrong. Remove it all for start, if you have it there.

Regards
Last edit: 08 Nov 2019 14:13 by support.

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

More
08 Nov 2019 09:35 #7941 by mosrya11
Hi,

The Kepserver version is 6.6.350.

OPF for config attached.

The code I'm using is the following : -
public IEnumerable<UANodeElement> GetTags()
        {
            List<UANodeElement> tags = new List<UANodeElement>();
            UANodeElementCollection nodeElementCollection = new UANodeElementCollection();
            try
            {
                nodeElementCollection = client.BrowseDataVariables(endpointDescriptor, "nsu = KEPServerEX ; ns = 2; s = Channel1.Device2");
            }
            catch (UAException uaException)
            {
                Console.WriteLine("*** Failure: {0}", uaException.GetBaseException().Message);
            }
 
            // Display results
            foreach (UANodeElement nodeElement in nodeElementCollection)
            {
                Console.WriteLine();
                Console.WriteLine("nodeElement.NodeId: {0}", nodeElement.NodeId);
                Console.WriteLine("nodeElement.DisplayName: {0}", nodeElement.DisplayName);
                tags.Add(nodeElement);
            }
 
            return tags;
        }

Thanks
Attachments:

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

More
08 Nov 2019 05:55 #7940 by support
Can you please:

1. Find out the Kepware server version
2. post here the Kepware server configuration you are using (or a smaller version of it which still shows the problem)
3. post here the project to reproduce the problem (I know you have posted the BrowseXXXX statement, so in fact this may be sufficient; I am just trying to make sure there is no difference between what you are using and what I am going to try out).

Thank you
The following user(s) said Thank You: mosrya11

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

More
07 Nov 2019 13:17 #7937 by mosrya11
No, Sorry the error is in the forum post.
Both the Kepserver and my code is Channel1.Device2, it was a typo on the previous post.

But Channel1.Device2 is getting no nodes returned?

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

More
07 Nov 2019 12:01 #7936 by support
Hello,

what you have posted looks good. Except, you mentioned "Channel1.Device1", but the code has "Channel1.Device2". Isn't that the cause?

Best regards

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

More
07 Nov 2019 11:28 #7935 by mosrya11
Hi,
Been using this for a while with KepwareEX6, and all working great.
Just trying to get some data from the server under one particular device.

I'd just like to see all variables inside of "Channel1.Device1". Is there a quick way to do this?

Ived tried pasting the starting node id from Connectivity Explorer (nsu=KEPServerEX ;ns=2;s=Channel1.Device2)...
But browse Nodes/Objects/Variables is returning a 0 length list.

I'm sure its something simple I'm missing..

I'm using: nodeElementCollection = client.BrowseDataVariables(endpointDescriptor, "nsu=KEPServerEX; s=Channel1.Device2");
Any ideas?

Thanks

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

Moderators: support
Time to create page: 0.192 seconds

      

 Recommend this on Google