Applies To:
  • CitectSCADA 5.xx, 6.00
  • CitectHMI 5.xx, 6.00

When using Citect Tags inside CiVBA functions, the values are not correct.

CiVBA does not read latest Citect tag values for all tags when processing functions. Only tags which are displayed on pages will be read correctly, all others will be cached values.

The workaround for this is to create a wrapper function to call a Cicode TagRead() thus ensuring the current tag value is used. See example code below:

Function GetValue(Byref tag As String) As Variant

    Dim TagVal As Variant

    If CicodeCallOpen("TagRead", tag) = 0 Then

        TagVal = CicodeCallReturn()

    End If

    GetValue = TagVal

End Function

NOTE : This workaround is not required when writing to Citect tags using CiVBA.

Citect has confirmed this to be a problem in CitectHMI/SCADA version 5.40 to 6.00. We are researching this problem and will post new information here as it becomes available.


Tag Value CiVBA