Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [milo-dev] Subscribe to repeated values

Isti,

If this can be accomplished at all it would be by creating your MonitoringItems with a filter that uses DataChangeTrigger.StatusValueTimestamp. The default is DataChangeTrigger.StatusValue, meaning only changes to Status or Value are reported. Unfortunately some servers do not record Timestamp-only changes, e.g. the embedded server in the Siemens S7-1500 does not update the timestamp unless the value has also changed.

If you are using the ManagedSubscription API you can set the DataChangeFilter (which defines the trigger) like this:

DataChangeFilter filter = new DataChangeFilter(
    DataChangeTrigger.StatusValueTimestamp,
    uint(DeadbandType.None.getValue()),
    0.0
);

subscription.setDefaultDataFilter(filter);

All subsequent MonitoredItems you create with that subscription will have the new filter.

On Tue, Nov 17, 2020 at 3:09 AM Békési István <istibekesi@xxxxxxxxx> wrote:
Hi There,

I'm pretty new to OPC UA and I was playing around with the tools and subscriptions.

My question is, how can I subscribe to a node that sometimes publishes the same value as the previous one?

Story in details:
I've created a simulated node, publishing random values between 1-6 in every second (basically a dice roller machine).
image.png
After subscribing to such a node, I cannot receive repeated values. Is there a way to do so?

Kind regards,
Isti




_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev

Back to the top