We have lots of computed signals. One of the techniques we use is selecting between different values depending on a pointer. The idea is that the source of some data can change over time. So we have Formula's with a ConfigString like: A=.\IFM|Oil Rate;B=.\Excel|Oil Rate;C=.\DB Estimate|Oil Rate;P=.\Configuration|Pointer; [if (P==4) then C else if (P==3) then B else A] . The resulting computed signal will then concatenate these different sources over time depending on P.
To get the thing started the P will get some initial value say at 01/01/2000 . Looking at the time-series in PI Explorer and also via the Archive in OleDB Enterprise it works somehow. But when plotting this signal in Coresight will show nothing unless you include 01/01/2000 in your time range. Is this expected behavior? Any way we can avoid that?
There are also other problems with this approach:
- These formula's cannot handle strings as input, although nothing is computed with it.
- The resulting trend shows samples at all time stamps in the different inputs, also from the signals not selected . When including e.g. a reference to a real-time signal, which is actually not selected, this gives strange effects.
- When one of the references in the formula has problems, like a missing tag in PI, also when not using that value the Formula will fail.
Are we abusing the Formula-concept too much?
Is this kind of selection between signals something that should not be done in PI/AF?
We actually have our own Custom Data Reference which overcomes the above, but only implements a small subset of the Formula-features :-( . The shortcomings above push us to use our own CDR more and more and implement already existing features of the "OsiSoft Formula", which I would like to avoid!