Pulse input flowmeter

fzhang

Member
Join Date
Feb 2004
Posts
11
Hi, everyone,

I have a 30PPM (30 pulses per minute) flowmeter, I connected the pulse input to a controlLogix plc's DI module, in the plc program, I need to convert the pulses received to a flow reading, now I count the pulses I received every minute and convert it to flow reading (GPM) and send to a HMI machine, it works, but the flow data only updates once every minute at the HMI machine, it's too slow, someone in my office suggests that I should count the time interval between two pulses, so I can update flow reading fast, but I'm not sure how to do this. Is there anybody can give me some suggestions ? Thanks.
 
fzhang,

If you are expecting real-time GPM feed back, than 30 ppm seems to be very strange, or do you mean 30 ppg, or ppcc? I have no expierance with flow meters, however: I thought that flow meters output based on volume, not time. Like encoders output based on ppr etc.. What is the expected max flow rate?

If im incorrect please post the make and model number of the flow meter. (I' very courious)

We use a counter input w/quad encoder to feedback position, direction and speed in FPM. The speed of the elevator is displayed on a lcd screen. I need to check the code to see how I did it, but I dont remember it being very diffucult. I was a matter of getting 2 pulse counts 1 second apart than doing a little math based on the encoder and timiing pully dia. etc.. Can the plc do math Mult / Div? does the PLC have a 1 sec clock pulse?

If you answer the questions above I could possably help with code.

Mike
 
Last edited:
Use the input pulse to trip a timer. When the pulse contact goes from Closed to Open start a second timer. Add the two results, and update the flow rate and reset both timers when the pulse changes status again.
 
Thanks for your help.

Actually my question is as simple as how to measure time interval between two pulses. Could anyone provide some sample code ? Thanks.
 
Elevmike,

I'm using AB controlLogix plc, it has all math functions including multiply and div, the plc can do millisecond timer too. Thanks.
 
Create a milliseconds timer that runs continuously and resets itself at regular intervals. Each time your pulse input changes from OFF to ON, subtract the value in a holding register from the timer's ACC value. Then copy the ACC value to the holding register.

The result of the subtraction will be the number of milliseconds since the last time the input changed from OFF to ON.

You will also have to include logic to account for the occasional measurement when the the timer resets between input pulses. When that happens, the result of the subtraction will be a negative number.

Incidentally, you don't have to wait a full minute to update the HMI. You could count pulses for 10 seconds and multiply the result by 6.
 
Thank you all for the help. Now I have one more question, it seems that there are two methods to calculate (pulse input type) flow rate:

1. Choose a fixed time such as 1 minute and then count the number of pulses in that time (n pulses/ 1 minute)

2. Choose a fixed number of pulses such as 1 pulse and then time from rising edge to rising edge (1 pulse/ m minutes).

I want to know which of the above methods provides more accurate flow rate and which method is easy to implement. Thanks.
 
fzhang,

I cant help myself, I gatta ask....

I still dont get it. How often do you want to update your display?

Is your flow rate measured in PPM or PPS?

Is 30 PPM your max expected flow rate?

The answer to your question depends on how often you need to, or can, update your display variable.

I dont know your application, but if your flow meter is only putting out 30 pulses per minute max, than it would seem that your application would be too slow for any reasonable degree of accuracy unless the volume of your flow is very low.

Your plc should have a 1 sec, and, 1 min clock cycle contact. On for one sec/min, then off for one sec/min. This clock cycle contact is usually used to count pulses for the duration of the clock cycle contact, etc.

It seem to me that your trying to program your way around having the wrong flow meter.

Mike
 
Last edited:
Elevmike,

I want to update the flow rate at HMI every 5 seconds, 30PPM is the max. flow I can get in one minutes (max. 30 pulses per minute) Thanks.
 
T4:5 timer always running when machine is running.
C5:1 counter is for initial machine starting. in this case two machine cycles.
B3:0/1 latch gets reset when machine is not running.
 
Here it is,

This code will count the time in between pulses, and load that time into your selected memory on every other pulse. The update rate of the display would be dependent on the flow rate. The higher the flow, the faster the updates. The elapest time (between pulses) will be lower as the flow rate increases.

The lower ththe value in the memory area (display mem) the higher the flow rate.



pulse input poss diff.
-----||--------------------(pd)

--|counter value = 2 (constant)|-------|LD timer value|
| |OUT display mem|
|
+---(reset counter)

---|counter value = 1 |--------------|timer (fast)|

pd
-----||-----------------------------| counter |
| |
reset counter | |
-----||-----------------------------|counter |



Thanks for the challange, Mike.
 
Wait a minute Frank; We'e not done yet.

What is the actual flow rate (in GPM, LPM, CCPM or CFPM) of the material.

What are the units?
How much of a unit per pulse?

Now you need to translate your time value into units per min, or volume etc..

(I like to finish what I started)

Thanks, Mike
 

Similar Topics

I am working with a 1214 siemens plc and I have connected the pulse output of a flowmeter into the digital input of the cpu with the HSC enabled...
Replies
2
Views
4,139
Hello everyone, i have a flowmeter that will give a pulse for each 2L. I want to know what kind of input i have to use for programming in an S7...
Replies
12
Views
4,191
I have one flowmeter. rated flow range is 100L/Min, and 1L/Pulse. I need to hook it up to micrologix 1400 embeded DI to read flowrate. Will a...
Replies
5
Views
2,881
Just finished an upgrade from a SLC500 to CLX where they had a 1746-HSCE and we're now using a 1756-HSC. Two wire pulse signal from the...
Replies
2
Views
1,297
Hello, We have the following DI card that can accept 1,2 and 3 wire DI's ( 6DL1131-6BH00-0PH1). We plan on installing this card for use with a...
Replies
7
Views
1,479
Back
Top Bottom