05-28-2013 09:10 AM
Dear LabVIEW Forum members,
Here's my program functional design specification...
(1) I have a tank initially filled to 100 litres
(2) After each 1 second interval the following liquid (in litres) is filled and discharged from the tank at the same time...
Inlet to tank [0, 0.345, 0.6, 0.76, 0.86, 0.88, 0.85, 0.82]
Outlet from tank [1.534057, 5.250186, 6.801075,6.801075, 6.801075, 9.11922, 0.989118, 0.989118]
How can the tank contents (in litres) be calculated at each 1 second interval ?
Regards,
05-28-2013 09:13 AM
Hi,
So, if I get you right, the tank initially filled to 100L, then 0L input after 1 second and at the same time, 1.534057L discharged from tank. Then after discharge (assuming discharge/intake happens in 1 second), another value input of 0.0345L intake and 5.250186 discahrge in 1 secomnd and so on right?
05-28-2013 09:22 AM
Yes, that's right, I need the tank contents in 1 second intervals based on the input and output contents.
05-28-2013 09:39 AM - edited 05-28-2013 09:39 AM
Can you show us what you are trying to do with a VI?
I would guess by putting your fill values in an array and enable indexing, this will be your 'x' values. do the same for the drain values, this will be your 'y' values. Use the subtract function then add it to your tank shift register value with a 1sec wait in the while loop? hard to guess what you are trying to do here...
05-28-2013 09:48 AM
I'm sorry but I didn't understand your description (mainly because I'm not at all experienced with LabVIEW). I have described the problem that I'm trying to implement in LabVIEW and I've been trying myself to implement this however I'm completely stuck, I don't even know where to begin.
05-28-2013 09:56 AM
@bunnykins wrote:
I'm sorry but I didn't understand your description (mainly because I'm not at all experienced with LabVIEW). I have described the problem that I'm trying to implement in LabVIEW and I've been trying myself to implement this however I'm completely stuck, I don't even know where to begin.
hi bunykins,
at first, how about you place two 1-d Arrays (inlet & outlet) and one constant (100 l tank) on your Blockpanel and type your data into those control elements:
Inlet tank = [0, 0.345, 0.6, 0.76, 0.86, 0.88, 0.85, 0.82]
Outlet tank = [1.534057, 5.250186, 6.801075,6.801075, 6.801075, 9.11922, 0.989118, 0.989118]
tank = 100
alex
05-28-2013 10:04 AM
Please post your VI with the inlet and outlet values saved as default.
It will be faster for us to help you and you will learn more if we show you how to fix your VI than if we write on for you.
Lynn
05-28-2013 10:04 AM
I've attached what you've suggested but how do I start off with the 100 litres to calculate the next value after 1, 2, 3 seconds, etc. I guess that this is done with a loop?
05-28-2013 10:06 AM
05-28-2013 10:12 AM
No,that's not what I want. I can see how your program works and this gives the correct result after x seconds however I want an array of results for each 1 second interval.