2 Replies Latest reply on Dec 4, 2017 3:18 PM by tswift

    Values in E-20 and Above for PI tags


      Hi Team,


      I've tags which are showing values E-16 and above. Is there is any way to restrict this values or round off these values.


        • Re: Values in E-20 and Above for PI tags
          Roger Palmen

          The values are correct, i presume that you need to round these in a display.

          There are a few approaches:

          • You can change the datatype of the PI Points to have less accuracy, e.g. from float64 to float32 or float16. But that does not address this fully
          • You can set the digits property of the PI Point to decrease the # of digits, but that won't get rid of the E-19.
          • When viewing the data in a client like processbook, you can do the rounding there. But i don't use Processbook, so don't know the details.
          • When using AF, you cound use a formula using roundfrac('attribute', digits) to create a rounded value for use in displays. This is the method i use most.
          • You can wait for the next version of PI Vision 2017R2 that allows to configure the value formatting.
          5 of 5 people found this helpful
          • Re: Values in E-20 and Above for PI tags

            Roger has some great suggestions for rounding those values in a display. I just have a couple of points to add.


            This may be a situation where you don't want to store those values at all. I'm always wary about values this small since they're so close to the limits of double precision. This can cause numerical issues down the line. For example, 1 + [any of the values] would be stored as the exact same float64 number. I'd need to know more before making any recommendation:

            • Are values for this tag always that small?
            • Where do the values come from?
            • Are they "raw" or calculated?
            1 of 1 people found this helpful