Sign in to follow this  
Followers 0
Conor

Translate flow rate into pulses

5 posts in this topic

Hi, I have a flow meter that is sending an Anlogue signal to a PLC5. The flow reading is between 1.5 m3/sec to 5 m3/sec. I want to set an output in the PLC to run an Autosampler unit when x amount has gone through the flow meter, i.e. when 1000 m3 has passed through. The flow meter does have a pulse generator, but I can't get it working. Is there a basic calculation that I can do in the PLC to do this for me. Thanks, Conor

Share this post


Link to post
Share on other sites
This is raw, but here goes. THE GIVENS: Flow meter 1.5 m3/sec to 5 m3/sec == 4 ma to 20 ma == 0 to 4095 input data THE MATH Converting the 0 to 4095 back to 15 to 50 is relative simple math Flow in m3/sec * 10 = ([{AnalogInputDataReading/4095} * 35 ] + 15) use a CPT Instruction with F8:0 was the result Use a register F8:1 for example to hold current flow amount Use a timer T4:0 preset for 1 second {use the 0.01 resolution} for example to trigger an add of the Analog Input Value F8:0 to F8:1 with the result in F8:1 Use a GRT Instruction on F8:1 so that when it is greater than 10,000 {for your 1000 example} you trigger the run bit of your sampler and subtract 10,000 from F8:1 also. BETTER ACCURACY Change the Preset of the timer from 100 to 10 in 0.01 resolution. Divide F8:0 by 10 and place in F8:2 then add F8:2 to F8:1 as above. Hope this is clear.

Share this post


Link to post
Share on other sites
Hi Bob, Sorry I should have said that 0 m3/sec is 4 mA and 6.3 m3/sec is 20 mA. Conor

Share this post


Link to post
Share on other sites
Minor Change I think you'll see the pattern if you look close. Converting the 0 to 4095 back to 0 to 63 is relative simple math with Flow in m3/sec * 10 = ([{AnalogInputDataReading/4095} * 63 ] + 0) use a CPT Instruction with F8:0 was the result

Share this post


Link to post
Share on other sites
Sounds very complicated for a simple shift instruction. Unfortunately though, AB PLC's don't contain barrel shifting instructions. So you'd have to divide by 64, or equivalently to multiply by 0.015625 (which is usually faster). If it had a shift instruction, you'd shift right 7 times.

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