After installing PI Server 2018, I first tested the new array functions of configured analytics and had fun doing so. On course, upon entering my first array function ever I hit the never welcomed “Calc failed” red message of doom. I didn't give up and inspected my input tag to find I had several system digital states in it.
Also, at the bottom of the AF Analysis tab, I saw a message that stated “cannot convert Calc Failed to bool”, and I corrected it by adding a check for Bad Values. The “not BadVal” check has to be before the $val > 50 check to resolve the issue. This example is identical to the expression included in the PI System Help for FilterData.
Next, I decided to count how many times a value has changed and ignore the change if the previous is the same as the current value. I had seen Nitin Agarwal do this and I wanted to see how it really worked.
To step it up a level, I attempted to obtain the max values from a data reference with value type string array holding CDT158 and Sinusoid.
To obtain the max value, I used the MapData array function and the Max function which now tags arrays as inputs. PI users have been requesting methods to perform operations on an array of tags and now it is possible! The server attribute is a string with format “\\ServerName\”
After array functions, I wrote the maximum value of an attribute out to the data historian at the time the maximum occurred I mapped “variable2” to be output timestamp using the “advanced…” option. I was unsure if I would be able to capture the timestamp of the maximum value without using an array function and it turned out there were no issues when I used the TimeStamp function.
The new event frame generation modes Step and Pulse are identical to that of PI Event Frame Generator/PI Batch Generated are a nice addition; however, periodic time periods still require PI Points or complicated workarounds such as this can be done.