LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

drink dispenser

hi guys. i am having issue making a drink dispenser .vi using a card reader to show its balance while rejects if its less than a certain amount.

1) how  do i deduct the drink cost from the card reader.

2) how do i decrement the drinks so that it will show sold out after 5 time of that choice

its the best if there is anyans via picutre of these 2 problems.

cheers

0 Kudos
Message 1 of 2
(2,836 Views)

Don't post pictures, post code.  You wouldn't take a screenshot of notepad and post it on a C++ forum.

 

1) Use subtraction

2) Use subtraction

 

I'm guessing what you'll want to do is put your code in a while loop, and using a shift register (or 2) keep track of the current state of the application.  This can keep track of the currently inserted card, and number of drinks remaining.

 

This sounds similar to a CLD practice exam known as the ATM Machine.  Here is a link to several practice exams includeing the ATM Machine and an example solution.

 

http://ftp.ni.com/evaluation/certification/cld/cld_sample_exams_english.zip

0 Kudos
Message 2 of 2
(2,748 Views)