2 Replies Latest reply on Mar 17, 2017 4:31 PM by ekuwana

    Limiting big values



      I have a situation where some values of a pipoint become very large (1.34E+38). This happens when some sensors are not connected. We use the AF SDK to get at the pi archive data via getRecordedValues(). It causes issues when we go to show the data value.

      Is there a way to configure the archive to limit the data to MAX system double? Or will this have to be handled  in our code?


        • Re: Limiting big values

          I think there are 2 ways to approach this.

          You may want to retain the 'true' value for the pi point in the data archive as it may indicate some parameter that may be of use for later analysis or comparisons. E.g. if it is the impedance measurement returned by the sensor for an open circuit, the value may be high but it might be a good idea to keep it to detect any changes to the circuit.

          Since the issue arises when you try to display the values, it is best handled in the client code.


          The other approach is to treat  the value as 'out of bounds'. There is no direct way of restricting the incoming value to the server, but you can have a Performance Eq(naturally triggered) to bound the values as soon as they come in. If the sensor value is coming from a custom application you can impose restrictions there.


          I prefer the former approach and we can have a better handle on things in a customized manner. One other regarding displaying PI data, if you are not looking to display all the point values with great precision, it is better to use the PIPoint.PlotValues Method.

          2 of 2 people found this helpful
          • Re: Limiting big values

            Hi Mike,

            You can pass in 'filterExpression' to RecordedValues method e.g.

            point.RecordedValues(timeRange, boundaryType, String.Format("'{0}'<1000",point.Name), false);

            2 of 2 people found this helpful