07-22-2015 02:37 AM
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
07-22-2015 07:39 AM
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
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord