Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPC UA Protocol Adapter - Subscribe directly to FolderType objects #342

Open
prairiesnpr opened this issue Mar 27, 2024 · 1 comment
Open
Labels
tracked Tracked by an external ticketing system

Comments

@prairiesnpr
Copy link

Problem or use case

When configuring subscriptions for the OPC UA protocol adapter, it would be cleaner to subscribe to an object, in this case of type FolderType, instead of subscribing to each individual tag.

For example, if I want to subscribe to Tag.P101, I need to subscribe to the following tags.

  • Tag.P101.AFLT
  • Tag.P101.ATRIPD
  • Tag.P101.ILOK
  • Tag.P101.NAUTO
  • Tag.P101.NEBL
  • Tag.P101.NINHIBIT
  • Tag.P101.NMM
  • Tag.P101.NSTP
  • Tag.P101.NSTRT
  • Tag.P101.PRMT
  • Tag.P101.QMODE
  • Tag.P101.QSTOP
  • Tag.P101.QSTRT
  • Tag.P101.WINHINCLK
  • Tag.P101.XLORL
  • Tag.P101.XLORR
  • Tag.P101.XSTOPD
  • Tag.P101.XSTRTD
  • Tag.P101.YSTRT

This counts against the 100 subscription limit, and causes the UI to lag when you are at the maximum subscriptions as well as being way more work to configure if you want to return all tags in a folder.

Attempting to subscribe to Tag.P101 will return an Invalid Address error.

Preferred solution or suggestions

Enable subscriptions to the root tag. Looking through the docs, it specifies the return JSON for an object, but maybe this doesn't include FolderType objects.

@sfrehse sfrehse added the tracked Tracked by an external ticketing system label May 7, 2024
@DC2-DanielKrueger
Copy link
Contributor

DC2-DanielKrueger commented Jul 29, 2024

Hallo @prairiesnpr ,

I looked into the problem and believe milo does not support subscribing to an object node unless for events created on that node. In fact I believe opcua does not support that at least in the 1.3 version which milo targets with their official releases.

The only possibility I see is to browse the referenced nodes, collect them and create a MonitoredItem for each of them.
What attributes of these nodes are interesting for you? Only the Value attribute of the "child" nodes?

The return type of object is needed to be able to represent complex custom data types (like structs/ExtensionObjects). Even the standard QualifiedName datatype needs an object as it has two fields.

Best regards,
Daniel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracked Tracked by an external ticketing system
Projects
None yet
Development

No branches or pull requests

3 participants