AnsweredAssumed Answered

Expression with tags from different servers

Question asked by henderson on Nov 6, 2015
Latest reply on Nov 11, 2015 by henderson

Dear,

 

I have the following problem.

 

I have a PI TAG at one server, lets call FlowTAG at server PIsrv1.It returns the flow rate of a system.

 

I have another PI TAG at other server, lets call ValveTAG at server PIsrv2.

It returns the status of a valve. 0 = closed; 1 = open.

 

What I need is to have a TAG that will return the FlowTAG average in the last 24 hours, but there is one conditional.

 

For each sample of the average, the flow will be considered zero if ValveTag is zero. If ValveTag is 1, then the flow will be FlowTAG.

 

I need this information on Excel, so I will use datalink. It would be better to have a TAG, but if it's the only option, it could be using AF.

 

If TAGs were on the same server, I would just do this on Datalink:

=PIAdvCalcExpVal("FlowTag'*'ValveTag'";"*-24h";"*";"average";"event-weighted";"compressed";"10m";0;1;0;"")

 

But since they are on different PI servers, I think the only way to do this is using AF.

 

How can I do this? AF is really the only option?

Outcomes