LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

coffee machine

For my study I have made a coffee machine where I can select coffee, hot water, cold water.

Also you can select the strength and add sugar and milk.

Now I am trying to add a watertank that reacts on the selection of coffee or water.

So when you select a cup of coffee the level in the watertank has to get less and after for example 20 cups of coffee you have to push a button to fill the tank.

 

Can somebody help me with this question and maybe send me a example?

 

Thanks in advanced

0 Kudos
Message 1 of 11
(6,563 Views)

What kind of problems do you have with adding the water tank code? Seems like a very basic question.

 

Hint: store the water level in a shift register.

 

This sound like a typical CLD sample problem. Maybe you should head over to the certification forum and have a look around. 😉

0 Kudos
Message 2 of 11
(6,556 Views)

Maybe you can help me to ad the working watertank.

I will be very thankfull for that.

I added the program in the attachment

0 Kudos
Message 3 of 11
(6,479 Views)

No. I would recommend that you start with some tutorials and look at the design templates that ship with LabVIEW.

 

In the current form, the program does not even have an outer while loop (are you using the continuous run mode? Don't! That's a debugging tool, not a way to run a VI). You have way too many local variables. If you would place the terminal after the big case structure, very few would be needed. There is also lots of duplicate code that could be combined.

 

The coffee machine IS one of the examples for the CLD. If you go to the forum I linked above, I am sure you would find a few example, including comments from other LabVIEW programmers.

 

... and why is the diagram and front panel maximized to fill the screen. I find that annoying.....

0 Kudos
Message 4 of 11
(6,466 Views)

What are you studying for?  I hope it's not the CLD.  If so, you should start with the CLAD.  If you've successfully passed the CLAD and write code like that, I would suggest taking a step back and not worrying about certification.

 

If you're trying to get practice for school, the project is a good idea.  But, you STILL want to take a step back and read through tutorials and programming practices.  Follow altenbach's advice and hang out in the certification forums looking at other coding examples. 

 

Like altenbach, I opened your code, took a quick look, and closed it.  Honestly, the code isn't worth salvaging.  You're better off starting over after learning basic programming practices.

0 Kudos
Message 5 of 11
(6,460 Views)

The study I am doing is mechanical engineer

I allready made the whole study but have to finish this last case to get my paper.

For me it would be very usefull if somebody can add the watertank for me because we only had 6 hours of training in the program.

0 Kudos
Message 6 of 11
(6,455 Views)

Aside from the fact it's cheating you won't learn anything by having someone else do it.

0 Kudos
Message 7 of 11
(6,422 Views)

I'm not even entirely sure where to start teaching here. The first thing I would suggest would be to look at the example of the Event Structure layout and how to use them, given that it appears that the only way you can run your program is by hitting the run continuously button (Very Bad). See Event Structure Tutorial

 

Next for your water problem look into shift registers for holding the current water value and adjust this everytime that a drink is made. In order to implement this in your program however you will need to redesign it in an event structure format. See both: Community Shift Register Tutorial and Shift Registers Introduction.

 

If you have any more questions on how to do anything:

1. Search the forums, I can almost guarantee that there will be someone who didn't once upon a time know how to do what you want  to do.

2. Ask a question in this thread (Don't ask for a solution).

3. Go back to your teacher/lecturer/TA and ask them if they have any advice. Of all the lecturers I have known they have been more then happy to help someone who has done some ground work sought their own solutions and then asked them for help.

0 Kudos
Message 8 of 11
(6,394 Views)

I have not looked at your code, but I can give you some hints based on what you have said.

 

Try to start by better explaining to us what you think needs to happen.

 

You already say "So when you select a cup of coffee the level in the watertank has to get less and after for example 20 cups of coffee you have to push a button to fill the tank." This means that you have a tank, lets call it tank. You say it holds 20 cups so tank = 20. You say when you select a cup of coffee, the level of the tank has to get less so you need to subtract. You will also have a button to fill it (resetting the tank = 20) or add a certain amount of water (tank = tank + water).

 

You will need some sort of loop to allow more than one time selecting a beverage. You probably already have it. You probably already have the decision tree for the selection of beverage. You just need to add the code that handles the tank level.

 

So tell us the rest. Then try to create the LabVIEW code to do it. And then, ask for specific advice about that code.

 

Good luck on your project.

Bob Y.

0 Kudos
Message 9 of 11
(6,344 Views)

Can you please share the question for Coffee Machine. Also, If you do have a Treadmill question, do share it.

0 Kudos
Message 10 of 11
(3,707 Views)