WriteRecord

<< Click to Display Table of Contents >>

 

WriteRecord

WriteRecord()

Inserts a new record on a Database. Values are obtained from current values of each variable specified as data sources for Historic fields. This method is used in two situations:

To write a new record before the time configured for the next recording when a Historic is enabled by time

To write a new record when a Historic is disabled

 

Example:

Sub Tag1_OnValueChange()
  ' Writes a new record on a Historic
  ' when a Tag changes its value.
  Application.GetObject("Hist1").WriteRecord()
End Sub

Was this page useful?