Thursday, March 8, 2012

Excdev/Compdev vs. Excdevpercent/Compdevpercent


There are two ways of configuring data compression in PI... and there seems to be a lot of confusion surrounding it:
  1. As absolute value
  2. As percent of span

Absolute Value - excdev, compdev


Most people understand setting excdev and compdev best. pH is a parameter that goes from 1 to 14. If you think increments of 0.01 are significant to your process and you think that your pH probe can measure pH that accurately, then you ought to set excdev = 0.01, compdev = 0.005 (see the whitepaper).

PI SMT

Excdev and compdev hold values measured in the engineering units of the parameter being measured. In the previous example, 0.01 pH units. If your tag is measuring temperature, it'd have engineering units of degC or degF or K.

Because excdev and compdev are expressed in terms that you can relate to, this is the most popular method of speciying the compression settings.

Percent of Span - excdevpercent, compdevpercent


The less popular method of setting compression is by specifying the compression settings as a percentage of span.

What does "Percent of span" mean?

Every PI point has a SPAN attributes. The SPAN is the largest value you expect the tag to archive. In our pH example, there is no such thing as a pH greater than 14, so people often set SPAN = 14.

When you specify compression settings with excdevpercent/compdevpercent, what you do is you set it equal to the percent of the range. For example, suppose we wanted to set the exception to 0.01 pH units. We can do that by doing this calculation:

excdevpercent = excdev / ( SPAN ) * 100

excdevpercent = 0.01 / 14 * 100

excdevpercent = 0.0714

As a caveat, this number is computed as a percent of SPAN and not as a percent of the range (SPAN - ZERO).

This seems like a lot of trouble - why bother doing this calculation when you can set the actual value? Here's why:

If you have a lot of points to configure, you don't have time to go through each one. Also, more often than not, your user requirements are specified as a percent of the range of the instrument. This is why it is sometimes faster, more efficient to configure data compression with the exc-/compdevpercent settings.

What happens if I specify both?


Under the hood, if you specify EXCDEV or COMPDEV, the PI Server will compute and store the values as EXCDEVPERCENT and COMPDEVPERCENT. If you specify them as percentages, they'll simply be stored as the percentages.

If you happen to specify both the -dev and -devpercent, the -devpercent will override the -dev settings.

No comments: