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.

Read array of byte return null

More
13 Jun 2018 11:54 #6442 by mpp
Replied by mpp on topic Read array of byte return null
We're using a Schneider Electric PLC and it has OPC-UA capabilities.
We are definitely not configuring it correctly.

Many thanks for your help

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

More
13 Jun 2018 10:16 #6439 by support
This has to be resolved on the server side. You cannot "convert" the folder to a byte array. Either the server actually provides a different variable somewhere else where the array is actually readable, or the server needs to be configured differently, or perhaps it does not have that capability through OPC UA at all - all of this can only be answered by the server vendor.

Best regards

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

More
13 Jun 2018 07:56 - 13 Jun 2018 07:56 #6438 by mpp
Replied by mpp on topic Read array of byte return null
Hi,

I downloaded UAExpert and the result is the same.

If I read the full array it shows Null in the DataType column and an empty cell in the Value one.
If I read a single value of the array it shows Byte in the DataType column and its current value.

I can also see that the array has properties:
  • NodeClass = Object
  • HasTypeDefinition = FolderType
Is it correct?

How can I convert "Folders" in byte arrays?
Is it something I can do from c# or it is something that I have to fix on the UA Server?

Thanks again,
Last edit: 13 Jun 2018 07:56 by mpp.

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

More
12 Jun 2018 15:24 #6434 by support
Hello,

this looks more like a server issue. Have you tried reading the array with some other OPC *UA* client, and what were the results?

Thank you

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

More
12 Jun 2018 15:01 - 12 Jun 2018 15:11 #6433 by mpp
Hi,

I am using the OPC UA lib (5.35).
I'm new to OPC UA, maybe I missed something in the documentation.

I want to read a byte array but the return value is null (also the return type):
var a = easyUAClient.Read(serverDescriptor, "nsu=OpcUaServer;ns=2;s=Application.array_bytes");
//returns {(null) {} @6/12/2018 5:02:27 PM @@6/12/2018 5:02:27 PM; Good}

I am able to access the single array values:
var b = easyUAClient.Read(serverDescriptor, "nsu=OpcUaServer;ns=2;s=Application.array_bytes[1]");
//returns {234 {System.Byte} @6/12/2018 5:01:22 PM @@6/12/2018 5:01:22 PM; Good}

And if I try to get the
UAAttributeId.ArrayDimensions
value I get 10 which is correct.

If I read the full array with OPC Classic I do not have any problem.

Am I doing something wrong?


Thanks
Last edit: 12 Jun 2018 15:11 by mpp.

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

Moderators: support
Time to create page: 0.064 seconds