Totalize Flow

Recommended Posts

Hello everyone, I'm still learning with this hardware.

I am working on a project for which I need to totalize a flow that comes from an analog signal.

I wonder if there is a function block that does it, or how to do it. Thank you!

Share on other sites

Hi Hex,

No function block as such, but what you want to do isn't really that hard.  Just needs you to do some maths and storage.

You need to base this on a number of critical decisions, mainly frequency of count and numbers of records.

1).  I'm assuming that your AI will be telling you the flow at near enough that exact moment.

2).  You need to decide the time interval that is applicable to get the best average reading.  If the flow varies a lot per second you may need to be recording this very frequently per second.  If it is fairly stable then you can make the time (much) longer.

3).  Once you have decided on your time interval, you set up your program to sequentially record the flow rate at that interval into a series of MIs.

4).  Periodically, so that you don't use too many MIs, you do maths on all the MIs you've recorded the "instant" results into, and arrive at the total flow for the time period.

5).  You then add that total to your master flow amount MI and then start the process again.

There are other more complex ways to do this, such as varying the interval based on flow variances, but the essence is always the same.  Relate overall interval time to number of samples taken and then do maths to get the flow rate for that period.

cheers,

Aus

Share on other sites

Hello Auman!

Finally I used the SI3 (no counter needed) and converting my to MF.

I'm really having a lot of fun. Thank you also for your help!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×