From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flow meter code help

Hey guys. So i'm a bit new to using labview and could really use some help fixing my code. So we are trying to get a working code for reading flow rate from a turbine flow meter, that sends pulses. we measured the approximate amount of pulses per second and came up with a k factor of 6.2 for 5 g/min ( this was baseline flow rate for testing). so the count the pulses per second, converts to min and divides by the k factor to give flow readings. An interesting problem that came out of this was that  when we had 5 g/min going through the meter our code was showing, 5 g/min. However, when we increased flow rate to about 7 g/min, the code continued to show 5 g/min. I'm pretty sure this had to do with the fact that all our testing was done according the 5 g/min. but even when we ran 7 g/min, we were counting the same number of pulses in 1 minute, but a different k factor ( because we're dividing pulses/min by 7 now). I don't really know how to account for this in the code. it only seems to work when we put in the unique k factor for that flow rate in the code, but we need to see it change according to varying flow rate. Any suggestion would be greatly appreciated. I have attached a picture of the code.  

0 Kudos
Message 1 of 9
(3,789 Views)

It sounds like you are basing your code on the assumption that pulses/sec correlates directly with flow rate because of a single measured value.  Is this actually the case?  Check the manual for your flow meter.  Is the intended dependence truly pulses/sec? pulse amplitude? pulse width?  What are the upper and lower operating limits of the flow meter.

 

Start by verifying that your approach is correct.  After that, upload actual code (or example code).  Individual pictures rarely help.

Why use a digital input true/false and shift registers?  Why not use an analog input and measure the signal directly?  you can easily count the number of peaks.

 

Message 2 of 9
(3,769 Views)

the turbine sends out digital pulses and I believe that is the only way to measure flow rate . there is a display attached to the meter so we can see the flow rate, but we need to monitor from a distance on our computers. Plus we would not even have room to measure analog signals as other sensors are taking up the space on our MyRio. The digial pulses is the easiest thing to measure. the manual is a bit vague and confusing, we were dumped on this project and are trying to figure things out. I will do some more testing and try to see what I can do.

0 Kudos
Message 3 of 9
(3,742 Views)

Presumably your Flow Meter has outputs that you are reading with something.  Can you look at the outputs on an oscilloscope?  How do the pulses vary as you change the speed of the device?  In particular, what is the value when the device is stopped, or moving very slowly?  [Not knowing the particulars of your sensor, I could envision a sensor that transmitted rate using a digitally-coded protocol of some sort].

 

Can you provide a link to the specifications or manual for this sensor?

 

Bob Schor

0 Kudos
Message 4 of 9
(3,715 Views)

Hi,

 

volume flow turbines usually output a pulse per fixed amount of volume.

All you need to do is to count the pulses per amount of time and multiply with the volume/pulse scaling factor...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 9
(3,701 Views)

Here's the manual. Maybe I missed something in here. 

0 Kudos
Message 6 of 9
(3,689 Views)

Hi armen,

 

that's the installation manual.

You miss the spec sheet for your specific type of turbine.

(Can you attach that too?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(3,684 Views)

Below is how I did it.  Using the shift register, I could subtract previous from the last and get it to work. 

0 Kudos
Message 8 of 9
(2,097 Views)

If you get the same number of pulses/min, the flow information can be in the PWM duty cycle or the voltage of the pulse, check the manual.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 9
(2,063 Views)