AnsweredAssumed Answered

Variable in a template to control time ranges in multiple analyses?

Question asked by ChrisGajewski on Nov 21, 2018
Latest reply on Nov 26, 2018 by ChrisGajewski

Hi,

 

I am fairly new to OsiSoft PI, and was wondering if instead of time definition i could maybe define a variable and somehow use it's value to further automate analyses.

 

I am dealing with 50+ same analysis for signals numbered, "value01 through value50". Let's say i want a mean value over 5 minutes.

 

TagMean ('value01','*-5m','*') would seem like a good solution.

 

But what if for another project we want to use 10 minutes instead of five? I would have to change " '*-5m" " to " '*-10m' " in every line, and there might be hundreds of them..

 

So i thought of maybe defining variable in template, like ManualInputTime = 10, or "*-10m", and somehow use that in the analysis. Maybe like TagMean('value01','ManualInputTime','*').

 

Is that possible, and if so, am i correct in thinking that above might work?

 

Once again, apologies if that is trivial question.

Thanks in advance for Your help!!

Outcomes