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.

EasyOpcUaDemo - no branches or leaves

More
10 May 2018 13:15 #6324 by support
Thank you for update.

Best regards

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

More
10 May 2018 12:50 #6323 by FrancescoZ
Apparently the server had too many variables on it and a flag needed to be checked.
Unfortunately I have no direct access to it so this is the only information I've received so far...

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

More
20 Apr 2018 17:14 #6252 by support
Thank you for letting me know. I am glad that it works now.

The null NodeIds were something I had hard time believing, because that's basically against OPC specs - but they were really null, you are right, it is clear from the screenshots. And, you were using the terms right, :-) - sorry for suspecting that.

If you could share the basics about what was the server-side configuration problem, it would be helpful if somebody else runs into the same problem.


Best regards

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

More
20 Apr 2018 15:42 - 20 Apr 2018 15:43 #6250 by FrancescoZ
Solved it!

The problem was server-side. We are now able to see the actual NodeIds and to read them using the modified sample of EasyOpcUaDemo.

Furthermore, we are able to browse branches and leaves when using this code to provide a valid UserIdentity:
OpcLabs.EasyOpc.UA.EasyUAClient.AdaptableParameters.SessionParameters.UserIdentity.UserNameTokenInfo.UserName = "myUsername";            OpcLabs.EasyOpc.UA.EasyUAClient.AdaptableParameters.SessionParameters.UserIdentity.UserNameTokenInfo.Password = "myPassword";
Again, thank you for your time!
Last edit: 20 Apr 2018 15:43 by FrancescoZ. Reason: Added content

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

More
20 Apr 2018 14:17 - 20 Apr 2018 14:19 #6249 by FrancescoZ

I suspect you improperly using some OPC UA terms which makes it difficult for me to understand


This, could very well be - first time working with it.

1) First of all, what are you are trying to achieve? In your original post, the problem was with browsing. Now it looks like that you are referring to reading. Can you please explain. And, what is the larger goal?


Let me try to rephrase the problem from the start and to explain the larger goal: I am trying to read the values of some variables on an OPC UA server hosted by a Siemens Sinumerik.
This is something I have already accomplished with a previous server (which had no authentication) and I used the sample "EasyOpcUaDemo" to verify the variables node id and value correctness during the process (as I'm doing this time).
With the previous server and the unmodified sample "EasyOpcUaDemo" I was able to browse each and every variable contained and read their values.
With the current server I don't see any branch or leaf when browsing its content (as shown in the attachment of the first post).

2) In your original post, you wrote "values on it can be viewed using the application “UaExpert DataAccess View” even though their NodeId is apparently null.". Can you please send a screenshot of this, because I find it hard to believe.




This is a screenshot of UaExpert showing that even though the NodeId is null, its Value is readable.
(I know it's barely readable under "StatusCode", but right now I'm not able to provide a better one)

3) You wrote "One thing I've noticed is that I can read a value using the attribute on UaExpert named BrowseName on the modified application". I do not understand what are you trying to say. Are you saying the reading BrowseName is possible using UaExpert, or are you saying that it is possible using an application written with QuickOPC - and if so, why is UaExpert mentioned? If reading is possible using QuickOPC, post the code here.

4) Can you please post a screenshot that illustrates the same sentence ("One thing I've noticed is that I can read a value using the attribute on UaExpert named BrowseName on the modified application") and "this one is different from the NodeId (which is null) but contains a namespace index and a string (e.g. 2,node1/node2/varname that I convert to "nsu=machinename;ns=2;s=/node1/node2/varname").


Basically, as shown in the previous screenshot, the UaExpert displays an attribute named "BrowseName"; I have converted that one (2, /Channel/ChannelDiagnose/aveCycleTimeNet in the picture) to a "NodeId format" (nsu=SinumerikVarProvider;ns=2;s=/Channel/ChannelDiagnose/aveCycleTimeNet) and pasted it into the sample EasyOpcUADemo to which I've only added these lines of code:
this.easyUAClient1.Isolated = true;
this.easyUAClient1.IsolatedParameters.SessionParameters.UserIdentity.UserNameTokenInfo.UserName = "myUsername";
this.easyUAClient1.IsolatedParameters.SessionParameters.UserIdentity.UserNameTokenInfo.Password = "myPassword";


This is how I am able to read even if the NodeId is null.
(Not shown here, unable to take screenshots right now)

