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.

Dynamic addressing of array position in a PLC using EasyUAClient

More
19 Nov 2022 16:51 #11214 by support
Hello.

I think that the second link you provided (www.progea.com/forums/topic/opc-ua-dynamic-addressing/ , after correction), refers to a different concept altogether.
However, I think that you are talking about the same thing that I described - that is, from perspective of the client, there are items/nodes that may not be visible/browseable in the address space of the OPC server, and that are effectively created by the simple fact that the client uses them in reads/writes/subscriptions, provided that the string ItemID/NodeId conforms to some server-defined syntax from which the server can parse out the register address, or element index, or whatever is needed to access the data.

This should be perfectly well supported by QuickOPC.

You wrote "I keep getting a BadUnexpectedError when the EasyUAClient tries to write to them, even though the DA client that comes with the KepWare could dynamically write to them without problem. " Well, there is almost no conclusion that can be drawn from this test, because you used OPC DA communication in one test, and OPC UA in the other. I suggest that you try some other OPC UA client - such as the popular UaExpert, to see if you can write over OPC UA with it. If you can do it with some client, I would be more than willing to investigate why QuickOPC fails in the same operation.

Best regards

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

More
19 Nov 2022 12:34 #11213 by lafondrobert
Hi,

Let me first thank you for such a quick response. By dynamic addressing I mean a tagpath used by the EasyUAClient to read or write to a tag in a PLC when the tag is not configured in the OPC server. It may not be a very widespread used technique but it does exist.
dynamicAddressinghttps://support.softwaretoolbox.com/app/answers/detail/a_id/2631/~/can-i-use-dynamic-tag-addresses-with-the-top-server-opc-ua-client-driver%3F
www.progea.com/forums/topic/opc-ua-dynamic-addressing/https:...pic/opc-ua-dynamic-addressing/

For instance the KepWare OPC server provides a simulation driver that can be addressed dynamically. You can either map a tag into the KepWare on a configured channel and device, declaring its address within the driver and a name for it, or you can simply configure the channel and device into the KepWare and let the client handle dynamically the mapping by providing the device memory address. Say K0100 in the KepWare simulation driver. Without mapping it into the Kepware you would simply let the EasyUAClient access it by using a node descriptor such as nsu=KEPServerEX ;ns=2;s=Channel1.Device1.K0100@short to read or write an Int16 value to this tag. I could successfully dynamically access the tags of the simulation driver with the EasyUAClient but when I tried it on our Alan Bradly PLC in our lab which runs a program that only exposes tags in arrays I keep getting a BadUnexpectedError when the EasyUAClient tries to write to them, even though the DA client that comes with the KepWare could dynamically write to them without problem. So before I spend too much time trying to figure out this thing (which I have already) I was wondering if there is a known limitation in this area.

Again, thank you for the quick follow up. greatly appreciated
Best regards

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

More
19 Nov 2022 07:52 #11211 by support
Hello.

There is no known bug in the area, however I do not know what you mean by "dynamic addressing". There is no such term in either OPC DA or OPC UA.

It is possible to read/write/subscribe a subset of an array in OPC UA ("index range"); but OPC DA does not have that, so it's not clear how you can "have it working.... with DA client".

In both OPC DA and OPC UA, the server is free to expose elements of an array as individual items (nodes). In such, case, the client does not even know that it is dealing with an array element, it looks like any other item (node).

Best regards

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

More
18 Nov 2022 23:19 #11210 by lafondrobert
Is there a known bug concerning dynamic addressing of array position using EasyUACLient? I have had it working with DA clients (havn't tried it yet though with the EasyDAClient) . EasyUAClient can write to a simple PLC tag (not addressed through array indexing) using dynamic addressing but any of the EasyUAClient Write functions will raise an exception when using an array indexed position for addressing directly within the PLC via the OPC Server (tag not configured in the OPC server). This is a must for us as dynamic addressing is heavily used throughout the company.

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

Moderators: support
Time to create page: 0.060 seconds