Quantcast
Channel: OSIsoft Users Community
Viewing all articles
Browse latest Browse all 1120

VBA - Value.GetValue VRStatus Possible Codes

$
0
0

Hello everyone,

 

I am working with a PB that reads a PI value from a value box from but on occasion I get some bad values across the inbound feed.  I am using the Value.GetValue (variable, vrstatus), I checked the help for the vrstatus of the GetValue and there are no numeric codes for what vrstatus could be.  My VBA code is trying to account for bad data, I started with using the IsNumeric but to no luck.  Has anyone else come across this, see the screenshots for the words 'Bad' and 'Not Connect'.  Any advise would be great - thanks everyone.

 

Here is a sample VBA code I use.

 

Dim val As Variant
val = Value.GetValue(vdate, lstatus)

 

If Not IsNumeric(Value.GetValue(vdate, vrstatus)) Then
    GoTo exit_point
End If

 

When I am getting one of these weird values, I just want the VBA code to pass by it - these unusual values only happen about once per week.

 

Thanks.

Attached Images

  • Bad_Value.JPG
  • Not_Connect.JPG

Viewing all articles
Browse latest Browse all 1120

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>