HexMan Posted March 13, 2018 Report Share Posted March 13, 2018 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! Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted March 14, 2018 MVP 2023 Report Share Posted March 14, 2018 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 1 Link to comment Share on other sites More sharing options...
HexMan Posted March 14, 2018 Author Report Share Posted March 14, 2018 Hello Auman! Thanks for your reply... 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! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now