Hello

I have a problem and I don't know how to start.

I have element in PI AF. One of the at attribute is the source of calculations.

Depend on hour of a day I would like to find a range in some time and multiply another attribute.

for example

Attribute 1 has

time stamp; value

00:00:00 34

00:05:00 36

00:40:00 45

01:20:00 50

02:04:00 52

02:32:21 55

03:10:00 60

etc..

I also have :

Attribute1 with default value 25 (it is constant)

Attribute2 with default value 10 (it is constant)

Attribute3 with default value 50 (it is constant)

I would like to find range between 00:00:00 and 01:00:00 and multiply value of attribute1, range between 01:00:00 and 03:00:00 multiply Attribute2, range between 03:00:00 and 00:00:00 next day multiply Attribute3

Results of this operations I want to put into another attribute (so i get three values a day with time stamp 01:00:00, 03:00:00, 00:00:00 next day)

I have some experience with PI AF and programming but till now I didn't use PI Event Frames and Analytics.

Hi Piotr,

You can use PI Analysis Service with this rule.

if Hour('*')=1 then Range('raw','t','t+1h')*'Attribute1' else if Hour('*')=3 then Range('raw','t+1h','t+3h')*'Attribute2' else if Hour('*')=0 then Range('raw','t','t-21h')*'Attribute3' else NoOutput()

'raw' is your source tag. Schedule this analysis to run every hour periodically.