Skip to main content Skip to footer

Search Crosser Knowledge Base

Dynamic tag lists with OPC UA

When getting data from OPC UA servers into a flow using the OPC UA Subscriber or Reader modules there are 3 ways to specify which tags (nodeIds) to get:

  • List them in the module settings.
  • List them in a resource file.
  • Provide them dynamically as part of the flow.

The first two are the most common, but sometimes the third option is useful and this is the focus of this article.

The OPC UA Reader/Subscriber modules can receive a list of nodeIds on the incoming messages, by assigning a list on a specific property (same format as the resource files):

"opcuareader": {
    "nodeids": [
      {
        "nodeId": "ns=2;i=4",
        "name": "test1"
      },
      {
        "nodeId": "ns=2;i=5",
        "name": "test2"
      }
    ]
  }

These lists can be updated at any time and the data to get will be a combination of all nodeIds defined through any of the three methods mentioned above.

Some examples of using this functionality:

  • You want to automatically update the list of tags based on changes in the OPC UA server, e.g. tags are added or removed. To do this you can use the OPC UA Browser module to get an updated list, optionally filter the list using the Array Filter module, and send the updated list to the OPC UA Reader/Subscriber module. Based on the expected frequency of updates you can decide when to run this part of the flow.
  • You have the list of nodeIds stored somewhere else, e.g. in a database. Then add modules to get data from the external system and feed it into the OPC UA modules. Trigger the extraction of the external data using an external trigger, or do periodic updates to make sure the latest tag list is being used by the flow.

About the author

Goran Appelquist

Göran has 20 years experience in leading technology teams. He’s the lead architect of our end-to-end solution and is extremely focused in securing the lowest possible Total Cost of Ownership for our customers.

"Hidden Lifecycle (employee) cost can account for 5-10 times the purchase price of software. Our goal is to offer a solution that automates and removes most of the tasks that is costly over the lifecycle.

My career started in the academic world where I got a PhD in physics by researching large scale data acquisition systems for physics experiments, such as the LHC at CERN. After leaving academia I have been working in several tech startups in different management positions over the last 20 years.

In most of these positions I have stood with one foot in the R&D team and another in the product/business teams. My passion is learning new technologies, use it to develop innovative products and explain the solutions to end users, technical or non-technical."