I'm looking for the correct way to stop my event structure + while loop combo, and every method I try seems to have some sort of drawback. (See attachment).
This my program is CNG station and i want to stop filling tank in its run time by just clicking a STOP button , i tried my all knowledge of LABVIEW ,but i failed every time as i m in basic ,
I want the code to execute so that i can choose stop, the main code should not execute.
Thanks in advance 🙂 🙂
Solved! Go to Solution.
I have made very small change in your code, so that you can stop this operation whenever you want.
Hope it helps !
Kudos are welcome 😉
Some problems with your VI (i opened the modified one which is a wrong solution from dhans):
In overall, I really recommend you to study further the State Machine concept. There is even a template for that in LabVIEW. Take the online Core 1-2 courses too, it will help a lot to understand shift registers, etc...
By the way, why do you thanks twice the wrong VI, plus marking your answers as solution?
I will explain about those points mentioned in your statement.
1. I was just seeking for a solution so i didn't bother about placement of controls in that VI
2. Yes, I have deleted it accidentally and forgot to add. My apologize.
3. Reason for label hidden is it overlap with surrounding blocks. Thats all. There is no any other intention. Failed to update.
4. Initialzing value is done for testing my modified code. If the user wants they can delete them and run it.
After all, I just see the possible solution in the given VI so that user can easily adapt it. Thats why I didn't mention about state machines. But thanks for the mentioning of m mistakes Blokk.
As Blokk said, State machine is even more easier to you handle this task Mr. Zuo0226 .
Hi Zua0226 and Blokk,
As per suggestions noted by Blokk, I have made some changes in that modified code.
I will make clear about my side in previous code.
I rectified these problems and updated the requirement code in this reply.
Hope it helps 😉
Kudos are Welocme 😉
why do you send PMs to people not related to your thread?
Do you think you get more help by spamming our message boxes?
To get attention:
- post useful messages (containing relevant information) in this thread. This will keep the thread visible on the first page of the LabVIEW forum!
- don't mark your own "Thank you" answers as solution! Threads with a solution mark are less likely to be visited by the forum volunteers: why should we peek into threads when there is a solution already?
- Please read the forum introduction!
Let me echo GerdW's reply -- do not send PMs hoping someone who hasn't been commenting on your posts will just jump up and solve your problem for you.
You need to spend some time and to learn LabVIEW. Take a week and carefully go through all of the tutorial material that you can find. Learn about State Machines. Look at the Examples and Templates (including State Machines) that ship with LabVIEW. You will undoubtedly find that there is code you don't understand -- spend the time to learn why the code is written in that manner. There are also books about LabVIEW ...