<< Click to Display Table of Contents >>
OnTagRead |
OnTagRead(Tag)
Occurs during a Tag reading, whenever the I/O Driver returns a new value or an error. This means that if a Tag value or Tag quality do not change, this event is not triggered. For this event to work, the EnableDriverEvent property must necessarily be enabled. In addition, the PercentDeadband property can also influence this event, if the EnableDeadband property is enabled. Example:
Sub Tags_OnTagRead(Tag)
Set Obj = Application.GetObject("Data1.TagName")
Obj.Value = Tag.Name
Set Obj = Application.GetObject("Data1.TagRead")
Obj.Value = True
Set Obj = Application.GetObject("Data1.TagType")
Obj.Value = TypeName(Tag)
End Sub