LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Im a student having trouble with a Municipal Water Managment System Project......Help please !!!


Simone 27 wrote:

pic111.jpg

Sort of what i was thinking/ish......I don't even know anymore, needless to say i does sweet F all 😞


LOL!!  😄  You give up way too easily.. 

Think of this as a fun challenge..  Don't try to code it unless you understand why you're coding it.

 

Describe each step of what you want to do and write a pseudo code which represents it.  Or a state diagram.  Then code it.

 

For now, can you post (attach) all VI's that you created.  You can zip them up first.

0 Kudos
Message 41 of 77
(1,508 Views)

I have been reading this thread but have not contributed until now.  I agree with Ray's recent posts suggesting that it is time for you to work on the design of your program and not the coding.  It seems that you are not sure what the program needs to do.  If you do not understand that, it does not matter whether you know HOW to do any particular part. It may not be as much fun, but spending the necessary time with a pencil and paper now will save you time and get you to a working program sooner over the time frame of the entire project.

 

Lynn 

Message 42 of 77
(1,500 Views)

Lost ! Haha understatement of the year 🙂 my thinking with the vi there was that i would be able to make a tank sub-vi that i could fill from the reservoir that is filling from the 'rain' vi and that i could set the tank to start filling from the reservoir when it was say 20% full and fill until 90% subtracting from the reservoir at the same time, then stop, then just put ten of them into the code ???? Your right to, the more you play around with this the easier it gets, i just wish i had a couple of months to do the project....i could make a kick ass one 🙂 so many possibilities....

 

When you wrote that first code in minutes, i was like ' I've just found the guy that created LabVIEW ' 🙂 Haha, you've obviously been working with it for a while.....

 

How long before it get easier 🙂 ?

 

0 Kudos
Message 43 of 77
(1,492 Views)

I started in ~1988-89 with LabVIEW 1.2.  Our first project took about two years and had a lot of code which was worse than what you are doing now.  But we were on our own - no training classes of any kind.  No support like this Forum.  No one to ask questions.  Very few examples.

 

By the time I had rewritten that program three or four times (with numerous upgrades, additions, and extensions) at LV 5, it was starting to become a reasonably understandable program.  It is still in use.  I would love to rewrite it again with a Producer/Consumer (events) design pattern with a well thought out state machine in the consumer loop.  But it will probably never happen.

 

So, "How long before it get easier :smileyhappy: ?" Well, it is still getting easier, but the need to think about what the program needs to do has not changed.  And defining the program specifications still requires the customer (the end user of the program) to know what he or she wants.  That part is always the hardest.

 

Lynn 

0 Kudos
Message 44 of 77
(1,485 Views)

It gets easier the moment you design the code.. 😉

 

You can implement all of what you described.  You simply need to "design it".

 

The way you described it sounds like you would be more comfortable with a State Machine.  You could even get sophisticated and have a producer / consumer architecture, where the producer monitors the state of the tanks / reservoir and sends the appropriate state to the consumer loop which does the work.  It all depends on how you want your code to behave to external and internal events (user interaction, conditions, etc).  Unfortunately, no one can design that for you, because we cannot read your mind.  🙂  That philosophy applies in real life, so it is good to learn it early in your career.

 

Write down the overall system.  Describe it.  Then get into the granularity by breaking it down into sub-systems and what each part does.  If necessary break it down some more until you describe the push-button and the look & feel of the User Interface.

 

We can help you along the way.

0 Kudos
Message 45 of 77
(1,477 Views)
Haha, now my dam laptop is giving up on LabVIEW 🙂
0 Kudos
Message 46 of 77
(1,469 Views)

Very good points, thank you both for your comments....Your right it gets very mess as you go through it trying to do bits and pieces.

 

Ok....does this sound logical ? 🙂

 

The end result must be a chloridated, flouridated, ph monitered reliable water source for a group of houses.

 

I've decided to go a little extra(why, i don't know 🙂 ) and rather than starting with a reservoir that fills its self i wanted it to be filled from the collected rainwater from the houses in the scheme. Green and all the rest :). therefor this too must be included.

 

