we have an application that write back to PI. But sometimes it writes zero values if the application failed to calculate the outputs and it will write zero to PI. We would like to avoid the zero in this situation.
I think that you will need to make sure that the application doesn't send bad values in the first place.
There is already a suggestion for what you are describing. You might want to vote for it.
Thresholds for PI Points – User Feedback for OSIsoft Products and Services
As Kenneth Barber mentioned, especially since the application seems to be in-house, perhaps you can find whoever wrote it and modify the code to either
If it is not possible to change the custom code, then one other possible workaround would be to use an AF Analysis (or Performance Equation) to filter out the 0 values and not write them to the output point. Note that this would require creating a 2nd PI Point that would have the same data as the source point, but filter out the 0 values.
The equation might looks something like the following:
if 'sourcetag' = 0 then NoOutput() else 'sourcetag'
Hope this helps,
Retrieving data ...