05-21-2022 04:40 PM
Hey, I'm new to this forum and I'm learning Labview for school.
I need to make a coffee vending machine and I have run into an issue where if I don't select the buttons in the correct order the system stops responding. It only works if I turn on my coffee machine and then click Order coffee any other combination of button presses results in the system not responding. I think it has to do with the Boolean logic? I appreciate any input and criticism and look forward to your replies.
Solved! Go to Solution.
05-21-2022 07:34 PM
Sorry, I cannot open LabVIEW 2021 Vis. Please use "save for previous" and reattach. (My wild guess is a dataflow problem, e.g. an event structure with inner interactive loops.)
05-21-2022 11:02 PM
Thanks for the reply which version would suit you? I'm sending 2020 just in case
05-22-2022 03:05 AM
Hi,
Sorry I couldn`t open your vi , Could you please save your vi 2019 so that everyone could see it.
Best Regards
05-22-2022 07:10 AM
Hi,
Thank you for your reply, I made a second version where I removed the power button it worked a lot better but I'm still interested on how I could add a power button in the future.
Thanks again
05-22-2022 09:53 AM
You are making some glaring mistakes using multiple event structures in multiple cases of a case structure. that's a very big no-no! An event structure needs to be in a place where it can actually execute if an event is queued up, so if your code sits in a different case, the event cannot be serviced and since your events lock the front panel until it can complete, you are locked out forever.
Some other glaring mistakes:
05-22-2022 10:09 AM
the file without the Power button is my finished project and it fulfils all the requirements set by the teacher. was your feedback with regards to that file or the one with a power button. Maybe my screen is bigger but at default size, it's difficult for me to read.
As for the use of local variables I understand they take a toll on your memory but since the teacher required the use of them to indicate the different states I won't change them.
05-22-2022 10:14 AM
Thanks for the feedback in any case but I am bound by some requirements set by the teacher and I only have around 5-7 hours of experience with Labview so I appreciate the input. the file below has the assignment in it.
05-22-2022 10:55 AM
Ouch. The suggestion to use local variables as the way to move values around in the application makes me wonder how much LabVIEW experience your teacher has.
05-22-2022 10:58 AM
OK, the assignment does NOT mention anything about the "secondary int" state, so get rid of it! Makes sure to stick with the requirements!
Vending machines don't have popups, so just use the message indicators. Use a radiobutton to make the drink selection.
The use of local variables just clutters the diagram, but if your teacher wants them, use them!