WriteEx

<< Click to Display Table of Contents >>

 

WriteEx

WriteEx([NewValue], [NewTimestamp], [NewQuality])

Allows changing an Internal Tag's value, time stamp, and quality in a single operation. This method returns a Boolean indicating whether the operation was successful or not.

The NewValue parameter specifies the Tag's new value. If omitted, Tag's value does not change. The NewTimestamp parameter specifies a Tag's new date and time. If omitted, uses the date and time from the moment of this method's call. The NewQuality parameter specifies Tag's new quality. If omitted, assumes a Good quality (192). Example:

Sub CommandButton12_Click()
  Dim Ret
  Ret = Application.GetObject("Data.InternalTag1")._
    WriteEx(123.456, "1/1/2001", 193)
  If Ret Then
    MsgBox "It works!"
  Else
    MsgBox "Failed!"
  End If
End Sub

Was this page useful?