Hi there,

I'm trying to get a the maximum 15 minute average of the sum of three tags using PI DataLink. What I have so far is getting the 15 minute average of 1 tag using:

PIAdvCalcExpVal("TagAvg('Sinusoid1','*-15m','*')","*-1w","*","maximum","time-weighted","interpolated","15s",0,1,0,"")

Somehow I would like to sum all three tags (let's say: Sinusoid1, Sinusoid2, Sinusoid3) before doing the maximum 15 minute rolling average. I tried using Total('Sinusoid1','Sinusoid2','Sinusoid3') inside the TagAvg function but I get an error...

Or is there a better way with PI Datalink? I don't want to touch PI AF right now.

Kent,

I am not exactly sure what you are trying to do, but here goes!

One way, is to use calculated data with an expression such as tagAvg('tagA', '*-15m', '*') + tagAvg('tagB, '*-15m', '*') + ... Be sure to set the calculation mode to maximum, expression sampling to interpolated with a sampling frequency of 15m to make this a block average. This will return the maximum 15 minute block average of the time-weighted total average of the inputs 15 minutes prior to your start time and include the last quadrant before your end time.

Regards,

Dan

EXELE