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