04-30-2010 03:24 PM
Hey, just ran out for a take away....
Got most of your post rebuilt but not fully...
Not sure what your doing with the arrays to be honest though 😞
You mind a few words to explain ?
( What's wrong with xxx 😛 just being nice )
04-30-2010 04:43 PM
Simone 27 wrote:Not sure what your doing with the arrays to be honest though 😞
Instead of having 10 tanks (house roofs), he created an array with 10 elements, each element is a separate tank. It's easier that way.
04-30-2010 05:10 PM
04-30-2010 06:52 PM
I should let Ray explain. I think the False case does nothing because the tanks are full.
04-30-2010 06:58 PM
05-01-2010 07:56 AM
Sorry... yesterday was a crazy day.. Glad "le cousin du sud" was filling in for me 😉
I'll explain some of the logic:
I wanted to generate random rates of filling, which is more representative of actual rain. But overall, the average rainfall over roofs should be relatively the same, so the random function works well for this example. I didn't want to have 10 calls to the random function, so I figured, each loop iteration could be for a seperate tank. So there is a shift register that keeps track of indexing and resets the index once it reaches 10 (kinda normal logic here). As I mentionned, yesterday was very busy and when I visit thhis forum, I skim through the postings and occasionally do not have the time to fully read all the details, so I "create" solutions. Bad Engineering, mind you, but quick parachuted solutions... 😉
I figured that once the tanks were at 90% capacity, that tank would empty onto the reservoir. That's what happens in the TRUE Case. There is nothing happeningin the FALSE Case, because there is nothing special happening (no event to handle). WHen emptying into the reservoir, it resets the volume in the local tank to zero, and it starts filling up again.
Basically, the code was written as a baseline to complete it with whatever requirements that it needs to meet. The use of arrays is a tidy way to write code. Short & sweet, and usually easy to follow. Sorry about the lack of comments. 😉
05-01-2010 01:40 PM
That's so much easier than all the messing around with random number generators i was doing.
I've put together what you sent me but am obviously doing something wrong as the reservoir doesn't fill.
It's a great way of simulating rainfall....Am i right in thinking te right way to progress is to add two further tanks simulating chloride and fluoride being added that add 1 part to the reservoir every time the tanks empty into it. And would linking the release to the reset be a good idea?
I'm sorry if i'm being a torture and thank you again for your help, your so good.... 🙂
05-02-2010 12:51 AM
05-02-2010 08:33 AM
What am i doing wrong 😞
05-03-2010 07:02 AM
Which version of LabVIEW are you using?
Also, can you show the True Case? What you posted looks pretty much like what I originally posted, so I do not see where you add the chemicals.
You could have a numeric control to select how much (volume or percentage) chemical to add. The amount would be substracted from the holding tanks and added to the reservoir each time one of the house tanks is emptied.
You could add a "FILL" button to replenish the checmical holding tanks, and some indicator LED's to indicate that the levels are low.