Sign in to follow this  
Followers 0
ChrisBarrett

Calculate Flow Using Pluse Input

6 posts in this topic

Hello again guys! Once again I would like to pick your brains. I have a flow meter that sends a pulse for every cubic meter of liquid. The frequency of the flow meter specs at 50Hz so an input to a CP1H PLC should work. I was wondering if any of you guys have a function block or a piece of code written to obtain instantaneous flow. Thanks in advance!! Cheers Chris

Share this post


Link to post
Share on other sites
50hz would be 50 cubic meters per second?? Are you sure you have those numbers right?? That's a LOT of liquid!

Share this post


Link to post
Share on other sites
Opps...sorry, I should have made myself more clear. The flow meter has a MAX frequency of 50 Hz....HA!! Yup, 50 cubic meters of liquid a sec sure is a lot.....HA! Chris

Share this post


Link to post
Share on other sites
The actual pulse rate will determine the best approach (particularly for low flow rates), but here's a couple of ideas: 1) Use a high speed counter to capture the number of pulses. 2) Create a scheduled task that runs periodically to handle the data collection. 3) Read the pulse count using a PRV instruction. 4) Average the pulse counts using an AVG instruction (see notes). 5) Convert the average pulses to flow in GPM or LPM and store in a DM register. Averaging notes: 1) The AVG instruction resets itself if the control line cycles so it needs to be "always on". 2) Use the scheduled task timing to control how often the data is averaged. 3) For low counts multiply the pulse count by 100 before averaging to improve the resolution. Flow_Monitor.pdf

Share this post


Link to post
Share on other sites
Thank you so much for the advice and instruction. I will give it a go and let you know how it works out!! Cheers Chris

Share this post


Link to post
Share on other sites
For CP1H PLCs the PRV instruction can return the Frequency of high speed counter 0. Therefore you would not need to do anything else (averaging, sampling, etc) if you use the PRV instruction in that manner.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0