Hello there,
I am having trouble using PIAdvCalcExpVal thru PI Data Link.
The real problema is this:
Here is my Excel Formula
=PIAdvCalcExpVal("('CP_30100C_T71_AT_1148'*'CP_30100C_T75_FT_6301_VALUE')";$D$4;$E$4;"total";"time-weighted";"compressed";"10m";0;144;0;)/PIAdvCalcExpVal("('CP_30100C_T75_FT_6301_VALUE')";$D$4;$E$4;"total";"time-weighted";"compressed";"10m";0;144;2;)
Where D4 is my initial date and E4 final date.
In several computers in my company, this formula works well, but there is one specific computer where the formula returns an Excel error (#VALUE).
In order to try to find the root of the problem, I performed a test with this formula:
=PIAdvCalcExpVal("'CP_30100C_T71_AT_1148'";$D$4;$E$4;"total";"time-weighted";"compressed";"10m";0;144;0;)
and this one
=PIAdvCalcExpVal("(('CP_30100C_T75_FT_6301_VALUE')*1)";$D$4;$E$4;"total";"time-weighted";"compressed";"10m";0;144;0;)
On that specif computer, it returns "Invalid Expression Syntax". On every other computer I tested, it works perfectly.
In the same sheet I have several formulas using PIArcVal and PIExpVal, like this:
=IF(PIExpVal("badval('" & H63 & "')";$P$7;0;);"PI ERROR";PIArcVal($H$63;$P$7; 0;"PIserver";"auto")*1,0197162)
where H63 is the PI TAG and P7 is the date.
All these PIArcVal and PIExpVal works fine on the computer I mentioned, it returns correctly the value I want. But the PIAdvCalcExpVal does not work at all.
What am I missing?
I am attaching an test sheet I developed. All these functions work well on every computer, except the one with problems.
ps.: I am using Excel in portuguese, that why I use ";" to separate the arguments of PI functions instead of ",". I think that in the english version the correct is to use ",". I am not sure.