Subscribing to bulk tag change events

How to call a common gateway script function for a bulk of tag change events from a folder or individually subscribed tags thru a script function or script playground? The function called should also get the tag path of the changed tag.

I may be missing something, but isn’t that what gateway event scripts are for?

1 Like

Thanks Jordan for pointing out the documentation . It addresses pretty much all my concerns . I was not sure if and how can we subscribe to 1000’s of tags for tag change events and how does ignition handle them ! I am not sure even now if 1000 tags (analog or digital ) change every second will so many threads will be spawned to handle them? Are there any limitations or guidelines how to handle them ? Looks like version 8 has even wild card character support for bulk subscription such as tags under a folder!
Thanks a lot. This is what I was looking for. Well done ignition!

My guess is, Ignition may be able to queue about 5 to 10 tag change events in separate threads at a time and any events beyond that may be lost if threads are not returned (processed) before new events occur. But I still see a potential for loss of events if they happen in quick succession such as in case of plant trip condition where there are rapid changes in tag values. Someone may throw some light on this please if I am off the track!

Another question was , how to define or add to the list of tags for tag change , thru scripting functions?

regards

Thanks Jordan for pointing at the discussion on another thread. He is talking about the same situation of 1000’s of tag changes within a short span. So i get now that there are two types of change events one can define (1)- value change tag events (defined on the tag), and (2) - gateway tag change events (defined as a gateway script with a list of tags to monitor). I was confused between the two.

The scenario I was thinking of is like an MQTT client subscribing to all tags in an edge device which could be 1000’s or even 10,000’s ! There could be about 40 to 50% of them changing within a second depending upon scan rate of each of them in the PLC and status of the plant (steady state or transient). Missing of even one event could lead to a mismatch in their status in the clients and host and server data bases, until same tag changes again next time! This could be undesirable or even catastrophic in some situations! It may perhaps be safer to synchronize the complete data bases once in a while so that statuses of all tags catch up and remain synchronized. Of course its a hypothetical situation, but a practical one. Or MQTT handles these events in a different way?

Another thing I wanted to know is how to subscribe to a large number of tags from gateway scripts? Do we have to add them manually one by one or can we give a folder name and recursive option there? Version 8 seems to support some ‘*’ options but what about previous versions? That is what I was asking about if a scripting function is available that allows passing an array of tag paths read from a file etc?

1 Like