Just to make sure, let me give you a step-by-step example (previous OPC UA server and current have the same variables and NodeIds):
A variable had (on the first server I've worked with) the NodeId nsu=SinumerikVarProvider;ns=2;s=/Channel/GeometricAxis/actProgPos[u1,5];
Right now, on UaExpert - under the Attribute tab, I can see that the NodeId is null;
If I use the modified sample of the EasyOpcUaDemo and read on the NodeId nsu=SinumerikVarProvider;ns=2;s=/Channel/GeometricAxis/actProgPos[u1,5], the server responds with a BadNodeInvalidId;
If I check on UaExpert the variable's BrowseName, convert it to a NodeId (nsu=SinumerikVarProvider;ns=2;s=/Channel/GeometricAxis/actProgPos) format and use the modified sample of the EasyOpcUaDemo to read its value, I get a correct reading;

5) Please post a code that you used when doing "I'm not able to Subscribe (BadNodeIdInvalid) to said attribute"


I've now solved this. Apparently I needed to install the server's certificate in order to be able to subscribe.

So, to sum it up, I'm still not able to get the NodeIds but I can read/subscribe to variables using the attribute "BrowseName". Has this ever happened to you?

Thank you for your time and patience.
Best regards
Attachments:
Last edit: 20 Apr 2018 14:19 by FrancescoZ. Reason: Added content

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

More
20 Apr 2018 11:23 #6246 by support
Dear Sir,

I am sorry but I do not get large parts of your answer. I suspect you improperly using some OPC UA terms which makes it difficult for me to understand.

1) First of all, what are you are trying to achieve? In your original post, the problem was with browsing. Now it looks like that you are referring to reading. Can you please explain. And, what is the larger goal?

2) In your original post, you wrote "values on it can be viewed using the application “UaExpert DataAccess View” even though their NodeId is apparently null.". Can you please send a screenshot of this, because I find it hard to believe.

3) You wrote "One thing I've noticed is that I can read a value using the attribute on UaExpert named BrowseName on the modified application". I do not understand what are you trying to say. Are you saying the reading BrowseName is possible using UaExpert, or are you saying that it is possible using an application written with QuickOPC - and if so, why is UaExpert mentioned? If reading is possible using QuickOPC, post the code here.

4) Can you please post a screenshot that illustrates the same sentence ("One thing I've noticed is that I can read a value using the attribute on UaExpert named BrowseName on the modified application") and "this one is different from the NodeId (which is null) but contains a namespace index and a string (e.g. 2,node1/node2/varname that I convert to "nsu=machinename;ns=2;s=/node1/node2/varname").

5) Please post a code that you used when doing "I'm not able to Subscribe (BadNodeIdInvalid) to said attribute".

Best regards

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

More
20 Apr 2018 10:08 #6245 by FrancescoZ
I've followed your instructions and added the
Isolated = true
, but the problem persists.

One thing I've noticed is that I can read a value using the attribute on UaExpert named BrowseName on the modified application: this one is different from the NodeId (which is null) but contains a namespace index and a string (e.g. 2,node1/node2/varname that I convert to "nsu=machinename;ns=2;s=/node1/node2/varname").

For some reason, though, I'm not able to Subscribe (BadNodeIdInvalid) to said attribute; is there a workaround?

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

More
19 Apr 2018 11:00 #6242 by support
I think you are missing something, and in effect the username/password are not used.

There are three ways you can set them:

1) When the easyUAClient.Isolated property is 'false' (the default), you can set them in the static property EasyUAClient.AdaptableParameters.UserIdentity. This affects all non-isolated EasyUACLient instances.

2) When the easyUAClient.Isolated property is 'true', you can set them in the instance property EasyUAClient.IsolatedParameters.UserIdentity.

3) In addition to identities given by 1) or 2), you can set user identity for an individual connection inside the UAEndpointDescriptor passed to the EasyUAClient methods - in its UserIdentityProperty.

Your code tries to use method 2) above, but does not set the 'Isolated' to true.

Best regards
Zbynek

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

More
19 Apr 2018 07:13 #6241 by FrancescoZ
To set the username and password, I have added these lines to the MainForm.designer.cs:
this.easyUAClient1.IsolatedParameters.SessionParameters.UserIdentity.UserNameTokenInfo.UserName = "myUsername";
this.easyUAClient1.IsolatedParameters.SessionParameters.UserIdentity.UserNameTokenInfo.Password = "myPassword";

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

More
18 Apr 2018 18:07 #6239 by support
Can you please describe how do you set the username and password? Which properties do you modify - or post a piece of code (without the actual values...) here.

It could that when this is not done right, the user is actually not authenticated and the server gives an empty address space to this "unknown" user.

Best regards

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

Moderators: support
Time to create page: 0.085 seconds