Flow Totalizer with flexy205

Good morning.
I have an application I’m currently about to try out with a Flexy 205. I need to read in a 4-20ma signal for a plant flow total from a meter. Every morning at 8am they want the total flow from the previous day emailed out. It will be a cellular application. It also has a digital ON/OFF alarm status (which is easy to add I just wanted you to be aware of it). I’m not sure what the easiest way is to create the totalizer here.

Hi @DonWithit,

In order to read the 4-20mA you’ll need to have one of these cards:

You’ll want to setup tags to historically log the data you’re getting from this.

I also have an example on how to send out the emails. If you want it to be sent out at the same time every day I’d recommend taking a look at the Ondate function

RG-006-0-EN-(Programming Reference Guide)(1).pdf (865.6 KB)

Sending Emails with a Flexy.docx (433.3 KB)

I have the emails all functional in regards to sending an email out for a digital level high alarm. Do you have a sample of a code for totalizer like I am attempting. Basically Trying to take that daily between midnight and midnight, send its total out the following morning at 8am. Also need to add an alarm if that flow exceeds a certain number it will send out an alarm. I have no PLC at this location so I will have to handle the code with the Flexy if it is possible to do so.

Hi @DonWithit,

You could do something like make a MEM tag called totalizer and then make it so that when the value being read changes it will add that value to your totalizer tag. You could also setup an alarm on that totalizer tag if it exceeds a certain value.

I don’t think we have any code pre-made for this but you should just be able to do something like an onchange for that value being read and then write something like this:

totalizer@ = totalizer@ + valuebeingread@

-Tim