02-03-2014 02:29 PM
Hi
I am a relatively inexperienced LabVIEW developer, so while I will do my best to provide all the necessary information, if something is missing or unclear, i am so sorry.
Could I ask for some help, I'm getting bogged down in a simple DAQ VI. I am using a flowmeter Rs 256-225 outputting a series of NPN pulses through the counter line on my USB-6008. I have set the DAQ Assistant within a For Loop that counts the pulses within each iteration but naturally after each iteration the count resets to zero so my indicator (gauge in this case) appears erratic despite a steady flow through the meter. How would I go about creating a VI that can output a steady reading on the indicator but still be senstive to changes in flow? Thank you very much for any help
02-04-2014 04:35 AM
Hi Emma,
I believe a way you could get a smooth reading of frequency would be to try configure the DAQ Assistant to measure frequency through your counter line, rather than counting the number of pulses received.
When you set up your DAQ assistant, what options are you selecting? For a frequency input, you would select Acquire Signals -> Counter Input -> Frequency, and then select your USB-6008 counter from the Physical devices list. In the configuration window, you can then configure how the DAQ assistant should go about acquiring your pulses.
If this set up works, you should be able to put the DAQ assistant in a while loop and achieve a continuous signal that is sensitive to changes in flow, as required.
02-04-2014 08:06 AM
Emma,
I would suggest using the two counter method to measure the incoming frequency. LabVIEW ships with examples. Much more accurate.
Once you have the frequency you can apply the "K" factor to convert to flow units.
02-06-2014 08:08 AM
Hi
Thanks for the help but it wil not pick up my DAQ when i go down the frequeny route which you suggested. Have you anyother ideas by an chance?
02-06-2014 09:20 AM
Hi Emma,
Apologies, it appears the USB-6008's counter is only an event counter, and can't actually be used to measure frequency.
An alternative approach to this would be to utilize this example for a software-timed approach to frequency measurement: https://decibel.ni.com/content/docs/DOC-8172
Hope this helps
02-06-2014 09:41 AM
I suggest using an analog input line to capture the pulses from the flowmeter. The USB-6008 has hardware timed AI. Set the sample rate to a rate high enough to guarantee that you will get at least one sample in each high and low portion of every pulse at the highest flow rate. The one data sheet I found does not specify the minimum pulse width although it indicates that the maximum frequency is 200 Hz. If the output pulses are close to 50% duty cycle, 500 Hz might be fast enough. I would probably use 1-2 kHz.
Then set a threshold at about half the pulse amplitude. Compare the data to that threshold in a for loop. Use a shift register and the boolean Implies function to find the transistions. The difference between transition indexes multiplied by the sample period dt is the period of the pulse. The reciprocal will give the pulse frequency. This processing will work much faster than the data acquistion, so you can keep up at any rate that you can read continuously.
Lynn
02-06-2014 11:13 AM
Hi Emma,
I am also trying to work out a VI for this issue. My project is using the flowmeter below, it too outputs a stream of NPN pulses and I'm powering it off the +5V line,
http://www.flowmeters.co.uk/pd_beermeter.htm#gallery
I am using the USB-6501 and similarly I'm using the counter line to measure my pulses. I have been succesful in measuring the pulse count but
like you I'm probably having the same problems.
1. Using a For loop to count, then after each count it resets to zero, so the dial/graph fluctuates up and down despite constant flow through the meter.
2. Achieving a nice waveform. I have a VI that is a work in progress. You can view it here.
http://forums.ni.com/t5/LabVIEW/Flow-Meter-VI-Pulse-Count-Help-Needed/m-p/2706003
Trying to get a decent sample rate of 250ms and that the output increases/decreases during each iteration.