OPC Tag Registration Through Designer

Hi All,

I’m currently working on a device driver project and I’m having trouble understanding the connection between the designer’s OPC client and the node manager in the module. I understand how OPC nodes are configured and registered from within the module, however, the connection between the designer’s OPC client and the module is not clear to me.

When a new tag is created within the designer is there an event triggered which can be used to register a new node? And in a similar way, how can tag configuration changes in the designer be tracked in the module so that the relevant node can be updated?

When this happens it ultimately ends up as a notification to your driver to subscribe to something.

These are irrelevant to you unless it’s a tag group change or rate change, which you end up seeing as unsubscribe and subscribes.

If you are implementing com.inductiveautomation.xopc.driver.api.Driver and related interfaces (instead of the newer Device), you must implement a ModelChangeListener that will let you know about new subscriptions you must execute. In ModelChangeListener.itemsAdded(), Driver.readItems(), or Driver.writeItems(), it is up to you to immediately instantiate a node for each given nodeId, or reject the item with a bad status. But don’t instantiate it blindly–check if you’ve done so already. (Your own NodeManager<UaNode> can handle such lookups.)

1 Like

Note: Switching to the Device model instead of the Driver model is on my to-do list some time after 7.9 is EOL. I gather only the very newest IA drivers are on the Device model themselves.

FINS, BACnet, and all new drivers use the Device model. Any rewrites will use Device as well. Legacy AB drivers will likely be implemented against Driver forever.

1 Like

Thanks a lot for the prompt replies.

The driver being implemented is based on the current OPC-UA-Device example (so using the new device model). I can’t see anything in the 8.1 Javadocs on how I can access these notifications being sent from the designer and use them to subscribe. Would either of you be able to point me towards any relevant docs please?

Also, is the current process similar to what @pturmel has described for the Driver interface?

In the example Device implementation onDataItemsCreated and onDataItemsDeleted are called when items are being subscribed or unsubscribed. These are the equivalent calls to what the ModelChangeListener Phil mentioned would receive.

To be clear, you aren’t “receiving notifications from the designer”. You are providing Nodes in an OPC UA address space that OPC UA clients can read, write, browse, or subscribe to attributes of. Ignition has an OPC UA client connection to its own OPC UA server. Various actions you do in the designer with the OPC browser and creating OPC tags correspond to things like reading, writing, browsing or creating/deleting monitored items against an OPC UA server. And those things are the same whether its our OPC UA server or a third party one like Kepware.