Hello All,

We have tried to build a calculation to determine the running hours of a compressor, based on its status (1-Online, 0-Offline). The calculation is used to determine the total running hours from 8AM -8AM. We have tried the logic using TimeEq() function in AF Analytics, PI PE and Calculated data function in Excel. But we are getting different results.

Could you please let us know why we are seeing this difference and which one is correct.

Please see the sample expressions used, for your reference.

**AF Analytics**: TimeEq('Running status','y+8h','t+8h',"Online")

where, Running status is the input AF attribute. The above expression gives result as **86160**

**PI PE: **TimeEq('RunningStatus','y+8h','t+8h',1)

The above expression gives result as **84240**

**PI DL**: =PIAdvCalcExpVal(Sheet1!$G$6,"y+8h","t+8h","total","time-weighted","compressed","10m",0,1,0,"bbmwtpi01")

where, Sheet1!$G$6 contains the expression as below.

TimeEq('RunningStatus','y+8h','t+8h',1)

The above expression gives result as **72930**

Kindly help us on the above issue. Please let us know in case of more details required.

Thanks,

Nandhini.S

Hi

I wouldn't want to comment on the DataLink function (I can see a 10 minute timestep in there so that's another possible fault) but the two others should be the same.

As a debug step, can you reverse the functions to "Offline" and 0, to make sure the sum of ["Offline" + "Online"] and [1 + 0] is 86.400 seconds for both?