11-02-2016 05:57 PM
Hi guys,
I need help giving change for my virtual vending machine. So I created a VI that dispenses a bottle of water for 15 cents. So I created a boolean/LED indicator that lights up when the correct amount is shown. However, if you were to press the dime function twice, that means you would have to give change, 5 cents to be exact. If you could give me some tips on how to dispense change that would be great. Thanks!
11-02-2016 05:57 PM
I also attached my VI here
11-03-2016 01:15 PM
Hello Kevinzhou225,
You can take a look at this Producer Consumer example of another vending machine. Open Producer Consumer Coke Machine.vi in the zip file attached to the webpage: https://decibel.ni.com/content/docs/DOC-2145
Then look at the bottom while loop, specifically the "Change" state of case structure for related code.
Thanks!