LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

constant flow rate pt 2

Problem: I'm trying to create a gui which allows the user to adjust instensity.  I have my valves characterized, and my event determined sliders,  but I still can't quite figure out how to make sure that no matter how many valves are open, the flow rate remains constant.  Example.  I have 2 valves open, I want a constant flow rate of 10L/min, so if i adjust the flow rate of one valve, the other valve automatically adjusts to maintain the constant flow rate.  The problem I am having is how to integrate the characterization of the valves with my event sliders.  I would then like to be able to adjust the constant flow rate for different elements.  Attached is what i have so far.

 

0 Kudos
Message 1 of 13
(2,966 Views)

Your VI works just fine for me.  When I adjust one fill slide, the other adjusts accordingly.

 

I do not recommend using a Timed Loop wrapped around an event structure.  It kind of defeats the purpose of having a timed loop.  Just use a normal while loop.

 

So where is the problem?

 

One thing I see is that nothing you ever do in the upper while loop ever affects what is going on in your DAQ loop.  (Again, I'd use a normal while loop here.)  The only inputs in your lower while loop are the cluster wire coming in with configuration data which never changes once it comes out of the first subVI.  And also the value in the indicator Array2, which also never changes because nothing ever changes that indicator.

 

 

Message 2 of 13
(2,962 Views)

The adjustable sliders are not the issue, its how to make the valves that i'm working with have an adjustable constant flow rate. I want to take those sliders, and use them to make 1 valve have a flow rate of lets say 8 L/min, and the other will automatically adjust to 2 L/min.  In the daq, you can see that the valves open at different voltages, so i'm having trouble linking those voltages to the slider, making a constant(total) flow rate for the valves to adhere to, and making the constant(total) flow rate adjustable

0 Kudos
Message 3 of 13
(2,929 Views)

@LaplaceT wrote:

 so i'm having trouble linking those voltages to the slider, making a constant(total) flow rate for the valves to adhere to, and making the constant(total) flow rate adjustable



Your code doesn't show any connection with what is happening to the sliders affecting the data going to the DAQ assistant.

 

Show your latest code where you've attempted to connect the sliders to the DAQ assistant.

0 Kudos
Message 4 of 13
(2,922 Views)

Here is the basic VI where its just connected to the Daq.  In the last VI I was attempting to integrate the valve profiles into the sytem.  From this attached VI, where should I go from there to make sure that as I adjust the voltages, the total flowrate from the two valves will remain constant?

0 Kudos
Message 5 of 13
(2,910 Views)

I don't understand what you mean by adjust the voltages.

 

First thing I see is that you swap the order of the values going into the merge singles in each event cast.  In Vertical Fill Slide Value change, you have Vertical Fill Slide2 Value on top.  In Vertical Fill Slide2 Value Change, you have Verical Fill Slide Value on top.

0 Kudos
Message 6 of 13
(2,908 Views)

When I say adjust the voltages, i'm just talking about moving the slider. Sorry for the confusion

0 Kudos
Message 7 of 13
(2,906 Views)

Once you fix the problem with the signals being mixed up and swapped between the two event cases., (you should move the Merge signals out of the event structure since it is code commone to both events), what problem are you still having?

 

Your code otherwise looks like it would work sending voltages of 0-10 where the sum would be 10, to your DAQ assistant.

0 Kudos
Message 8 of 13
(2,904 Views)

Yes, I fixed the signals and it does work for the voltage sums to be 10, but what i'm concerned with is the flow rates that these voltages produce.  The flow rate at 10 volts from 1 valve is a lot higher than both valves being at 5 volts.

0 Kudos
Message 9 of 13
(2,899 Views)

You'll have to figure out what flow rates correspond to what voltages.  Then create a subVI that will map the desired flowrate to a voltage.  It may be a simple scaling function, it may be a lookup table.

 

One thing I like to use is a combination of threshold array and Interpolate 1-D array.  I'll have a couple of arrays with mulitple points where the element in one array that relates to voltage would correlate to the flow rate in the other array.  This would give a piecewise mapping of one to the other.  The functions will do a linear interpolation between points.  The more points you have in the array that correspond to the real profile of the pumps, the closer the actual flow rate will be to the desired flow rate.

 

One question though, does the behavior change over time?  Does changing viscosity or temperature cause different voltage to flow rate behaviors?  If so, your problem will get more complicated.

0 Kudos
Message 10 of 13
(2,888 Views)