11-17-2009 08:10 AM
Hi,
I am totally new to LabView. I am trying to build a system where 2 compressors control/fill the air pressure in a tank. The pressure of the tank is calculated using the following equation P = (mRT)/V. If the pressure in the tank is below 50 bar then both compressors should be on, if it's between 50-100 bar then only one of the compressors should be on, if it's over 100 bar then both compressors should be off.
The mass flow of compressor 1 is 7g/sec, the mass flow for comprssor 2 is 20g/sec and i will use a random function to reduce the pressure of the tank (approximately between 1-10 bar/sec). There is also a cooling system for every compressor which basically means that before a compressor can be switched on it has to wait for 3 secs. I would like to display the pressure vs time on a graph with the compressor that are on at that time.
Any ideas on how to start this project.
11-17-2009 08:16 AM
11-17-2009 08:38 AM
Hi GerdW,
It's actually something my boss wants me to do (And it's only my 3rd week on the job ) But i think he wants me to learn how to use LabView.
I kind of have an overiew of the program flow. The main component will be the pressure tank which uses an equation to calculate the pressure (which i guess should be in the loop so that it recalculates every sec), and it will have 2 main inputs which are the 2 compressors each with a different flow, and 1 output which is the leaking pressure determined randomly. There also should be something that determines how low the pressure in the tank is.
Do i have the right idea?
11-17-2009 08:50 AM
Any definition is a good start.
To learn more about LabVIEW, I suggest you try looking at some of these tutorials.
11-18-2009
09:54 AM
- last edited on
03-25-2025
08:35 AM
by
Content Cleaner
If you are planning on doing a lot of LabVIEW programming in the future you may want to consider taking a LabVIEW course. It would make your life a lot easier. Here is link link that gives more information about LabVIEW education courses:
LabVIEW Courses
https://www.ni.com/en/shop/services/education-services/labview-courses.html
Nick Keel
Applications Engineering
National Instruments
11-18-2009 11:12 AM
Sounds like fun.
Start by drawing on paper what you would like to see on the screen when the system is operating.
Now, find the controls (and / or indicators) that will most nearly show you what you have drawn.
How about a boolean control for pump one (the little light will show you when it is on...or you could change the color when you have asked it to come on but before it actually starts...that 3 second delay)
Another boolean control for pump 2
How about a vertical slide indicator for the tank pressure?
How about a vertical slide indicator showing how fast the tank is being emptied?
How about a vertical slide indicator for each of the compressor inputs, and perhaps another for the combination of each of the inputs?
each of the lines that control the displays can be taken to a graph and that would plot them against time. (with some fiddeling of graph properties)...you need to fiddle with the mass to pressure conversion...(you said there were coolers so can you assume that the Temperature is constant??? if so then V is constant (tank volume), R is constant (for air).. so the variable is m (mass) .... havn't worked much in this kind of problem but you may need to convert P in kPa to tor or something like that...careful!
Get the Front Panel like you want it first...then figure out how to make the block diagram do what you want.
Hummer1
11-19-2009 04:19 AM
Thanks Hummer1 for the advice
So here is what i think the FrontPanel should look like. Unfortunetly i have no idea what to do after that, how do you connect all inputs to the tank which is a double and has only one input to it, is there a way that i can program it to calculate the pressure everytime (as Hummer1 said earlier the only constant is m and i pretty much have the calculations set i just don't know how to add them to the tank).
I used a constant for the compressor as they should have unlimited supply, how do i control them and turn them off and on depending on the pressure of the tank.
Any ideas would be greatly appreciated.
11-20-2009 09:03 AM
How are you getting your data into your VI? Are you using a DAQ card? To get the tank pressure you would use math functions (Block diagram»right click»functions»programming»numeric) to perform your calculations. The output of your calculations would go to the input of the tank. Open the example finder in LabVIEW (help»find examples) and look through the examples to get some ideas about how to create VIs. I would also read through the tutorials that Ray.R referenced. There is a lot of really good information in them.
Nick Keel
Applications Engineering
National Instruments