In our blog post, Using LabVIEW™ Software to Interface with Brooks Instrument Thermal Mass Flow Controllers, Nigel Glover reviewed the most popular forms of data acquisition and the hardware needed to do that. In this post, I’ll review the software side of things and how to get the mass flow controller connected and communicating with LabVIEW™. Luckily, this video tutorial is a great resource and will show you how to do this in under 30 minutes, including how to send a set point and monitor flow response.
Before we get into the step-by-step instructions, I want to preface this by saying the last time I used LabVIEW™ regularly was my freshman year of college, and even then, it was very limited. So, if I can do this, you can too! We’ll build a very basic program utilizing built-in LabVIEW™ functions, but it will provide a quick and easy way to interface with your MFC.
What You’ll Need to Get Started
To get started with the LabVIEW™ program, I first needed to be able to connect my device to the computer. The minimum requirements needed to do this are:
• National Instruments (NI) DAQ device with analog inputs and outputs
• Brooks Instrument SLA Series analog MFC
• PC with LabVIEW™ license
• Power supply for MFC
• DB15 to WE cable (p/n: S124Z361AAA)
For this demo, I’ll be working with an analog device, which provide the analog signals through the 15 pin connector on the top of the device. In order to connect it to both a power supply and the NI DAQ, I had to make a custom breakout cable to connect the power supply and DAQ simultaneously. You also need to make sure that the DAQ you have allows for both analog inputs and outputs. I am using the NI USB-6009, but their new version of this is the USB-6002.
Writing the Program
With the device now connected, I will be able to start the program. To get data to and from the device I used the DAQ assistant which is located in Measurement I/O, NI DAQ, and then DAQ assistant. You will have to set up 2 DAQ assistants, one for acquiring a signal and one for generating a signal. Generating the signal will be used for sending a set point to the Brooks Instrument SLA mass flow controller. You will click on analog input, then voltage, since this SLA is setup for 0-5V. I have my DAQ wired to the AO0(analog Output channel 0) terminal, so I’m going to select that. For terminal configuration, I have it set up for a reference single ended signal. I also want the signal output range to be from 0-5V, since this is how I’m going to send the set point. So once that is configured, I need a way to send the set point, so I will go to the front panel and make a numeric control. But since I would want to send a set point as a percentage of full scale rather than a voltage value, I will have to multiply the signal by 0.05 before it gets sent to the device.
Now we will want to be able to read signals from the device to see how much gas we are flowing. We will do that with the NI DAQ but this time will acquire signals. You will click on analog input, then voltage. I have my DAQ wired to the ai0(analog Input channel 0) terminal, so I’m going to select that. For terminal configuration, I have it set up for a differential signal, but you could have it set up for referenced single ended as well. At this point you can get pretty flexible with what you want to have the program read back to you from the device. What will be spit back to us will be the voltage signal coming from the device. This can then be converted into % of full scale, or even the flow in cubic centimeters per minute. I want to put all of those indicators on the front panel. I also want to put a control to enter the full scale flow rate of the device. This will allow for us to display the flow output. If you want, you could also put a graph on your front panel to monitor the device performance over time. So now we’re going to have to wire everything in such a way that all outputs are accurately represented. Voltage is easy, it’s just wired straight to the DAQ assistant since that’s the raw signal coming back from the device. %FS is next, which is just the raw signal multiplied by 20. I would also like my graph to display the %FS, so I’ll wire that here as well. In order to get the flow out in cubic cm per minute, we’ll need to multiply what we put into the %FS output by .01 and then by the device full scale in sccm.
Those are all of the inputs and outputs that I want for this program, but I want to now modify how the program is run. I’d like for it to run continuously until I tell it to stop, and then when I hit stop, I’d like for the program to send a 0 set point to the device so it will stop flowing. To do this I’ll want to put a while loop around what I have so far. On the front panel I’ll add a stop button, and then wire it to the loop condition icon. To have the set point be set to 0 when I hit the stop button, I’ll want to make another DAQ assistant for generating signal. I’ll also want to make a local variable for the set point. Those will be outside of the loop. On the inside of the loop I will have a “0” integer, and wire it to both the DAQ assistant as well as the set point local variable.
Now the program will be ready to use. If I hit run, it will run continuously until I hit stop. When I turn on this air pump and then give the device a set point, it will start to flow, and will also read out on the graph.
I can now make any aesthetic changes necessary, such as changing the graph scaling and organizing the front panel to make it more professional looking.
Now that we’re done with that program I’d like to touch on one more detail about Brooks Instrument devices and LabVIEW™. We have a lot of DLL software that can help you set up communication with a variety of our digital devices. The DLL’s can be used within whatever program you write, and are available on our website for you to download.
If you have questions about anything, please ask us!