05-03-2010 08:06 AM
True is the same as you posted, i was just trying to get this working before i started adding to it....I'm using LabVIEW 9.0
05-03-2010 11:55 AM
You are saying that it didn't work? What I posted didn't work?
SInce you are using LabVIEW2009, you can simply drag the image I posted into the block diagram and you instantly get the code. The image is called a code snippet. You will need to use Internet Explorer in order to drag it as code onto your block diagram. It does not work with firefox. Otherwise, I can post the code.
You should see the 10 tanks fill up at a similar (but not the same) rate. Once they reach 90% of fill, they automatically empty into the reservoir. You can adjust the full value to something relativeto the volume that you want to model.
Let me know how it goes..
05-03-2010 12:12 PM
Ray.R wrote:You are saying that it didn't work? What I posted didn't work?
GASP I shudder to think that Ray's posted code wouldn't work. So I tried it myself and it does work fine. My confidence in you is restored, "mon cousin du nord".
To see it run faster(I don't have patience), change the delay time from 100 to 10.
05-03-2010 02:00 PM
tbob....
What was that?? You thought that I'd post non-working code???!!!
okay... it did happen a couple of times...
But the code was written after several bottles of wine... what did you expect? 😉
LOL!!
😄
05-04-2010 01:06 PM
No no Ray, i didn't for one minute mean there was a problem with your code 🙂 just me being a dumb ass, dam volume levels of tanks!! All works and my 'plan' was to use the code as a subVI but now it cycles through once then stays filling tank 10 !! aahhhhhhh this project is driving me mad !! I wanted to try and add the C&F tanks here and have the reservoir pumping back to the 10 houses but ggrrrrrrrr these things are easy to say, no idea how to start, this would be easier to build in real life !!
Simone....
05-04-2010 01:09 PM
05-04-2010 02:18 PM
Using the reservoir as a lacal variable? Make any sense? Or will this just keep tracking levels and mean i cant set some sort of a trigger to pump from the reservoir when tanks get to like 20% full ?
05-04-2010 02:25 PM
You lost me with your last post..
Rule # 1 Never use Local Variables 😉
Dividing by 10 will give you the same amount in all 10 tanks. So you could divide by 10 once and wire the result to all of the tanks. I'm sure you don't want to do that.
Is the problem you are having related to using the code as a sub-vi? I will look into that a bit later. My "breaktime" is already over. I need to wrap up some Boundary Scan software..
05-04-2010 02:35 PM
Local variables bad then i take it 🙂
Ya, not sure what i done but when i tried using as a sub-vi it got messed up...
Your right about that last post, doesn't make sense...don't mind me....(grasping at straws here 🙂 )
05-04-2010 07:45 PM
No problem.
I will look at the sub-vi aspect tomorrow morning.