How to make a totalizer?

I have an OPC float tag that is displaying a GPM reading from a flow meter. I want to create a totalizer for the GPM and make it reset to 0 when a different tag becomes true. Any ideas?

Are you sure your meter doesn’t have a point for the cumulative flow? If it doesn’t then you would need to know the interval at which it provides the current flow rate, and then calculate the volume. Assuming it is reporting every second it would be something like the number representing flow rate (Gallons per minute), multiply it by 1 second. Divide the result by 60.
You could do this with an expression tag, and set a use a tag change script triggered by your reset tag to zero out your volume tag.

This should be done on the PLC side. Any timing on the ignition side will be delayed from the actual reading and it will not be as accurate.

2 Likes

A better solution would be to store your values in a database, then use the database to do your calculations. A couple of blasts from the past:

Agreed, though im surprised the flow meter doesn’t already totalize, the flow meters i have for our hydronic system do this out of the box.

Sadly we don’t have the capability to do this on the PLC side. The unit came as a package deal and has an odd PLC that we don’t have the software for.

You really need to do this in the PLC. Really. Buy that software. Spec your desired PLC for future purchases.

3 Likes

@Alex_King what kind of PLC is it?

@Alex_King even if i agree with @JordanCClark and @pturmel. I’ve made a ressources on the ignition platform that would do what you want. This will need first to be validated by the IA team. I can post a link when it’s done.

1 Like

@Alex_King,

it has been a long time ago , but here is the flow totalizer ressource on the exchange

Regards

1 Like