My starting point would be:

10 tanks to simulate the collected rainwater, with a control to ensure they will not over flow...

1 tank to simulate the reservoir, this tank being filled as the 10 previous empty with some way for it to have a run off so it can only ever fill to 90 %, two alarms one at 40% full to say 'Start water conservation' and one at 20% to say 'warning water levels critical' and 2 indicators for Ph levels and volume in gallans. 

2 tanks to simulate the chemicals being added to the reservoir tank (maybe a set amount every time the ten 'rain' tanks empty into it) and again warnings for tank levels(40%/20%) and controls to vary amounts distributed.

10 further tanks to simulate the end customers water supply, these to be filled from the reservoir automatically as they get to 20% full and stop at 90% full, (some sort for a 'tap' to run off water to show simulation working)

 

Through the system some sort of a simulated leak detection system.... ????

Maybe like a series of valves that could close off each section of pipe with pressure gagues at each end that could be controled and monitered from the maintanence panel... (daft?)

 

The panels 🙂

A maintanence panel:

Can see: PH levels, Reservoir levels in gallans, Pressure gagues for leak testing. Total usage and individual usage.

Warnings: Reservoir level warnings, chemical tank level warnings. It's raining warning 🙂 (so as not to shut off valves)

Controls: Valve control for leak detection? Refill chemical tanks button, vary levels of chemicals added, system shut off(close 10 valves between reservoir and end tanks) individual house shut off ( close valve between reservoir and that house)

 

Customer panel:

Can see: Individual usage in gallens and money, PH levels, chemical levels.

Warnings: Reservoir level warnings. maintanence in operation warning?

Controls: Shut off individual valve closest to own house.

 

Managment panel:

Can see: Total and individual usage in gallens and money. Reservoir level.

Warnings: ...none?

Controls: Individual and total shut off, for unpaid bills and water conservation measures.

 

Oh my god this sound like a great system and i'm really happy with my idea....but i still want to cry when i think about how i go about doing it....I wonder will they accept it on paper 🙂 I could like draw little panels with all the alarms and controls on them ... aaahhhhhhh

 

Messing aside 🙂 this is what i have in my head of what i'm trying to do...sound ok ?

 

 

 

 

0 Kudos
Message 47 of 77
(1,451 Views)

Hi Simone,

 

Excellent job at describing what the software should do.  Now I'm happy to have helped.  This is great.  You HAVE to submit that description as part of your project to show that it was planned and not some adhoc code  that was put to make something work.  Congratulations and give yourself a pat on the back.

 

Is the simulated leak detection system your idea or is it part of the requirements for this project?  If it is your idea, I would leave it out for now.  If there is time, you can add it later.  Call it an optional feature for the system.

 

Now that you have the requirements specs, you can work on the architecture.  I'll read your description again and propose something.

 

As for the attached zip file, I won't even look at it, because it  will no longer be necessary.  Let's do it right from scratch.  At the end of the exercise remind me to tell you something important that you will learn from this exercise..  😉

0 Kudos
Message 48 of 77
(1,437 Views)

Simone 27,

 

Well done.

 

The next step is to implement your specification in code, right?  No.  Not quite yet.  I like to use a project like this to illustrate what I call hierarchical thinking.  At the top level of your hierarchy is the title: " Municipal Water Managment System ".

 

Below that is your specification.

 

The next layer is the architecture.  As Ray said earlier, a state machine is probably a good place to start.

 

Once you have identified all the states, along with the inputs and outputs from each state, and the conditions which define the transitions to the next state, THEN you can begin to generate code.  The nice thing is that that code is usually pretty easy because it only covers what happens in one state.

 

A bit of thinking. A bit of planning.  A bit of organization. Write some small and straightforward pieces of code. Put it together. Successful project.

 

Well, it is not quite that easy, but this kind of process considerably reduces the stress.  It makes each step a manageable one with a clear progression to the next step.

 

Lynn 

Message 49 of 77
(1,421 Views)
Well said Lynn.
0 Kudos
Message 50 of 77
(1,407 Views)