Best practices for handling bad values?

Discussion created by rmoynes on Feb 24, 2010
Latest reply on Feb 25, 2010 by spilon

We're trying to get 1 minute averages for a particular point using VB.Net 2005 code like this:


myValue = myPoint.Data.Summary(minuteStart, minuteEnd, PISDK.ArchiveSummaryTypeConstants.astAverage, PISDK.CalculationBasisConstants.cbTimeWeighted)


The code throws this exception:
"Unable to read tag FI-B626  Error Calculation failed."


Looking at the tag in Processbook, it shows "Under Range".  Looking at the actual value with an OPC client, it's showing just a little below zero (-0.00something).  The zero for the tag is 0, span is 150.  The pointtype is float16.


I think in the past we've changed a few tags from float16 to float32 to get rid of the "Under Range", but I can't remember for sure.  The real PI expert is gone for the day, so that's something we'll try tomorrow.


Even if float32 does solve our immediate problem, it doesn't solve other situations like "I/O Timeout" or "Shutdown".  We have a few different ways we've dealt with this in the past, but decided to ask the experts what the best practices are.


So, experts, what are the best practices for handling bad values?