LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Water Flow Meter Read-Out in LabVIEW

Hi,

 

First, 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, my apologies in advance. 

 

I am attempting to read the output of an IFM SM6001 flow meter in LabVIEW, and write the flow values to an Excel file. To do this, I am using a USB-6008 DAQ board (with 9.3.5 drivers) and LabVIEW 2010 on a Windows 7 64-bit machine. The specifications for the flow meter may be found at: http://www.ifm.com/products/us/ds/SM6001.htm.  The flow it can measure is 0.03-6.6 gallons/min of water. (For reference, my application will cover a range roughly between 1.5 and 3 gallons/min.) The flow meter requires 19-30V DC, and I am powering it using a generic 24V power supply, which I believe (based on testing with a multimeter) is working. It is a 4 wire system (supposedly) capable of outputting either a 0-10V analog voltage signal or a 4-20mA current signal, depending on user preference. I have configured the sensor to output 0-10V, but in testing, I have changed the settings to attempt to read current, adjusting the parameters of the DAQ assistant accordingly (to no avail). I have since returned the settings to output voltage (again, configuring the DAQ Assistant accoridngly), but I am still having trouble. 

 

My wiring is as such:

 

Pin 1 (Brown wire): Positive Power Supply

Pin 2 (White wire): AI7 of DAQ board

Pin 3 (Black Wire): Not connected (This is based on the understanding that it is not a ground wire, but used as a pulse or switching output. If this is the error, and it should be connected to the AI7 ground, please let me know.)

Pin 4 (Blue Wire): Negative Power Supply

 

In testing, for signal conditioning purposes, I have also had Pin 2 (white wire) in series with a 440 Ohm resistor, in an attempt to eliminate noise. This has not appeared to have an effect on the problem I am observing. 

 

The problem I am observing is that the voltage I am reading out in the program  does not appear to be varying with flow (which I am controlling with a simple ball valve), making it impossible to calibrate the flow meter and output the correct value to the Excel file. The voltage appears to be stuck at a value of .009V. To verify that the DAQ and flow meter are talking, I have run a test within the DAQ Assistant configuration box, which is the JPEG shown below. I am unsure of how to interpret this plot, e.g. if this is just noise or a meaningful signal. I am also unsure of the correct measurement type within the DAQ assitant (e.g. RSE or not). I have attached my code as well, as it maybe that I have made a logic error I simply don't recognize. 

 

Any assistance would be greatly appreciated.

 

Kind Regards,

MG Wilkinson

 


Download All
0 Kudos
Message 1 of 7
(8,418 Views)

Hi,

 

If you have the sensor configured to 10V scale, that is probably just noise.  The sensor output is 0 - 10V, you have the DAQ set for -10 to +10.

 

The sensor says it is scalable, is it possible you are scaled to high for the reading?

 

I am assuming you are running a flow through the sensor in the JPG, yes?  Is the flow rate at the bottom of the scale?

 

The program doesn't look bad for just validating the process.  More later if you can get the measurement going.

 

***

I would think you need to nail down if you are going to measure a single or double wire measurement.  Maybe hook up the OUT2 (signal) to the AI+, and the Pin 3 (L-) to AI- for double ended.  Couldn't find it in the spec.

 

 

-------
Mark Ramsdale
-------
0 Kudos
Message 2 of 7
(8,405 Views)

Hi Mark,

 

Thank you for your reply. I reset the values of the DAQ Assistant to 0-Min +10-Max (good catch), and checked the scaling on the sensor (which was correct). Unfortunately, I am still getting the error. 

 

In answer to your question, yes, I was running flow for the JPG. The rate was app. 1.5 gallons/min, so toward the lower end of the scale, but not all that close to 0.03, which is the minimum. 

 

Assuming a 2-wire configuration doesn't work, what would be next to try? Larger resistor value? Filtering? 

 

 

Kind Regards,

MG Wilkinson

 

 

 

 

0 Kudos
Message 3 of 7
(8,388 Views)

You could start with the basics and remove the resistor and just come off the flowmeter outputs into a volt meter to verify you are getting an output signal.  Once the output is verified then you can troubleshoot software if needed.

0 Kudos
Message 4 of 7
(8,379 Views)

Do you have anything wired to AIGND?  An analog input requires two wires because it's fundamentally a difference between two levels, and you only mentioned one wire going to the AI7 input.  Try connecting AIGND to the negative end of the power supply.  Also, do you have a multimeter available?  If so, you might want to confirm that the sensor voltage output does properly vary with flow.

0 Kudos
Message 5 of 7
(8,373 Views)

Yes, right off the sensor with the DMM first, Smiley Happy 

 

I think you can use the common off the power supply for L- and the DAQ, and thus you could probably use SRE (?).  But I think you could certainly use double ended AI and use L- and Out2 (the signal). 

-------
Mark Ramsdale
-------
0 Kudos
Message 6 of 7
(8,368 Views)

Using a DMM, I established that the issue was the voltage drop across the resistor. After checking a different sensor spec sheet, I found that the signal conditioning on this sensor is such that external resistance for smoothing purposes actually does more harm than good. I removed the resistor and then added a wire running from common ground to AI7GND (differential wire), per suggestion.  I also reset the sensor, checking the max and min values. With these changes, I am now getting a nice linear variation, and have been able to calibrate the program to the sensor to get a gallons/min output. Much obliged Mark, and thanks to all who commented. 

 

On to the next one...

 

Kind Regards,

MG Wilkinson 

0 Kudos
Message 7 of 7
(8,327 Views)