We have a requirement to create a tag to have a totalize value of a flow (with a condition).
Output = If Tag1> 10 then totalize Tag1 else 0
Any suggestions, on how to implement this logic using a PE
What kind of total are you looking to do? Event-weighted or time-weighted? If it's time-weighted, then I would suggest using a Totalizer class point, rather than a PE. Otherwise, to do an event-weighted total, you pretty much already have the equation down from your logic:
The event-weighted total of Tag1 would then be stored as the value of PE point, which you could also configure additional resetting logic, if you needed the total to reset under certain conditions.
I've made some assumptions about what you are trying to achieve, so if this is not quite right, let us know and we can give further suggestions.
I re-read your original post and you noticed that you mentioned totalizing a 'flow', which makes me think that you would like a time-weighted total. In this case, it's probably best to configure a totalizer point using the Totalizers plugin in PI SMT. You would configure 'Tag1' as the source tag, then probably select Block, Time Weighted Total (depending on exact specifications of your totalizer). In the Sampling tab, you would choose Natural, then with the filter specified as you would like it ('Tag1' > 10 means that only values for 'Tag1' > 10 get included in the overall totalization, the rest being filtered out). In the Results tab is where you would configure when the totalization period begins, and how long it runs for before being reset. For example start schedule at 0 hours after midnight and results every 24 hours gives a daily totalizer. Additional details on the totalizer configuration can be found in our documentation.
Hi Gavin Chen,
Thanks for your help. We have implemented it as per mentioned suggestion.
Retrieving data ...