10-20-2016 03:37 PM
Hi NIquist,
I've spent a lot of time on Google, and NI's site searching, & definitely did not come up with pages of examples. I found a few, but they all seemed rather complicated to me. Maybe this is just a complicated project for a newbie to attempt? I absolutley wouldn't just copy some code, as I really want to understand what is going on under the hood. Along with the VI, I need to submit a .doc explaining how all of my code works, and why I chose to program it the way I did. I'm a middle aged guy back in school trying to learn a new trade, so not having any prior programming experience is slowing me down a little I feel.
I appreciate all of the help, and will continue to search for some explanation(s) that make sense to me. The event structures lookd interesting to me because they seemd to trim some of the fat off of just using case structures, but again, I really don't know what I'm talking about. I have seen a couple of examples using ques, and I don't understand how those work yet.
Thanks again for taking the time to post, I appreciate it!
George
10-21-2016 12:39 PM
I've been using LabVIEW since version 3 and I almost always use event structures (though they weren't available until version 6.1 I think).
10-21-2016 01:12 PM - edited 10-21-2016 01:12 PM
Hi Paul,
Here is what I have so far. I just need a shove in the right direction...
Thanks,
George
10-21-2016 05:36 PM - edited 10-21-2016 05:37 PM
@gsrokmix wrote:
Here is what I have so far. I just need a shove in the right direction...
10-22-2016 11:09 AM
You missed something.
You have LabVIEW 2015 (I can tell from the vi properties) yet, you misssed all of the information available from the create project from template dialog! This is a major mistake!
From the "Getting Started Window" Menu >>View>>Getting Started Window Select the BIG button that reads "Create Project"
There is a reason why those "More Information" hyperlinks are bold! Go there! we will be happy to help clarify any points you don't fully understand from that source.
10-22-2016 12:45 PM
Hi Jeff,
Thanks for pointing that out. I feel stupid for not seeing those options before. We have only been creating VI's in my class, and haven't dove into projects yet. I like that there are notes all over the code to help you through. That is the kind of help I think I need.
I'm sure I'll have more questions, and I thank you again for your time / help.
George
10-22-2016 12:47 PM
Thanks altenbach,
Those are great suggestions. I will try to figure out how to impliment them.
Thanks again,
George
10-22-2016 12:48 PM
@gsrokmix wrote:Hi Jeff,
Thanks for pointing that out. I feel stupid for not seeing those options before. We have only been creating VI's in my class, and haven't dove into projects yet. I like that there are notes all over the code to help you through. That is the kind of help I think I need.
I'm sure I'll have more questions, and I thank you again for your time / help.
George
No problem! Post those questions as soon as you have them!
10-23-2016 03:46 PM - edited 10-23-2016 03:48 PM
Hello again,
So after struggling to figure out how to program the machine the way I really wanted, I changed my criteria somewhat to make things simpler, and give me a working model that at least works....kinda sorta...... 🙂 I just could not figure out how to use the case / event structures to get the functionality I was looking for. I gave up on the state machine model for now, and zoomed out a bit in the interest of making some progress.
The machine functions, but there are a few issues I'd love to sort out.
Currently, after the minimum amount of money is entered, and the selection is made, the machine (just sitting there in its current static state) will allow the user to keep "buying" more soda without entering more money. I understand this is where the case structures would come into play. The amount of change displayed (if any) will also stay in the indicator until the entered amount is changed.
One big thing I wanted to implement, but couldn't figure out, was to make each of the 5 selections, cost a different amount of money. Again without the state machine model, I just couldn't figure out how to do this.
Also since I have used a photo as my background, and placed all of my controls, & indicators on top, if the front panel window is resized at all, everything is shifted, and looks terrible. I tried to find out how to compile, or make the VI a stand alone app, but I couldn't figure out how to do it. Is this one of the features not included with the Student Edition of Labview? I did change the prefs as to not allow someone to resize the window, or to have scroll bars, but I believe this only works while the VI is running?
I have attached the current version of my machine. If there is a way to use most of my existing code by integrating it with the case structures I couldn't figure out, that would be great. Again because of my lack of knowledge, I don't know if this is possible.
Thanks so much again in advance for any help and / or advice. I am really hoping that maybe with a small example of what I'm missing, things will "click" and I can complete the project the way I had hoped. Please know that I'm not asking for the work to be done for me, but we have not covered case or event structures at all in class, & I am having a hard time figuring them out on my own.
Thanks!
George
10-23-2016 09:41 PM - edited 10-23-2016 09:43 PM
What do you think would change if you remove that select node and just keep the boolean wire?
(see also)