OPC-UA device protocol - cyclic read vs. subscription

The OPC-UA device protocols allow to choose between 2 mechanisms for data reporting:
https://cumulocity.com/guides/protocol-integration/opcua/#data-reporting

Cyclic read vs. subscription.

What are the pros & cons for each mechanism?
When should subscription be used and when not?

From the first glance cyclic read works fine and is easier to setup.

Thanks for any advice!

1 Like

Hi Kai,

Cyclic Read is just polling the value every x seconds. This leads to a lot of data event when the value in the OPC-UA Server does not change.

As subscription can be configured to give only updates of the value if something changes. E.g. value, status or timestamp. Even more sophisticated is the deadband value where you can define over which threshold from the last value you would like to get a reading (e.g. 10% more).

I always prefere subscription over cyclic read.

Regards,

Marco

4 Likes

Hi Kai,

Marco did already summarize it very well. I would like to add something. If your OPC UA Server supports subscription you should use subscription, that is the standard way to go. However, there are OPC UA Server out there which don’t support subscription. For that reason, cyclic read is available as workaround. The OPC UA gateway is frequently doing a read, nothing else…

Best regards,
Alex

PS:
Have a look at unified-automation (a good source about OPC UA) High Performance OPC UA Server SDK: OPC UA Subscription Concept

4 Likes