Tags Reported by Events.

Tags reported by events can return more than one value at every reading or return no value at all. Tags reported by events aim to read data on demand, usually stored on a Driver until read by a reading operation. They are generally used for reading events, mass memory data, and unsolicited messages received from a device.

Driver’s documentation must specify which Tags available to an application are reported by events. The most common usage is to collect SOE (Sequence of Events). For example, on devices that store really fast variation sequences of digital Tags in memory, or that store telemetry data in memory tables, this data can remain stored in those memory tables, such as in the following figures.

For the first example, one I/O Tag is needed to read value A. The Time field is returned in Tag’s TimeStamp property. For the second example, on the other hand, one I/O Block Tag with six Elements (from A to F) is needed, with the Time field once again returned in Block’s TimeStamp property.
In common Tags, not reported by events, a scan time can be configured, which determines a period to read that Tag. At every reading operation, that Tag returns a value (I/O Tag), a block of values (I/O Block Tag), or else returns an error. To read all tables previously described, in this case, three reading operations are needed in every table to read three events, that is, three table rows.
Tags reported by events can also allow configuring a scan time. For these Tags, however, every reading operation can return a series of values or blocks of values, with their own quality and timestamp, that is, when using Tags reported by events to read those previous tables, users can get those three events (data from three rows of every table) at once, on a single reading operation (a single scan).
Reading values returned by Tags reported by events is performed through Tag’s OnRead event. At every reading operation that return values, an application triggers a series of OnRead events. For every returned value or event, an application fills Tag’s properties (value, timestamp, and quality) with values from a specific event, and then triggers an OnRead event.
In case a Driver does not have events or values to return, that reading operation reported by events, unlike common Tags, may not return any data nor generate any error, as if this operation had never occurred.
A scan time of Tags reported by events can be usually configured with a low value, because CPU consumption, in case there is no value to return, is usually irrelevant.
The TimeStamp property of these Tags usually contains a device-provided value.

NOTE: Tags reported by events must be configured with their EnableDeadBand property disabled. This avoids that events with very close values to be discarded by an application.

 

Este artigo foi útil? Was this post helpful?
Yes0
No0

Leave a Reply

Your email address will not be published.Required fields are marked *