LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem within program

Solved!
Go to solution

I am trying to build a coke machine which dispenses coke and fanta. However, whenever I insert the coins into the machine, it only dispenses out coke only.

 

I feel like I am making an assumption somewhere, but I am unaware where that might be. Can somewhat take a look and give me a few intakes? 

0 Kudos
Message 1 of 5
(2,557 Views)

None of your state decides to switch to "Dispense Fanta"  then how your program will switch to "Dispense Fanta" 

 

Recheck your code

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 5
(2,516 Views)

Boolean buttons COKE and FANTA events are not connected/used in any states to decide which to dispense.

 

First make your requirement in a flow diagram and proceed with your implementation, problem in your design itself.

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 5
(2,514 Views)

Can you help walk me through this? I'm kinda lost.

0 Kudos
Message 4 of 5
(2,508 Views)
Solution
Accepted by topic author Seacreature2002

As PalanivelT stated, you really need to document what you want your application to do first.  Make a state diagram chart showing how the states transition.  Once you get that, then you can step through each state and make sure they are doing what they are supposed to.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(2,497 Views)