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.

× The OpcCmd utility (console application) is a program that allows performing various OPC operations from the command line. It can act as a generic OPC UA PubSub subscriber, and be used for evaluation, experiments, and testing.

Problem using brwose with NodeBrowsePath

More
06 Apr 2023 11:36 #11658 by NoisternigW
Hi,

thank you very much.
That helps me a lot. Now it is working as I expected it.

Thanks for your very fast response on my problem.

Br,
Wolfgang
The following user(s) said Thank You: support

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

More
06 Apr 2023 10:18 #11657 by support
Hello.

(1) OpcCmd is based on QuickOPC. In QuickOPC, nodes are identified by node descriptors.A node descriptor can contain a Node ID, a browse path, or both. When it contains both, it is the responsibility of the whoever produces the node descriptor that the node Id and the browse path represent the same node (this, for example, is how node descriptor come out of node browsing). When the node descriptor is consumed, the consumer part (usually inside QuickOPC), if both parts are present, can take either the node ID, or the browse path, whatever is easier or more efficient to work with in particular case. In most cases, it is the node ID (but not always). So, when you have specified a Node ID and a browse path that does not correspond to that node ID, you have already passed in incorrect information. They need to refer to the same node, OR you need to use just one of them. In your case, if what you have in hand is only the browse path, simply do not specify the node ID.

(2) Do not use single quotes around the OpcCmd arguments. If you need an argument that contains characters such as a space or colon, use double quotes around the arguments.

Here is a commands that works, for example:
OpcCmd uaClient read //opcua.demo-this.com:51210/UA/SampleServer -nbp [ObjectsFolder]/2:Data/2:Static/2:UserScalar/2:Int32Value

However, there is a problem with the browse command you want to use. The above example (with read) works, because the default for node ID in that command is none (a "null" node Id). The default node ID in the browse command is the Root node instead. This means that when you specify a browse path with it, you are right in your observation, it will use the Root, as described in (1) above. In order to force the browse command to use the browse path, we need to set the node Id from Root to null. Unfortunately, I have discovered a bug that makes it impossible to achieve in your version of OpcCmd.

I have fixed the bug now. You will need OpcCmd version 5.71.0.20 or later. It should automatically update for you if you have used ClickOnce to get it (from kb.opclabs.com/Tool_Downloads#OpcCmd_Utility ), but it may take a day before it re-checks itself for updates; or you need to force the update somehow.

With the new update, commands like this work:
OpcCmd uaClient browse //opcua.demo-this.com:51210/UA/SampleServer -nsn "" -nbp [ObjectsFolder]/2:Data/2:Static/2:UserScalar

Note the use of -nsn "" to set the node Id to Null.

I hope this helps

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

More
05 Apr 2023 11:04 #11654 by NoisternigW
Hi,

thanks for answering so fast.
It helped a bit, but if I do someting like this:
OpcCmd uaClient browse opc.tcp://192.168.188.84:4840 -nbp '[ObjectsFolder]/2:connector_420a'

I always get this answer:
Browsing...
Result (sequence): OPC UA node elements: [4] {FolderType -> nsu=http://opcfoundation.org/UA/ ;i=61 (ObjectType) , ...}
╒══╤═══════════╤═════════════════╤═══════╤═════════════╤══════════╕
│[]│Browse Name│Reference Type ID│Is     │Node ID      │Node Class│
│  │           │                 │Forward│             │          │
╞══╪═══════════╪═════════════════╪═══════╪═════════════╪══════════╡
│ 0│FolderType │HasTypeDefinition│True   │FolderType   │ObjectType│
│ 1│Objects    │Organizes        │True   │ObjectsFolder│Object    │
│ 2│Types      │Organizes        │True   │TypesFolder  │Object    │
│ 3│Views      │Organizes        │True   │ViewsFolder  │Object    │
╘══╧═══════════╧═════════════════╧═══════╧═════════════╧══════════╛

So the command always gives back the RootFolder information. Even if I give an useless path like
'[abc]/2:connector_420a'[
I I put a node id behind the EndpointDescriptor in the command, I get back the information of that node. So the browse path seems to be parsed but not used for anything, but also gives no error any more.

Any ideas?

Br,
Wolfgang

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

More
05 Apr 2023 09:24 #11653 by support
Hello,

does this help? :
opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...%20Browse%20Path%20Format.html

E.g. "[ObjectsFolder]/Data/Static/UserScalar"

Best regards

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

More
05 Apr 2023 08:01 #11652 by NoisternigW
Hello,

I have a problem with the option --NodeBrowsePath:
What is the format to use for the browse path? I always get this error:
"Format error: OPC-UA browse path format error: The OPC-UA path string is relative, but no base path was given."
Is there an example how to use it correctly? How to set the base path?

Thanks in advance.

Br,
Wolfgang

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

Moderators: support
Time to create page: 0.051 seconds