Maintaining Statistics

VTScada communication drivers keep at least the following statistics:

LastError The error code number of the last error encountered by a communications attempt. Unlike the Value variable, LastError is not reset to zero when the error clears.
TimeStamp The time of the last successful communication, measured in the number of seconds since midnight.
DateStamp The date of the last successful communication measured in days since January 1, 1970.
ErrorTime The time the last error occurred, measured in seconds since midnight.
ErrorDate The date of the last error, measured in days since January 1, 1970.
ErrorOwner An object variable that holds the object value of the read or write statement that encountered the most recent error.
SCounts,
SDateStamp,
SError,
SErrorCounts,
SErrorDate,
SErrorTime,
STimeStamp
These are arrays of 255 elements, with one element for each possible driver instance. The elements contained in the array correspond to the name of the array.
Version A text variable that is set to the version number of the driver when the driver is started.

In addition to the statistics that the driver maintains, the VTSRead module maintains statistics for each read attempt that is returned to the VTSDriver module (in VTSDrvr.web). The three statistics that must be returned when VTSRead is finished are:

  • Counts: The number of successful communications since the driver started.
  • ErrorCounts: The number of errors since the driver started.
  • Error: The error code number of the current communication attempt. Error is set to zero when the error clears.