12-07-2015 08:26 AM
Dear All,
First of all I have to say I am a chemist not an engineer. That’s why I need some help or advice.
I have few mass flow controllers without the device which control them. I am trying to control them with Labview. Please find attached some pictures for more information.
I use NI USB6009. None of the controllers work. Probably the problem is the code or..
I will appreciate any help or advice. Thank you in advance.
12-07-2015 09:22 AM
Hi Bozhidar,
Probably the problem is the code or..
Yes, probably. But how should we help you when you don't provide any code? Attach your VI, especially for those DAQ ExpressVIs as they hide any information from the interested viewer…
Did you check the wiring? Twice?
Are you getting useful data from MF valve? Does the MF valve react on your AO signal?
You didn't specify the problem you have with your code and/or MF valves…
12-07-2015 10:09 AM
Hi GerdW,
I checked the wiring several times. No problem there. The MFCs (3) do not respond to the signals from the USB6009. It could not be broken all.
Here the vi and pic of the wiring. Sorry for the bad view but it is in my room not in the lab.
I use 0 to 5V range for the output.
12-07-2015 10:20 AM - edited 12-07-2015 10:29 AM
Hi Bozhidar,
The MFCs (3) do not respond to the signals from the USB6009. It could not be broken all.
So none of those MFCs do respond, but they aren't broken? Really sure?
What happens when you use a simple power supply to provide the control signal to the MFC? Does it react when you provide voltage in steps of 1V? Just to make sure the MFCs are ok (and your wiring is ok)?
On your VI:
- Your output range is set to [-100, +100]. That's a bit large when your MFC expects just 0…5V!
- What's the problem you aren't using AutoCleanup (Ctrl-U)? Your VI would gain a lot more readability…
- Why are ther two indicators named "Numeric"? To you use also same names for variables when you would use a textual programming language? (Btw. "Numeric" is a rather poor label for indicators!)
- Why do you use an additional numeric indicator for your Slide control? Why not right-click the control and select "Visible Items->numeric"?
- Using ExpressVIs leads you to use the dreaded DDT (DynamicDataType). That is not good to understand what's going on - and you get Coercion Dots as can be seen at the PID input…
- Why did you create a control for "dt (s)" when you just use the default value of the PID function? You don't need to wire default values! Instead of this I would use a wait function (e.g. 50ms) and wire that dt value to PID too!
- When using a more "conventional" loop timing you wouldn't need the PtByPtMedian function. Do you really need the Median - or do you want to average your input value?
12-07-2015 11:14 AM
Hi GerdW,
Thank you for helping me. You have many questions and you will understand everything when you read the words "I am new for Labview".
I am a chemist and I work in our Academy of Sciences. I am building catalytic apparatus for testing of catalysts active on neutralisation of exhaust gases. Gas mixture - catalytic reactor with temperature control - analysis (gas chromatograph). The MFC are crucial for me. Its a long story but we have developed very active catalyst for automotive and now I have to build very cheap apparatus for routine tests (roughly sifted).
So none of those MFCs do respond, but they aren't broken? Really sure?
Not sure but it could not be broken all. "I bought them as good condition".
What happens when you use a simple power supply to provide the control signal to the MFC? Does it react when you provide voltage in steps of 1V? Just to make sure the MFCs are ok (and your wiring is ok)?
I hear some clicking inside. For example purge option.
On your VI:
- Your output range is set to [-100, +100]. That's a bit large when your MFC expects just 0…5V!
Every time I change it 0 to 5. I do not know why in the file evrytime is 100...
- What's the problem you aren't using AutoCleanup (Ctrl-U)? Your VI would gain a lot more readability…
I write this VI just to check the MFC. The real program will be much more clear and precise: temperature control, schedule and etc.
- Why are ther two indicators named "Numeric"? To you use also same names for variables when you would use a textual programming language? (Btw. "Numeric" is a rather poor label for indicators!)
See previous
- Why do you use an additional numeric indicator for your Slide control? Why not right-click the control and select "Visible Items->numeric"?
I am not expierenced.
- Using ExpressVIs leads you to use the dreaded DDT (DynamicDataType). That is not good to understand what's going on - and you get Coercion Dots as can be seen at the PID input…
See previous
- Why did you create a control for "dt (s)" when you just use the default value of the PID function? You don't need to wire default values! Instead of this I would use a wait function (e.g. 50ms) and wire that dt value to PID too!
See previous
- When using a more "conventional" loop timing you wouldn't need the PtByPtMedian function. Do you really need the Median - or do you want to average your input value?
I am not sure I understand the last two question.
I have to eliminate the probable reasons that cause the problem. I wrote the VI after watching youtube. That's why I thought there was the problem.
Please advise.
Best regards,
Bozhidar
12-07-2015 11:20 AM - edited 12-07-2015 11:29 AM
A typical mass flow controlled simply accepts a voltage (0..5V) and sets the flow proportional to that voltage, independent of gas or fluid pressure. You seems to think that you need to do the PID regulation yourself, but all that is typically embedded in the controller.
Here is a link to the datasheet?
Can you explain exactly how you wired everything?
I assume htat your +/-15V is from a real power supply and not from a DAQ.
12-07-2015 11:52 AM
Attached the wiring. I use external power supply for +/-15V.
Suggestions.
12-07-2015 12:39 PM - edited 12-07-2015 01:02 PM
As much as I see these devices are not controllable via serial (RS232 or RS485), so it does not have a built-in PID controller. If this is true, it is bad news, since it will require much more suffering during the development, specially if you are beginner in LabVIEW...
The only advice I can give you, if you have the budget, you should buy modern mass flow controllers which you can just easily operate via RS232 for example, and you can forget this stone-age analogue approach... There are lots of companies manifacturing MFCs, like Brooks, Bronkhorts, Pfeiffer, MKS, etc... Also, these come with ready made LabVIEW drivers. (Prices start around 1000 EUR, or cheaper if you buy second-hand ones).
edit: it was not easy to google out the manual, but here it is, just in case if you do not have it yet:
http://img19.ybzhan.cn/5/20110825/634498820774538750.pdf
edit2: I have found this info in the manual, at page 44, it is not totally clear however:
POWER COMMONCommon line that carries the majority of the MFC operating current.Note: POWER COMMON (pin 4) and SIGNAL COMMON (pins 7 and 😎 must be connected at the power supply.
Sorry, this is for the 20-pin connector:
"OWER
COMMON
Common line that carries
the majority of the
MFC operating current.
Note: POWER COMMON
(pin 2) and
SIGNAL COMMON
(pins B and C for
the card edge connector, pins 12 and 13
for the Honda connector) must be
connected at the power supply."
edit3: as I see, you did not connect anything to the power common. Actually the power connection wiring is somehow not clear to me from the pdf manual 🙂 Be careful, do not damage your NI HW 🙂
12-07-2015 01:06 PM
Thank you Blokk! I have the manual.
Everybody knows how to do it with money. It is a challenge. I have to assemble the equipment from nuts and bolts in order to understand how it works and repair it easily after that. The rest of the equipment is also old or salvaged.
We have such equipment and it costs $k250. No budget for now.
So I receive the information for the gas flow from the MFC as voltage: 0 to 5V for the max flow and I order (voltage 0-5) to the MFC to open the valve. It sound simple.
I will appreciate any suggestion.
12-07-2015 01:14 PM
edit3: as I see, you did not connect anything to the power common. Actually the power connection wiring is somehow not clear to me from the pdf manual Be careful, do not damage your NI HW
I connected -15V to power common and +15 to Valve test (D). Hear clicking of the valve on the MFC. It is purge option.
The MFC are normaly closed.
12-07-2015 01:24 PM
"Everybody knows how to do it with money. It is a challenge."
So is this a kind of project about how to build cheap system from salvaged old hardware? I see, interesting... 🙂 It is cool, but the time what you waste for the hardware/software building is lost for the valuable part: research.
"I have to assemble the equipment from nuts and bolts in order to understand how it works and repair it easily after that."
If you open a book or check on wikipedia you can understand how a mass flow controller works (PID, etc...). What you do is great for example for educational purpose to teach control basics to students, but I do not see what is the benefit in this when we talk about research...?
Anyway, back to the topic, just a guess, but I think you have problems with the wiring...Try to check it again, and compare it to the manual...
12-07-2015 01:25 PM - edited 12-07-2015 01:29 PM
@Blokk wrote:
As much as I see these devices are not controllable via serial (RS232 or RS485), so it does not have a built-in PID controller. If this is true, it is bad news, since it will require much more suffering during the development, specially if you are beginner in LabVIEW...
They are mass flow controllers, so they have PID built in. Nothing is needed except a 0-5V setpoint voltage and +-15V to power it all. The datasheet defines a settling time, which cannot be defined if the PID is external.
I have a few mass flow controllers and mine allow several ways to control them (0..5V, RS232, 5-20ma). The absence of RS232 does not imply that they are not smart. The 0-5 V output is just as an indicator to show the actual flow and is only interesting if the input pressure is too low to achieve the desired flow rate or if there is another problem.
Look at page 2-2 of your quoted manual:
"The control valve adjusts gas flow through the MFC based on the flow sensor reading and the set point to ensure a stable gas flow ..."

12-07-2015 01:32 PM
Thanks altenbach, now it is clear to me 🙂
So this is good, no need for PID control from LV 🙂
But what about the wiring? The OP should try to control the MFC then with a constant voltage changed manually just to see how the MFC operates...
12-07-2015 01:39 PM
So if "they have PID built in" I have to use only the voltage (0 - 5) as set point and just to compare visually with the MFC output.
I tried 3-4V to the setpoint (A) but there was no flow (2bar applied).
12-07-2015 01:53 PM
What you show here:
http://forums.ni.com/ni/attachments/ni/170/937661/1/wiring%20MFC%201.jpg
It is not totally what they describe in the manual at page 40. It says, "pin2 and pinB must be connected"...? Also, I would use the differential analog input on the USB-6009 just in case (to connect pin 3/pin C to AI0/AI4) to read out the actual flow rate.
But I am not really an electrical engineer, so lets wait for someone who is more experienced (specially after I made a fool of myself here regarding to MFCs, after a short googling I see now it is still a very widely used industrial standard to use analogue drives for MFCs... :D).
So good luck!
12-07-2015 01:56 PM - edited 12-07-2015 02:02 PM
Can your power supply provide 3-4W? (~200mA on the -15V)
Are all the polarities correct?
Are all connections right (make sure you don't do a 180deg on the connector, but I assume it is keyed in some way)
Are there huge floating voltages?
Is the valve inserted in the correct flow direction?
Did the valve work correctly in the original setup?
12-07-2015 02:10 PM
Can your power supply provide 3-4W? (~200mA on the -15V)
1.7A attached
Are all the polarities correct?
Checked several times
Are there huge floating voltages?
The output MFC shows 0.18-0.2V but the valve is closed
Is the valve inserted in the correct flow direction?
Yes
Did the valve work correctly in the original setup?
I bought 4MFC from ebay as used but in "good condition".
12-07-2015 02:25 PM
That's a +15V. Where does the -15V come from? You need both -15V and +15V.
It could be that the solenoid is stuck. Does it make a noise or get warm?
12-07-2015 02:31 PM
Please clarify. So it is only +15V. Attched the wiring.
It wasn't warm because I tested for not more than 20 sec.
12-07-2015 02:35 PM
Yes, you need a power supply that provides +15V AND -15V.
(i.e. three wires: ground, -15V, +15V)
12-07-2015 02:41 PM
Thank you! Tomorrow I will find such supply and test the MFC again.
Probably the ground I have to use as power common. Right?
12-07-2015 02:59 PM
Yes, there is a connector labeled "power common". That's probably it.
If your company or institute has an electronics shop, talk to them .:D
12-08-2015 07:50 AM
First of all I would like to thank you for the support and advices especially to Altenbach.
I tested only one MFC and it works. Find attached the scheme. I could not find such supply and I used two power supplies (attached amateur workplace). The block diagram is very simple: just send voltage 0-5 and the output shows the flow. The response is fast.
12-08-2015 07:58 AM
I am happy to hear it works, so the guessing about the wiring was right 🙂 It was also good to learn about analog control of these MFCs from Altenbach, so far i only used RS232...
By the way, you wanna control 3 MFCs, right? Do you have a second USB-6009? The 6009 module has only 2 analogue outputs so you can control 2 MFCs but not 3...
12-08-2015 08:18 AM
Actually you can control the MFC only with power supply and voltmeter.
I have to find NI device with more than 5-6 analog outputs for the temperature and etc. Any proposals? It must be cheap and available on ebay.
12-08-2015 08:22 AM - edited 12-08-2015 08:28 AM
@Bozhidar4o wrote:
Actually you can control the MFC only with power supply and voltmeter.
I have to find NI device with more than 5-6 analog outputs for the temperature and etc. Any proposals? It must be cheap and available on ebay.
You mean, you need several analog outputs for the MFCs (so 3 AO channels, and 3 AI channels for reading back the actual flows), and you want to measure temperature also? What kind of temperature sensor you want to use? Thermocouples, RTDs, thermistors, etc?
edit:
Actually you can control the MFC only with power supply and voltmeter.
Hmm, yes you need power supplies (6 pieces for your 3 MFC if the PSU has only single outputs), and 3 voltmeters to read back the flow at the analog outputs. But what about the 0-5 V DC control signal?
edit2:
If you need several analog outputs/inputs, and also several thermocouples inputs, I would go for a NI cDAQ modular system. However I have no idea if you can get these cheap as second hand, but if you are lucky...? You could also consider non NI measurement/control systems but I am not experianced with these...
12-08-2015 08:36 AM
Hmm, yes you need power supplies (6 pieces for your 3 MFC if the PSU has only single outputs),
Hmm, the above statement is not true, since you can connect PSUs electrically parallel to the MFCs, as far as the electrical currents do not go over the limit...
So in principle I think you can supply the 3 MFCs with only using two PSU, I think...Sorry, I again posted before thinking 🙂
12-08-2015 09:33 AM
Today I tested the system with 3V bateries and potentiometer. It works. Than I replaced the bateries with USB-6009.
I need several AO and AI. Find attached the scheme of the catalytic system I am building.
I will use Labview. There are mass flow controllers, temperature controllers, gas analysis (voltage vs time) etc. It will be complicated and the timing and the schedule is crucial. I have gas chromatograph and parts for mass spectrometer. Also several gas sensors. Reactors and 6 way valves are available. I need appropriate NI device and some help with writing the code.
I will appreciate any help or advice. Just skip the negative posts with "no way" , impossible and similar.
12-08-2015 09:54 AM
A collegue just built a micro-GC system using Bronkhorst pressure regulators and flow controllers (these were controlled via RS232 ports), he bought the multi-channel Thermal Conductivity Detector (TCD) ready made from a company.
He used Neon and Argon as carrier gas. The goal was here to be able to measure micro-liter amount gas samples, which is not really available in commercial devices (at least for hydrogen isotopologues, hidrogen/deuterium, HD).
Can you count how many analog input/output channels you need in total + the number of thermocouples (K-type TC? or something else?) ?
You only want to measure temperature, or also control/regulate it using a heater? If so, I would buy a cheap PID controller including current relay + heating wires/tapes from ebay...
12-08-2015 10:28 AM
I do not have to use microliters because the gases I use are cheap. I have several PID regulators (OMRON, TC- K type) and Thermal Conductivity Detector but I would like to use one single program which control everything (option remote control). For example 8AO, 15AI. I will add heater and Solid state relay and..... etc.
What device (NI) is appropriate?
12-08-2015 11:13 AM
For example 8AO, 15AI.
Do not count the thermocouples as analog inputs in this case at least, since it is better to use dedicated hardware to read thermocuple voltages...
As I said already, in such projects I like to use the modular cDAQ platform (in a nice interactive way you can put together what you need):
http://ohm.ni.com/advisors/compactdaq/pages/common/intro.xhtml
Of course, I do spend money on it, and it is not too cheap. Of course after deciding what modules you need, you could hunt these on ebay, etc...?
I have attached a possible configuration in pdf, it includes main elements:
the end price is about 2900 EUR...
The most expensive part is the 16 channel AO module, but I only found 4 channel and 16 channel AO modules, no 8 CH modules...
12-08-2015 12:08 PM
Thank you, Blokk!
At the beginning I will control the MFCs with external power supply (0-5V) with potentiometer and use the AI of USB-6009 just to monitor the flow. There are enough AI. For the temperature I have to read some more info how to use low voltage signals ( NI 9211 4-Ch). I will check the list you attached.
It will be easy to upgrade the system but first to start it.
12-08-2015 12:12 PM
12-08-2015 01:20 PM - edited 12-08-2015 01:24 PM
Here is some more reading about thermocouple measurements using LabVIEW and NI HW:
http://www.ni.com/tutorial/14338/en/
This is for DAQ/ signal creation in general, so also applies to analog input/output devices:
http://www.ni.com/product-documentation/5434/en/
Just in advance, if you go in the NI route, later learn to use the low level DAQmx VIs. Express VIs (like the "DAQ Assistant") are ok for testing (for testing purpose the MAX - Measurement & Automation Explorer is also useful) and prototyping, but the real power of LabVIEW comes with DAQmx VIs!
12-08-2015 02:01 PM
I will follow your advice. Thanks
01-24-2016 04:35 PM
Hello Dear Friend
I have bought a used ALTA mks 1480a mass flow controller( 1000 sccm N2 gas) from ebay. I want to use it in a electronic nose system (it is my M.Sc thesis). I should connect it to a N2 gas cylinder.
I need just 1000 sccm flow rate. I wil use labview program. the problem is that I dont know anything about how to run this MFC. I am really confused.
the device outputs are: v-, v+, DRAiN, CAN+, and CAN-
I dont know what sftware and hardware I need to run this device. Even I don't know how to connect it to the gas cylinder correctly. Please help me dear friend. I will say hello for any useful and practical information.
Looking forward to hearing from you.
Thank you
01-24-2016 05:07 PM
All the manuals are available online. The device is available with several different inputs and it looks like you got the version that communicates via devicenet.
There are devicenet drivers and interfaces for LabVIEW, but I don't know anything about them (see e.g. here)
01-24-2016 05:14 PM
thank you
I will check them
01-25-2016 11:19 AM
Hi Sir
As Altenbach writes, you have a devicenet mfc.(this old mfc is obsolete) The hardware you would need to control it is far beyond what you would have paid for the mfc on ebay. Device net a steep learning curve as well. There is another port, but it is a bit bang serial port and also requires special hardware. You would be better off going back for another mfc that is all analog. Would note that some mfc's require +/- 15 volts power while others can run on just a positive supply +15 to 24 v.
good luck
01-25-2016 03:45 PM
hello
Is it possible to control this MFC using a DAQ connected to LabView?
What is the hardware you mentioned?
Thanks
01-25-2016 03:54 PM
01-25-2016 04:03 PM
01-25-2016 06:47 PM
hello
an ordiniary DAQ for example NI USB 6008 DAQ.
here is a schematic similar to my expected work.
01-25-2016 07:03 PM
I will use pressure regulator after N2 cylinder and befor MFC. like the picture here.
in my e nose system I will need to read some gas sensors and control some electronic (solenoid) valves. I will do this using a DAQ( for example NI USB 6008 DAQ) and LabView. The sole problem here is to add a MFC to this system and to maintain Flow rate on 1000 sccm during the tests.
I need a MFC that I can controll it using my DAQ and also be able to monitor it on the same labview user interface that will be for the whole e nose system.
what should I do exactly? 😞
01-25-2016 09:03 PM
01-25-2016 11:55 PM
Try to buy a mfc which is controllable by analogue signals. An example:
See page 1-2 for a Analog I/O port pinout, a D-sub port with 9 pins:
use pins 3-4 to supply DC voltage between +13.5 and +27 Volts so you power the mfc,
use pins 6-8 to vary the mfc setpoint with a DC voltage signal (analog output on USB-6008, 0-5V),
use pins 2-7 to read the actual flow, between 0-5 V voltage signal full scale (5V = maximum specified flow).
01-26-2016 04:26 AM
Thanks for the answers
Buying that MFC was a mistake and waste of time and money.Also that was the cheapest one (100 $).
I wish I could control that MFC but it seems expensive and time consuming. So I should buy another MFC. But if there is any other way to control this MFC using LabView and a NI USB 6008 DAQ please tell me. Here is my MFC:
If there is no way, so which type of MFC should I buy?
9 pin or 15 pin?
01-26-2016 04:33 AM - edited 01-26-2016 04:41 AM
I beleive, there is no way to control a DEvicenet interface using a DAQ USB-6008.
"If there is no way, so which type of MFC should I buy?
9 pin or 15 pin?"
Both should be ok (you will just need a different D-sub socket to make or buy), but be sure and double check the manual before you buy. You need a MFC which can be controlled using 0-5 V voltage signal, and creates an analogue output proportional to the actual flow rate (between 0 and 5 V DC).
The best if you post here the model which you find, so we can have a look.
Do not forget, you will also need a proper power supply with DC voltage inside the required range specified in the MFC's manual. Also be very careful when you do the wiring, you can damage your MFC if something wired incorrectly.
EDIT: another option which you can consider is buying a MFC with RS232 interface. Many MFC has RS232 pins beside the analogue control/read option. Either you have RS232 (also called "serial port" often) already in your PC, or you can buy cheap USB-RS232 converters (few EURs, try to get models with FTDI chip, usually they work good with LabVIEW). If you get an MFC with RS232 interface, you even do not need the USB-6008 to use. You simply use RS232 communication between the PC and the MFC. Many MFC models have LabVIEW drivers available for RS232, but even if not, using the manual, you can figure out the serial commands which you need to program in LabVIEW...
But still, you will need a power supply (PSU).
01-26-2016 06:44 AM
I bought few MFC for 20-40USD Tylan. I control them with 5VDC and use USB 6009 just to monitor them. Read all posts carefully. Try to find on ebay cheap MFC with card edge 20pin. The normal price is less than $50.
01-26-2016 01:00 PM
thanks for the answers specially for Blokk's explanations.
my goal is to maintain 1000 sccm flow rate. What is the mentioned sccm on the MFCs? Is it the final range?
So should I buy a 2000 sccm MFC and control it for example using a 2.5 volt, or a 1000 sccm MFC control it using 5 volt?
What will be the correct connections and piping? should I use 2 valves beside the MFC like this?
an other important question: To what pressure should the N2 gas be reduced using a pressure regulator befor the MFC?