Count System Digital States in a digital tag

Discussion created by kokolopr on Jun 17, 2014
Latest reply on Jul 2, 2014 by kokolopr

Hello everybody


I am trying to count number of bad digital events (system digital states) in a digital tag. I am using the following PI SDK function to filter them..


mypoint = myserver.PIPoints.Item(pitagname)

If myserver.PIPoints(pitagname.Trim).Data.Collecting = True Then
          'fetch events function and loop through events one-by-one

          myvalues = mypoint.Data.RecordedValues("-30d", "*", Nothing)
          mydigtotalEvents = myvalues.Count




But all digital tag events are failing the data.collecting feature, why? How to go about it?




Thanks in advance




Saudi Aramco