OnRead

<< Click to Display Table of Contents >>

 

OnRead

OnRead()

Occurs when an I/O Driver performs an I/O Block reading. Use this event to perform some operation right after data is modified in an I/O Block object, such as the Quality, TimeStamp, or even the Value property of some of the I/O Block Elements. The next script contains an example of using this event.

Sub IOBlock1_OnRead()
  ' When reading a block, assign to the InternalTag1 tag
  ' the value of the block element elm1.
  Set obj=Application.GetObject("DataServer1.InternalTag1")
  Set elm = Application.GetObject("Driver1.IOBlock1.elm1")
  obj.Value = elm.Value
End Sub

Was this page useful?