and operator
Add a function that can be used in the UFL Configuration File to perform bitwise operations. For example, a function similar to the AND operator in Performance Equations and Asset Analytics.

Thank you for your input. We are continuing to support PI Interface for UFL with stability and security releases. However, for feature enhancements, we are starting to develop PI Adapter for Structured Data Files and encourage you to go to the PI Adapters forum to share your use cases.
1 comment
-
matthewskl commented
This should apply to the OR operator as well. This would allow for bit parsing operations in situations where an integer is sent for statuses.
As an example, 129 in binary would be 10000001, showing that alarms 8 and 1 in the block are active. In order to parse this out, formulas need to be applied for each position. Where VALUE=129 and x is the bit position, the formulas would take this form
ABS(VALUE AND 2^(x-1))/2^(x-1)
Position 1 would be ABS(129 AND 2^0)/2^0) = 1
Position 8 would be ABS(129 AND 2^7)/2^7) = 1
All other positions would be 0By executing these formulas at the UFL level it prevents reliance upon Performance Equations (which are not installed by default in the data archive any longer) as well as the analysis service within AF.