‎04-04-2012 05:27 PM
I did the dynamic events because I just followed the instructions in other thread but I don't understand exactly how it works. Its function is to make the user be able to stop the event, as I understood.
‎04-04-2012 05:28 PM
Sorry about all these posts, but I'm just trying to make you think about all the coding have done so far.
I think you need to take a step back and think for just a second or 2 about what your vi's are doing.
Or else, try to take the tutorial again, it will probably give you some new ideas.
‎04-04-2012 05:36 PM
I think I should stop the loop in my sub vi to make my main vi keep flowing.
‎04-04-2012 05:37 PM
@Bombbooo wrote:... You can be my labview tutor.)
Thanks for the kind words, but I already have 2 "students" in my company.
@Bombbooo wrote:I did the dynamic events because I just followed the instructions in other thread but I don't understand exactly how it works. Its function is to make the user be able to stop the event, as I understood.
What other thread ?
If you don't understand how it works, you need to look it up or ask before using it.
The only think that can make the Event structure in your subvi run some code, is if one of the controls change value by the user. So the user needs to see the Front panel to be able to change a controls value.
That is how you have made it now.
But is there a reason for having the while loop and the Event structure in the sub vi in the first place ?
‎04-04-2012 05:42 PM - edited ‎04-04-2012 05:43 PM
I think "no". Not necessary to have a while loop at the first place.
What about the dynamic event stuffs there?
‎04-04-2012 05:54 PM
‎04-04-2012 05:55 PM
‎04-04-2012 08:38 PM
Don't worry. You'll get there.
‎04-04-2012 09:36 PM - edited ‎04-04-2012 09:37 PM
Well....
I'll cut to the chase...
You've learned an important lesson...
Unless you r-e-a-l-l-y really really know what you are doing, never use an Event Structure inside a sub-vi.
The Event Structure should be part of the main program, whereas the sub-vi's should be considered liked sub-routines or function calls in text-based languages.
You need to design / architecture the code. You need to understand what it is supposed to do in your mind or on paper. This goes for any programming language. Once you understand how the code should be written, you can proceed to write it.
Having shown us part of the story will may only get you part of the solution. Having seen more of your code, it is more than what you described when I asked "what is your code supposed to do?" or "Can you provide the requirements or assignment description?" Only part of the description was offered.
Reading the tutorials on how to program with LabVIEW is okay to learn about LabVIEW. You need to learn how to design software. Maybe that's the goal of your exercise... I don't know. But you do need to step away, process all of what you've been told and come back with a fresh view of where you need to start. Who knows... You may have to trash your code, refactor it, or if you are lucky salvage some of it. But you need to understand how the flow of the program needs to behave.
21 more posts and we'll hit 100. It's not that bad.. WHen we reach 300 then we'll start to wonder.. 😉
‎04-05-2012 03:39 PM
You are so nice to answer every question of mine (sometimes my questions are stupid). Can I have byour personal chat address or email or something like that from both of you so that I can ask you personally? It looks bad to keep posting 100 replies in public