1 Reply Latest reply on Dec 8, 2011 11:44 PM by michaelh

    Trapping for "No Data"

    ccheno

      Looking for suggestions and code examples of how to trap and handle when there is no data for points ACE is referencing. Be it, point still in "Pt Created" or point that has not updated in months.

      What I'm doing is pulling past months data, run calc and output result. What I've come across:

      1. Is that equip can be out-of-service for months at a time and does not update to PI. Point CurVal could be from June and I'm trying to pull Octobers data (does not exist).
      2. This is actually for new equipment, not yet placed into service, but the points exist. Being new, all points still reporting "Pt Created". I'd like to get this calc created and scheduled and not have to worry about gonig back later to add it once it comes on line.

      I don't want to report "Calc Failed" in these cases, but rather write "no data available for calc", "No Data" or some equivelant System State (even I have to create/add it).

       

      Appreciate your thoughts and ideas.

       

      Thanks,
      Cory

        • Re: Trapping for "No Data"
          michaelh
          Do you want to distinguish between Bad Data and the Pt Created case, or is this just the same default bad value handling ? --> provide specific code, use myPoint.IsGood to be sure to work on numeric data. Stale data has to be handled individually. ( you can easily compare the snapshot event time with the current exetime, but that needs to be your code, of course. )

          Handle the bad case(s) as needed.

          Probably Input Bad Value Substitution is not what you're looking for.
          Output Bad Value Substitution is perhaps not flexible enough neither. I prefer to define the behavior in code, but you should be aware of that possibility.

          "Calc Failed" should always be reserved for bad error handling ;)